34.5.4.9 spi_s_async_register_callback
Register a function as SPI transfer completion callback.
void spi_s_async_register_callback(
struct spi_s_async_descriptor * spi,
const enum spi_s_async_cb_type type,
const FUNC_PTR func
)
-
SPI_S_CB_COMPLETE: set the function that will be called on SPI transfer completion including deactivating the CS.
-
SPI_S_CB_TX: set the function that will be called on the TX threshold notification.
-
SPI_S_CB_RX: set the function that will be called on the RX threshold notification. Register a NULL function to not use the callback.
Parameters
- spi
-
Type: struct spi_s_async_descriptor Struct *
Pointer to the HAL SPI instance.
- type
-
Type: const enum spi_s_async_cb_type Enum
Callback type (spi_s_cb_type).
- func
-
Type: const FUNC_PTR typedef
Pointer to callback function.
Returns
Type: void