com.LabJack
Interface SPI

All Known Implementing Classes:
GenericSPI

public interface SPI

This interface defines an SPI device. It is used in conjunction with the LabJackWrapper class for reading and writing SPI devices as well as defining the device characteristics (i.e. length).


Method Summary
 int getBits()
          Returns the read-back bits for this device, if any.
 int getNumberOfBits()
          This is an 'internal' method.
 int getOutBits()
          This is an 'internal' method.
 void setBits(int bits)
          Sets the out-going bits for this device, if any.
 void setInBits(int inBits)
          This is an 'internal' method.
 

Method Detail

getBits

public int getBits()
Returns the read-back bits for this device, if any.

Returns:
Read-back bits.

setBits

public void setBits(int bits)
Sets the out-going bits for this device, if any.

Parameters:
bits - Outgoing bits.

getNumberOfBits

public int getNumberOfBits()
This is an 'internal' method. It is used by the LabJackWrapper class to obtain the number of bits for this SPI device (ex. # of bits in shift-register chain).

Returns:
Length of this SPI device.

getOutBits

public int getOutBits()
This is an 'internal' method. It is used by the LabJackWrapper class to obtain the outgoing bits.

Returns:
The out-going bits to be sent to the SPI device.

setInBits

public void setInBits(int inBits)
This is an 'internal' method. It is used by the LabJackWrapper class to set the incomming bits.

Parameters:
inBits - Bits read from SPI device.