1.1.11.17 I2CSMBx_HostWriteWord Function

C

/* x = I2C SMBUS peripheral instance number */

/* I2C SMBUS Host mode */

void I2CSMBx_HostWriteWord(uint8_t address, uint8_t cmd, void* pWrdata)

Summary

Writes word data to the slave.

Description

This function forms a write word 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 1

wrBuffer[0] = 1;
wrBuffer[1] = 2;

I2CSMB0_HostWriteWord(I2C_SLAVE_ADDR, HOST_CMD_WRITE_WORD, wrBuffer);

Remarks

None