Treehopper Java API
|
SPI interface. More...
Public Member Functions | |
boolean | isEnabled () |
Gets whether the SPI interface is enabled. More... | |
void | setEnabled (boolean enabled) |
Sets whether the SPI interface is enabled. More... | |
byte [] | SendReceive (byte[] dataToWrite) |
Exchange data with an SPI slave. More... | |
byte [] | SendReceive (byte[] dataToWrite, SpiChipSelectPin chipSelect, ChipSelectMode chipSelectMode) |
Exchange data with an SPI slave. More... | |
byte [] | SendReceive (byte[] dataToWrite, SpiChipSelectPin chipSelect, ChipSelectMode chipSelectMode, double speedMhz) |
Exchange data with an SPI slave. More... | |
byte [] | SendReceive (byte[] dataToWrite, SpiChipSelectPin chipSelect, ChipSelectMode chipSelectMode, double speedMhz, BurstMode burstMode) |
Exchange data with an SPI slave. More... | |
byte [] | SendReceive (byte[] dataToWrite, SpiChipSelectPin chipSelect, ChipSelectMode chipSelectMode, double speedMhz, BurstMode burstMode, SpiMode spiMode) |
Exchange data with an SPI slave. More... | |
SPI interface.
boolean io.treehopper.interfaces.Spi.isEnabled | ( | ) |
Gets whether the SPI interface is enabled.
Implemented in io.treehopper.HardwareSpi.
byte [] io.treehopper.interfaces.Spi.SendReceive | ( | byte [] | dataToWrite | ) |
Exchange data with an SPI slave.
dataToWrite | the data to write |
Implemented in io.treehopper.HardwareSpi.
byte [] io.treehopper.interfaces.Spi.SendReceive | ( | byte [] | dataToWrite, |
SpiChipSelectPin | chipSelect, | ||
ChipSelectMode | chipSelectMode | ||
) |
Exchange data with an SPI slave.
dataToWrite | the data to write |
chipSelect | the chip select pin to use |
chipSelectMode | the chip select mode to use |
Implemented in io.treehopper.HardwareSpi.
byte [] io.treehopper.interfaces.Spi.SendReceive | ( | byte [] | dataToWrite, |
SpiChipSelectPin | chipSelect, | ||
ChipSelectMode | chipSelectMode, | ||
double | speedMhz | ||
) |
Exchange data with an SPI slave.
dataToWrite | the data to write |
chipSelect | the chip select pin to use |
chipSelectMode | the chip select mode to use |
speedMhz | the speed, in MHz, to use |
Implemented in io.treehopper.HardwareSpi.
byte [] io.treehopper.interfaces.Spi.SendReceive | ( | byte [] | dataToWrite, |
SpiChipSelectPin | chipSelect, | ||
ChipSelectMode | chipSelectMode, | ||
double | speedMhz, | ||
BurstMode | burstMode | ||
) |
Exchange data with an SPI slave.
dataToWrite | the data to write |
chipSelect | the chip select pin to use |
chipSelectMode | the chip select mode to use |
speedMhz | the speed, in MHz, to use |
burstMode | the burst mode (if any) to use |
Implemented in io.treehopper.HardwareSpi.
byte [] io.treehopper.interfaces.Spi.SendReceive | ( | byte [] | dataToWrite, |
SpiChipSelectPin | chipSelect, | ||
ChipSelectMode | chipSelectMode, | ||
double | speedMhz, | ||
BurstMode | burstMode, | ||
SpiMode | spiMode | ||
) |
Exchange data with an SPI slave.
dataToWrite | the data to write |
chipSelect | the chip select pin to use |
chipSelectMode | the chip select mode to use |
speedMhz | the speed, in MHz, to use |
burstMode | the burst mode (if any) to use |
spiMode | the SPI mode to use |
Implemented in io.treehopper.HardwareSpi.
void io.treehopper.interfaces.Spi.setEnabled | ( | boolean | enabled | ) |
Sets whether the SPI interface is enabled.
enabled | true to enable the interface; false to disable it |
Implemented in io.treehopper.HardwareSpi.