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