i2c_s_async_init

Initialize asynchronous I2C slave interface.

int32_t i2c_s_async_init(
    struct i2c_s_async_descriptor *const descr,
    void *const hw,
    uint8_t *const rx_buffer,
    const uint16_t rx_buffer_length
)

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

Parameters

descr

Type: struct i2c_s_async_descriptor Struct *const

An I2C slave descriptor which is used to communicate through I2C

hw

Type: void *const

The pointer to hardware instance

rx_buffer

Type: uint8_t *const

An RX buffer

rx_buffer_length

Type: const uint16_t

The length of the buffer above

Returns

Type: int32_t

Initialization status.