Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedef

This section introduces the typedef that SPIS M-HAL used. More...

Overview

This section introduces the typedef that SPIS M-HAL used.

Typedefs

typedef int(* spis_dma_done_callback )(void *user_data)
 This defines the callback function prototype. More...
 

Typedef Documentation

typedef int(* spis_dma_done_callback)(void *user_data)

This defines the callback function prototype.

It's used for DMA mode transaction.
User should register a callback function when using SPI DMA mode.
In DMA mode, mtk_mhal_spis_dma_transfer_one() returns a value once the SPI hardware register is assigned and the DMA configured.
During this process, the transaction is usually incomplete, once it completes, a DMA interrupt is triggered and a related user callback is called in the DMA interrupt service routine.
This typedef is used to describe the callback function what the user wants to call.

Parameters
[in]user_dataspis controller struct mtk_spis_controller.
See Also
mtk_mhal_spis_dma_done_callback_register()
Returns
Return "0" if callback register successfully, or return "-1" if fail.