61 throw std::invalid_argument(
"Error initialising SPI bus");
111 uint8_t*
write(uint8_t* txBuf,
int length) {
unsigned int mraa_boolean_t
Definition: common.h:44
mraa_result_t frequency(int hz)
Definition: spi.hpp:88
mraa_result_t mraa_spi_lsbmode(mraa_spi_context dev, mraa_boolean_t lsb)
mraa_result_t mraa_spi_frequency(mraa_spi_context dev, int hz)
mraa_result_t mraa_spi_bit_per_word(mraa_spi_context dev, unsigned int bits)
struct _spi * mraa_spi_context
Definition: spi.h:63
Serial Peripheral Interface.
uint8_t * write(uint8_t *txBuf, int length)
Definition: spi.hpp:111
uint8_t writeByte(uint8_t data)
Definition: spi.hpp:98
mraa_result_t mraa_spi_stop(mraa_spi_context dev)
mraa_result_t transfer(uint8_t *txBuf, uint8_t *rxBuf, int length)
Definition: spi.hpp:125
mraa_result_t mode(Spi_Mode mode)
Definition: spi.hpp:78
mraa_spi_mode_t
Definition: spi.h:53
mraa_result_t bitPerWord(unsigned int bits)
Definition: spi.hpp:146
Spi(int bus)
Definition: spi.hpp:57
mraa_result_t lsbmode(bool lsb)
Definition: spi.hpp:136
mraa_result_t mraa_spi_transfer_buf(mraa_spi_context dev, uint8_t *data, uint8_t *rxbuf, int length)
mraa_spi_context mraa_spi_init(int bus)
uint8_t mraa_spi_write(mraa_spi_context dev, uint8_t data)
mraa_result_t
Definition: types.h:145
Spi_Mode
Definition: spi.hpp:35
uint8_t * mraa_spi_write_buf(mraa_spi_context dev, uint8_t *data, int length)
mraa_result_t mraa_spi_mode(mraa_spi_context dev, mraa_spi_mode_t mode)
API to Serial Peripheral Interface.
Definition: spi.hpp:50
~Spi()
Definition: spi.hpp:68