|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.spot.peripheral.external.BoardDeviceSPI
public class BoardDeviceSPI
SPI implementation that hides the use of a DeviceSelector before sending SPI commands.
SeeISPI for details of usage.
| Constructor Summary | |
|---|---|
BoardDeviceSPI(int deviceAddress,
PeripheralChipSelect chipSelect)
Create an BoardDeviceSPI using the supplied device address - works out the default configuration |
|
| Method Summary | |
|---|---|
void |
send16bits(int i)
Send 16 bits of data. |
void |
sendSPICommand(byte[] commandSequence,
byte[] readByteSequence)
Send and receive using SPI. |
void |
sendSPICommand(byte[] commandSequence,
int commandLength,
byte[] readByteSequence,
int readLength)
Send and receive using SPI. |
void |
sendSPICommand(byte[] commandSequence,
int commandLength,
byte[] readByteSequence,
int readLength,
int readOffset)
Send and receive using SPI. |
void |
setConfiguration(int config)
Set the configuration of the SPI communications for this device. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BoardDeviceSPI(int deviceAddress,
PeripheralChipSelect chipSelect)
deviceAddress - The device address to use when accessing the SPIchipSelect - The board chip select of the board that this device is on| Method Detail |
|---|
public void send16bits(int i)
ISPI
send16bits in interface ISPIi - The data to send (least sig. 16 bits only), MSB first.
public void sendSPICommand(byte[] commandSequence,
byte[] readByteSequence)
ISPI
sendSPICommand in interface ISPIcommandSequence - The data to sendreadByteSequence - An array into which the received data is placed
public void sendSPICommand(byte[] commandSequence,
int commandLength,
byte[] readByteSequence,
int readLength)
ISPI
sendSPICommand in interface ISPIcommandSequence - The data to sendcommandLength - The number of bytes to sendreadByteSequence - An array into which the received data is placedreadLength - The number of bytes to receive
public void sendSPICommand(byte[] commandSequence,
int commandLength,
byte[] readByteSequence,
int readLength,
int readOffset)
ISPI
sendSPICommand in interface ISPIcommandSequence - The data to sendcommandLength - The number of bytes to sendreadByteSequence - An array into which the received data is placedreadLength - The number of bytes to receivereadOffset - The number of bytes to send before beginning receptionpublic void setConfiguration(int config)
ISPI
setConfiguration in interface ISPIconfig - The configuration of the SPI communications to use for this device.
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||