![]()  | 
        
           Wirepas SDK
           
         | 
        
Go to the source code of this file.
Typedefs | |
| typedef void(* | spi_on_transfer_done_cb_f) (spi_res_e res, spi_xfer_t *xfer_p) | 
Functions | |
| spi_res_e | SPI_init (spi_conf_t *conf_p) | 
| Initialize SPI module.  More... | |
| spi_res_e | SPI_close () | 
| Close an already initialized SPI module.  More... | |
| spi_res_e | SPI_transfer (spi_xfer_t *xfer_p, spi_on_transfer_done_cb_f cb) | 
| Enable or disable USART.  More... | |
Data Structures | |
| struct | spi_conf_t | 
| struct | spi_xfer_t | 
Enumerations | |
| enum | spi_mode_e { SPI_MODE_LOW_FIRST, SPI_MODE_LOW_SECOND, SPI_MODE_HIGH_FIRST, SPI_MODE_HIGH_SECOND } | 
| Simple minimal SPI master driver It only manages one SPI instance at a time.  More... | |
| enum | spi_bit_order_e { SPI_ORDER_MSB, SPI_ORDER_LSB } | 
| enum | spi_res_e {  SPI_RES_OK, SPI_RES_INVALID_CONFIG, SPI_RES_INVALID_XFER, SPI_RES_NOT_INITIALIZED, SPI_RES_ALREADY_INITIALIZED, SPI_RES_BUSY, SPI_RES_BLOCKING_NOT_AVAILABLE, SPI_RES_ONLY_BLOCKING_AVAILABLE }  | 
| typedef void(* spi_on_transfer_done_cb_f) (spi_res_e res, spi_xfer_t *xfer_p) | 
| spi_res_e SPI_close | ( | ) | 
Close an already initialized SPI module.
| spi_res_e SPI_init | ( | spi_conf_t * | conf_p | ) | 
Initialize SPI module.
| conf_p | Pointer to an spi configuration | 
| spi_res_e SPI_transfer | ( | spi_xfer_t * | xfer_p, | 
| spi_on_transfer_done_cb_f | cb | ||
| ) | 
Enable or disable USART.
| xfer_p | Pointer to the transfert description | 
| cb | Callback to call at end of transfer (Can be NULL for a blocking call) | 
| struct spi_conf_t | 
| Data Fields | ||
|---|---|---|
| spi_bit_order_e | bit_order | |
| uint32_t | clock | |
| spi_mode_e | mode | |
| struct spi_xfer_t | 
| enum spi_bit_order_e | 
| enum spi_mode_e |