48 #define SPI_BUFFER_SIZE 8
bool pmw3901_data_available(struct pmw3901_t *pmw)
volatile uint8_t spi_output_buf[SPI_BUFFER_SIZE]
uint32_t readwrite_timeout
SPI transaction structure.
Architecture independent SPI (Serial Peripheral Interface) API.
bool pmw3901_get_data(struct pmw3901_t *pmw, int16_t *delta_x, int16_t *delta_y)
struct spi_transaction trans
SPI peripheral structure.
void pmw3901_init(struct pmw3901_t *pmw, struct spi_periph *periph, uint8_t slave_idx)
volatile uint8_t spi_input_buf[SPI_BUFFER_SIZE]
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
void pmw3901_start_read(struct pmw3901_t *pmw)
bool pmw3901_is_idle(struct pmw3901_t *pmw)
struct spi_periph * periph
void pmw3901_event(struct pmw3901_t *pmw)