1.1.11.18 I2CSMBx_HostWriteByte Function
C
/* x = I2C SMBUS peripheral instance number */
/* I2C SMBUS Host mode */
void I2CSMBx_HostWriteByte(uint8_t address, uint8_t cmd, void* pWrdata)
Summary
Writes data to the slave.
Description
This function forms a write byte packet and initiates the transfer
Precondition
I2CSMBx_Initialize must have been called for the associated I2C instance.
Parameters
Param | Description |
---|---|
address | 7-bit / 10-bit slave address. |
cmd | command byte |
pWrdata | pointer to the buffer containing the data bytes |
Returns
None
Example
#define HOST_CMD_WRITE_BYTE 0 wrBuffer[0] = 1; I2CSMB0_HostWriteByte(I2C_SLAVE_ADDR, HOST_CMD_WRITE_BYTE, wrBuffer);
Remarks
None