18.6.3.3.2 Function i2c_slave_read_packet_wait()

Reads a packet from the master.

enum status_code i2c_slave_read_packet_wait( struct i2c_slave_module *const module, struct i2c_slave_packet *const packet)

Reads a packet from the master. This will wait for the master to issue a request.

Table 18-18. Parameters
Data directionParameter nameDescription

[in]

module

Pointer to software module structure

[out]

packet

Packet to read from master

Returns

Status of packet read.

Table 18-19. Return Values
Return valueDescription

STATUS_OK

Packet was read successfully

STATUS_ABORTED

Master sent stop condition or repeated start before specified length of bytes was received

STATUS_ERR_IO

There was an error in the previous transfer

STATUS_ERR_DENIED

Start condition not received, another interrupt flag is set

STATUS_ERR_INVALID_ARG

Invalid argument(s) was provided

STATUS_ERR_BUSY

The I2C module is busy with a job

STATUS_ERR_BAD_FORMAT

Master wants to read data

STATUS_ERR_ERR_OVERFLOW

Last byte received overflows buffer