public class SpiFactory extends Object
SpiDevice interface.| Modifier and Type | Method and Description | 
|---|---|
static SpiDevice | 
getInstance(SpiChannel channel)
Create new SpiDevice instance with a default SPI speed of 1 MHz. 
 | 
static SpiDevice | 
getInstance(SpiChannel channel,
           int speed)
Create new SpiDevice instance 
 | 
static SpiDevice | 
getInstance(SpiChannel channel,
           int speed,
           SpiMode mode)
Create new SpiDevice instance 
 | 
static SpiDevice | 
getInstance(SpiChannel channel,
           SpiMode mode)
Create new SpiDevice instance 
 | 
public static SpiDevice getInstance(SpiChannel channel) throws IOException
channel - spi channel to useIOExceptionpublic static SpiDevice getInstance(SpiChannel channel, SpiMode mode) throws IOException
channel - spi channel to usemode - spi mode (see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Mode_numbers)IOExceptionpublic static SpiDevice getInstance(SpiChannel channel, int speed) throws IOException
channel - spi channel to usespeed - spi speed/rate (in Hertz) for channel to communicate at
            (range is 500kHz - 32MHz)IOExceptionpublic static SpiDevice getInstance(SpiChannel channel, int speed, SpiMode mode) throws IOException
channel - spi channel to usespeed - 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)IOExceptionCopyright © 2012–2021 Pi4J. All rights reserved.