26.3.3.9 i2c_m_sync_transfer
Sync version of transfer message to/from the I2C slave.
int32_t i2c_m_sync_transfer(
struct i2c_m_sync_desc *const i2c,
struct _i2c_m_msg * msg
)
This function will transfer a message between the I2C slave and the master. This function will wait for the operation to be done.
Parameters
- i2c
-
Type: struct i2c_m_sync_desc Struct *const
An I2C descriptor, which is used to communicate through I2C
- msg
-
Type: struct _i2c_m_msg *
An i2c_m_msg struct
Returns
Type: int32_t
The status of the operation
- 0
-
Operation completed successfully
- <0
-
Operation failed