17.6.3.3.7 Function i2c_master_read_byte()
Reads one byte data from slave.
enum status_code i2c_master_read_byte( struct i2c_master_module *const module, uint8_t * byte)
Data direction | Parameter name | Description |
---|---|---|
[in, out] |
module |
Pointer to software module struct |
[out] |
byte |
Read one byte data to slave |
Returns
Status of reading byte.
Return value | Description |
---|---|
STATUS_OK |
One byte was read successfully |
STATUS_ERR_TIMEOUT |
If no response was given within specified timeout period |
STATUS_ERR_DENIED |
If error on bus |
STATUS_ERR_PACKET_COLLISION |
If arbitration is lost |
STATUS_ERR_BAD_ADDRESS |
If slave is busy, or no slave acknowledged the address |