49 int (*transfer)(
struct spi_module *spi, uint8_t *tx_buffer,
50 uint8_t *rx_buffer, uint8_t length);
69uint8_t spi_read(
struct spi_module *spi, uint8_t reg);
80void spi_write(
struct spi_module *spi, uint8_t reg, uint8_t val);
92void spi_write_masked(
struct spi_module *spi, uint8_t reg, uint8_t mask,
Hardware abstraction layer for userland SPI drivers.
Definition spi_module.h:22
uint8_t mode
The SPI mode to use for transfers.
Definition spi_module.h:36
uint8_t cs_pin
The chip select pin for the target SPI device.
Definition spi_module.h:26
uint32_t clock
The SPI clock speed (in Hz) to use for transfers.
Definition spi_module.h:31
uint8_t write_mask
Bitmask to apply to the register address when we are writing.
Definition spi_module.h:46
uint8_t read_mask
Bitmask to apply to the register address when we are reading.
Definition spi_module.h:41