Class SpiFactory

    • Method Detail

      • getInstance

        public static SpiDevice getInstance​(SpiChannel channel)
                                     throws IOException
        Create new SpiDevice instance with a default SPI speed of 1 MHz.
        Parameters:
        channel - spi channel to use
        Returns:
        Return a new SpiDevice impl instance.
        Throws:
        IOException
      • getInstance

        public static SpiDevice getInstance​(SpiChannel channel,
                                            SpiMode mode)
                                     throws IOException
        Create new SpiDevice instance
        Parameters:
        channel - spi channel to use
        mode - spi mode (see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Mode_numbers)
        Returns:
        Return a new SpiDevice impl instance.
        Throws:
        IOException
      • getInstance

        public static SpiDevice getInstance​(SpiChannel channel,
                                            int speed)
                                     throws IOException
        Create new SpiDevice instance
        Parameters:
        channel - spi channel to use
        speed - spi speed/rate (in Hertz) for channel to communicate at (range is 500kHz - 32MHz)
        Returns:
        Return a new SpiDevice impl instance.
        Throws:
        IOException
      • getInstance

        public static SpiDevice getInstance​(SpiChannel channel,
                                            int speed,
                                            SpiMode mode)
                                     throws IOException
        Create new SpiDevice instance
        Parameters:
        channel - spi channel to use
        speed - spi speed/rate (in Hertz) for channel to communicate at (range is 500kHz - 32MHz)
        mode - spi mode (see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Mode_numbers)
        Returns:
        Return a new SpiDevice impl instance.
        Throws:
        IOException