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 1. Parameters
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.

Table 2. Return Values
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