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

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

Overview

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

Typedefs

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

Typedef Documentation

typedef int(* i2c_dma_done_callback)(void *user_data)

This defines the callback function prototype.

It's used for DMA mode transaction.
Users should register a callback function when using DMA mode.
In DMA mode, once I2C and DMA hardware have completed the transaction, 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 that the user wants to call.

Parameters
[in]user_data: An OS-HAL defined parameter is private by mtk_mhal_i2c_dma_done_callback_register().
See Also
mtk_mhal_i2c_dma_done_callback_register()
Returns
Return "0" if callback registers successfully; otherwise, return "-1".