34.2.4.10 spi_m_dma_register_callback
Register a function as an SPI transfer completion callback.
void spi_m_dma_register_callback(
struct spi_m_dma_descriptor * spi,
const enum spi_m_dma_cb_type type,
spi_m_dma_cb_t func
)
Register a callback function specified by its type.
-
SPI_CB_COMPLETE: set the function that will be called on the SPI transfer completion including deactivating the CS.
-
SPI_CB_XFER: set the function that will be called on the SPI buffer transfer completion. Register a NULL function to not use the callback.
Parameters
- spi
-
Type: struct spi_m_dma_descriptor Struct *
Pointer to the HAL SPI instance.
- type
-
Type: const enum spi_m_dma_cb_type Enum
Callback type (spi_m_dma_cb_type Enum).
- func
-
Type: spi_m_dma_cb_t typedef
Pointer to callback function.
Returns
Type: void