Code: Select all
#define NO_CS 3 //Number of CS pins per SPI host
typedef struct {
spi_device_t *device[NO_CS];
intr_handle_t intr;
spi_dev_t *hw;
spi_transaction_t *cur_trans;
int cur_cs;
lldesc_t dmadesc_tx, dmadesc_rx;
bool no_gpio_matrix;
} spi_host_t;