17.6.3.3.8 Function i2c_master_write_byte()

Write one byte data to slave.

enum status_code i2c_master_write_byte( struct i2c_master_module *const module, uint8_t byte)

Table 17-28. Parameters
Data directionParameter nameDescription

[in, out]

module

Pointer to software module struct

[in]

byte

Send one byte data to slave

Returns

Status of writing byte.

Table 17-29. Return Values
Return valueDescription

STATUS_OK

One byte was write 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