18.6.3.3.3 Function i2c_slave_get_direction_wait()
Waits for a start condition on the bus.
enum i2c_slave_direction i2c_slave_get_direction_wait( struct i2c_slave_module *const module)
Note: This function is only available for 7-bit slave addressing.
Waits for the master to issue a start condition on the bus.Note: This function does not check for errors in the last transfer, this will be discovered when reading or writing.
Data direction | Parameter name | Description |
---|---|---|
[in] |
module |
Pointer to software module structure |
Returns
Direction of the current transfer, when in slave mode.
Return value | Description |
---|---|
I2C_SLAVE_DIRECTION_NONE |
No request from master within timeout period |
I2C_SLAVE_DIRECTION_READ |
Write request from master |
I2C_SLAVE_DIRECTION_WRITE |
Read request from master |