mraa
0.4.5
Low Level Skeleton Library for Communication on GNU/Linux platforms
|
This file defines the SPI interface for libmraa
Public Member Functions | |
Spi (int bus) | |
~Spi () | |
mraa_result_t | mode (mraa_spi_mode_t mode) |
mraa_result_t | frequency (int hz) |
char | write (char data) |
char * | write (char *data, size_t length) |
mraa_result_t | lsbmode (bool lsb) |
mraa_result_t | bitPerWord (unsigned int bits) |
|
inline |
Initialise SPI object using the board mapping to set muxes
bus | to use, as listed in the platform definition, normally 0 |
|
inline |
Closes spi bus
|
inline |
Set the SPI device mode. see spidev0-3
mode | the mode. See Linux spidev doc |
|
inline |
Set the SPI device operating clock frequency
hz | the frequency to set in hz |
|
inline |
Write single byte to the SPI device
data | the byte to send |
|
inline |
Write buffer of bytes to SPI device
data | buffer to send |
length | size of buffer to send |
|
inline |
Change the SPI lsb mode
lsb | Use least significant bit transmission - 0 for msbi |
|
inline |
Set bits per mode on transaction, default is 8
bits | bits per word |