SPI (Serial Peripheral Interface) interface. More...
Go to the source code of this file.
Data Structures | |
struct | hw_spi_t |
SPI adapter. More... | |
Typedefs | |
typedef struct hw_spi_t | hw_spi_t |
SPI adapter. | |
Functions | |
hw_spi_t | hw_spi_init_default (bool cs_active_low, uint32_t baudrate) |
Initialize a SPI interface using default pins and adapter. More... | |
hw_spi_t | hw_spi_init (uint8_t adapter, uint8_t sck, uint8_t tx, uint8_t rx, uint8_t cs, bool cs_active_low, uint32_t baudrate) |
Initialize a SPI interface with specific adapter and pins. More... | |
void | hw_spi_finalize (hw_spi_t *spi) |
Finalize and release a SPI interface. More... | |
uint8_t | hw_spi_count (void) |
Get the total number of available SPI adapters. More... | |
static bool | hw_spi_valid (hw_spi_t *spi) |
Get true if the SPI interface is valid. More... | |
size_t | hw_spi_xfr (hw_spi_t *spi, void *data, size_t tx, size_t rx) |
Perform a SPI transfer operation (read, write, or combined). More... | |
size_t | hw_spi_read (hw_spi_t *spi, uint8_t reg, void *data, size_t len) |
Read data from a specific register of a SPI device. More... | |
size_t | hw_spi_write (hw_spi_t *spi, uint8_t reg, const void *data, size_t len) |
Write data to a specific register of a SPI device. More... | |
SPI (Serial Peripheral Interface) interface.
Definition in file spi.h.