|
Treehopper Java API
|
An SPI peripheral device. More...
Public Member Functions | |
| SpiDevice (HardwareSpi spiModule, Pin chipSelect, ChipSelectMode csMode) | |
| Create a new SPI device with the given settings. More... | |
| SpiDevice (HardwareSpi spiModule, Pin chipSelect, ChipSelectMode csMode, double speedMHz) | |
| Create a new SPI device with the given settings. More... | |
| SpiDevice (HardwareSpi spiModule, Pin chipSelect, ChipSelectMode csMode, double speedMHz, SpiMode mode) | |
| Create a new SPI device with the given settings. More... | |
| byte [] | SendReceive (byte[] dataToSend) |
| Exchange data with the SPI peripheral. More... | |
| byte [] | SendReceive (byte[] dataToSend, BurstMode burst) |
| Exchange data with the SPI peripheral. More... | |
An SPI peripheral device.
| io.treehopper.SpiDevice.SpiDevice | ( | HardwareSpi | spiModule, |
| Pin | chipSelect, | ||
| ChipSelectMode | csMode | ||
| ) |
Create a new SPI device with the given settings.
| spiModule | the Spi module to use |
| chipSelect | the chip select pin to use |
| csMode | The chip select mode to use |
| io.treehopper.SpiDevice.SpiDevice | ( | HardwareSpi | spiModule, |
| Pin | chipSelect, | ||
| ChipSelectMode | csMode, | ||
| double | speedMHz | ||
| ) |
Create a new SPI device with the given settings.
| spiModule | the Spi module to use |
| chipSelect | the chip select pin to use |
| csMode | The chip select mode to use |
| speedMHz | the speed, in MHz, to use |
| io.treehopper.SpiDevice.SpiDevice | ( | HardwareSpi | spiModule, |
| Pin | chipSelect, | ||
| ChipSelectMode | csMode, | ||
| double | speedMHz, | ||
| SpiMode | mode | ||
| ) |
Create a new SPI device with the given settings.
| spiModule | the Spi module to use |
| chipSelect | the chip select pin to use |
| csMode | The chip select mode to use |
| speedMHz | the speed, in MHz, to use |
| mode | the SPI mode to use |
| byte [] io.treehopper.SpiDevice.SendReceive | ( | byte [] | dataToSend | ) |
Exchange data with the SPI peripheral.
| dataToSend | the data to send |
| byte [] io.treehopper.SpiDevice.SendReceive | ( | byte [] | dataToSend, |
| BurstMode | burst | ||
| ) |
Exchange data with the SPI peripheral.
| dataToSend | the data to send |
| burst | the burst mode to use with the device |