26.2.2.7 i2c_m_os_transfer
Async version of transfer message to/from I2C slave.
int32_t i2c_m_os_transfer(
struct i2c_m_os_desc *const i2c,
struct _i2c_m_msg * msg,
int n
)
This function will transfer messages between the I2C slave and the master. The function will wait for the transfer to complete.
Parameters
- i2c
-
Type: struct i2c_m_os_desc Struct *const
An I2C master descriptor, which is used to communicate through I2C
- msg
-
Type: struct _i2c_m_msg *
An _i2c_m_msg struct array
- n
-
Type: int
The number of msgs in the array
Returns
Type: int32_t
The status of the operation
- 0
-
Operation completed successfully
- <0
-
Operation failed