i2c_s_sync_init

Initialize synchronous I2C slave interface.

int32_t i2c_s_sync_init(
    struct i2c_s_sync_descriptor *const descr,
    void * hw
)

This function initializes the given I2C descriptor to be used as synchronous 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_sync_descriptor Struct *const

An I2C slave descriptor which is used to communicate through I2C

hw

Type: void *

The pointer to hardware instance

Returns

Type: int32_t

Initialization status.