|
uint | spi_init (spi_inst_t *spi, uint baudrate) |
| Initialise SPI instances. More...
|
|
void | spi_deinit (spi_inst_t *spi) |
| Deinitialise SPI instances. More...
|
|
uint | spi_set_baudrate (spi_inst_t *spi, uint baudrate) |
| Set SPI baudrate. More...
|
|
uint | spi_get_baudrate (const spi_inst_t *spi) |
| Get SPI baudrate. More...
|
|
static uint | spi_get_index (const spi_inst_t *spi) |
| Convert SPI instance to hardware instance number. More...
|
|
static spi_hw_t * | spi_get_hw (spi_inst_t *spi) |
|
static const spi_hw_t * | spi_get_const_hw (const spi_inst_t *spi) |
|
static void | spi_set_format (spi_inst_t *spi, uint data_bits, spi_cpol_t cpol, spi_cpha_t cpha, __unused spi_order_t order) |
| Configure SPI. More...
|
|
static void | spi_set_slave (spi_inst_t *spi, bool slave) |
| Set SPI master/slave. More...
|
|
static bool | spi_is_writable (const spi_inst_t *spi) |
| Check whether a write can be done on SPI device. More...
|
|
static bool | spi_is_readable (const spi_inst_t *spi) |
| Check whether a read can be done on SPI device. More...
|
|
static bool | spi_is_busy (const spi_inst_t *spi) |
| Check whether SPI is busy. More...
|
|
int | spi_write_read_blocking (spi_inst_t *spi, const uint8_t *src, uint8_t *dst, size_t len) |
| Write/Read to/from an SPI device. More...
|
|
int | spi_write_blocking (spi_inst_t *spi, const uint8_t *src, size_t len) |
| Write to an SPI device, blocking. More...
|
|
int | spi_read_blocking (spi_inst_t *spi, uint8_t repeated_tx_data, uint8_t *dst, size_t len) |
| Read from an SPI device. More...
|
|
int | spi_write16_read16_blocking (spi_inst_t *spi, const uint16_t *src, uint16_t *dst, size_t len) |
| Write/Read half words to/from an SPI device. More...
|
|
int | spi_write16_blocking (spi_inst_t *spi, const uint16_t *src, size_t len) |
| Write to an SPI device. More...
|
|
int | spi_read16_blocking (spi_inst_t *spi, uint16_t repeated_tx_data, uint16_t *dst, size_t len) |
| Read from an SPI device. More...
|
|
static uint | spi_get_dreq (spi_inst_t *spi, bool is_tx) |
| Return the DREQ to use for pacing transfers to/from a particular SPI instance. More...
|
|