i2c_m_async_init

Initialize the asynchronous I2C master interface.

int32_t i2c_m_async_init(
    struct i2c_m_async_desc *const i2c,
    void *const hw
)

This function initializes the given I2C descriptor to be used as asynchronous I2C master interface descriptor. It checks if the given hardware is not initialized and if the given hardware is permitted to be initialized.

Parameters

i2c

Type: struct i2c_m_async_desc Struct *const

An I2C master descriptor, which is used to communicate through I2C

hw

Type: void *const

The pointer to hardware instance

Returns

Type: int32_t

Initialization status.