|
mraa
0.9.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
|
This file defines the SPI interface for libmraa
Public Member Functions | |
| synchronized void | delete () |
| Spi (int bus) | |
| Result | mode (Spi_Mode mode) |
| Result | frequency (int hz) |
| int | writeByte (short data) |
| int | write_word (int data) |
| byte[] | write (byte[] txBuf) |
| Result | lsbmode (boolean lsb) |
| Result | bitPerWord (long bits) |
| Spi | ( | int | bus | ) |
Initialise SPI object using the board mapping to set muxes
| bus | to use, as listed in the platform definition, normally 0 |
| Result bitPerWord | ( | long | bits | ) |
Set bits per mode on transaction, default is 8
| bits | bits per word |
| Result frequency | ( | int | hz | ) |
Set the SPI device operating clock frequency
| hz | the frequency to set in hz |
| Result lsbmode | ( | boolean | lsb | ) |
Change the SPI lsb mode
| lsb | Use least significant bit transmission - 0 for msbi |
Set the SPI device mode. see spidev0-3
| mode | the mode. See Linux spidev doc |
| int write_word | ( | int | data | ) |
Write single byte to the SPI device
| data | the byte to send |
| int writeByte | ( | short | data | ) |
Write single byte to the SPI device
| data | the byte to send |
1.8.9.1