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)
| Data direction | Parameter name | Description |
|---|---|---|
|
[in, out] |
module |
Pointer to software module struct |
|
[in] |
byte |
Send one byte data to slave |
Returns
Status of writing byte.
| Return value | Description |
|---|---|
|
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 |
