|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.LabJack.GenericSPI
This class represents a generic SPI device consisting of a single block of contiguous bits.
This class can be used to drive any SPI device. For devices containing more than one set of internal control or data bits, you can control the device via bit-twiddling. An alternative is to define multiple Generic() objects corresponding to individual control or data bit fields. Lastly, you could define your own class implementing the SPI interface and provide custom methods to manipulate bits behind the scenes.
| Constructor Summary | |
GenericSPI(int numberOfBits)
Constructor. |
|
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GenericSPI(int numberOfBits)
numberOfBits - Length of this SPI device.| Method Detail |
public int getBits()
getBits in interface SPIpublic void setBits(int bits)
setBits in interface SPIbits - Outgoing bits.public int getNumberOfBits()
getNumberOfBits in interface SPIpublic int getOutBits()
getOutBits in interface SPIpublic void setInBits(int inBits)
setInBits in interface SPIinBits - Bits read from SPI device.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||