18.6.3.3.1 Function i2c_slave_write_packet_wait()

Writes a packet to the master.

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

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

Table 18-16. Parameters
Data directionParameter nameDescription

[in]

module

Pointer to software module structure

[in]

packet

Packet to write to master

Returns

Status of packet write.

Table 18-17. Return Values
Return valueDescription

STATUS_OK

Packet was written successfully

STATUS_ERR_DENIED

Start condition not received, another interrupt flag is set

STATUS_ERR_IO

There was an error in the previous transfer

STATUS_ERR_BAD_FORMAT

Master wants to write data

STATUS_ERR_INVALID_ARG

Invalid argument(s) was provided

STATUS_ERR_BUSY

The I2C module is busy with a job

STATUS_ERR_ERR_OVERFLOW

Master NACKed before entire packet was transferred

STATUS_ERR_TIMEOUT

No response was given within the timeout period