18.6.3.4.1 Function i2c_slave_get_status()
Retrieves the current module status.
uint32_t i2c_slave_get_status( struct i2c_slave_module *const module)
Checks the status of the module and returns it as a bitmask of status flags.
Data direction | Parameter name | Description |
---|---|---|
[in] |
module |
Pointer to the I2C slave software device struct |
Returns
Bitmask of status flags.
Return value | Description |
---|---|
I2C_SLAVE_STATUS_ADDRESS_MATCH |
A valid address has been received |
I2C_SLAVE_STATUS_DATA_READY |
A I2C slave byte transmission is successfully completed |
I2C_SLAVE_STATUS_STOP_RECEIVED |
A stop condition is detected for a transaction being processed |
I2C_SLAVE_STATUS_CLOCK_HOLD |
The slave is holding the SCL line low |
I2C_SLAVE_STATUS_SCL_LOW_TIMEOUT |
An SCL low time-out has occurred |
I2C_SLAVE_STATUS_REPEATED_START |
Indicates a repeated start, only valid if I2C_SLAVE_STATUS_ADDRESS_MATCH is set |
I2C_SLAVE_STATUS_RECEIVED_NACK |
The last data packet sent was not acknowledged |
I2C_SLAVE_STATUS_COLLISION |
The I2C slave was not able to transmit a high data or NACK bit |
I2C_SLAVE_STATUS_BUS_ERROR |
An illegal bus condition has occurred on the bus |