|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.dctl.hardware.spi.SPI
SPI class that provides access to an SPI slave device
| Constructor Summary | |
SPI(int instance,
int slave)
Create a new SPI attached to a a particular instance using the specified slave channel |
|
| Method Summary | |
int |
getFrameSize()
Get the number of bits in the frame size |
int |
getTransferRate()
Get the transfer rate in hz |
boolean |
isClockInFirstEdge()
Get the value for clocking in on the first edge |
boolean |
isFirstEdgeFalling()
Get the value of the first edge falling |
void |
setClockInFirstEdge(boolean state)
Set true to clock in on the first edge |
void |
setFirstEdgeFalling(boolean state)
Make the first edge a falling edge |
void |
setFrameSize(int bits)
Set the value of the frame size |
void |
setTransferRate(int rate)
Set the transmit rate in hz |
void |
transfer(byte[] outBuffer,
int outOffset,
int outFrames,
byte[] inBuffer,
int inOffset,
int inFrames)
Transfer data |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SPI(int instance,
int slave)
throws SystemException
instance - The instanceslave - The slave channel
SystemException - if there is an error| Method Detail |
public void setFirstEdgeFalling(boolean state)
throws SystemException
state - True to set it, false to clear it
SystemException - if there is an errorpublic boolean isFirstEdgeFalling()
public void setClockInFirstEdge(boolean state)
throws SystemException
state - true to clock in on the first edge, false otherwise
SystemException - if there is an errorpublic boolean isClockInFirstEdge()
public void setFrameSize(int bits)
throws SystemException
bits - The number of bits
SystemException - if there is an errorpublic int getFrameSize()
public void setTransferRate(int rate)
throws SystemException
rate - The transfer rate
SystemException - if there is an errorpublic int getTransferRate()
public void transfer(byte[] outBuffer,
int outOffset,
int outFrames,
byte[] inBuffer,
int inOffset,
int inFrames)
throws SystemException
outBuffer - The output bufferoutOffset - The offset into the output bufferoutFrames - The number of frames to outputinBuffer - The input bufferinOffset - The offset into the input bufferinFrames - The number of frames to input
SystemException - if there is an error
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||