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)

Table 17-26. Parameters
Data directionParameter nameDescription

[in, out]

module

Pointer to software module struct

[out]

byte

Read one byte data to slave

Returns

Status of reading byte.

Table 17-27. Return Values
Return valueDescription

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