How to use EZUSB_WriteI2C( ) to write word addressed registers. The first parameter for the above function is BYTE addr; But I need to configure a register whose address is word like 0x3070. How can I use function EZUSB_WriteI2C to write word addressed register?
Doesn't the datasheet for your I2C device tell you how to send the address?
The interface of EZUSB_WriteI2C() is,
BOOL EZUSB_WriteI2C(BYTE addr, BYTE length, BYTE xdata *dat);
The first argument, addr, is Device address of the EEPROM, 0x50 - 0x57 (LSB 3bits are determined by the A0-A2 pins of the EEPROM chip).
The Word address bytes are placed at the beginning of the "dat" buffer in MSB first, followed by data bytes. length argument should have data size + 2, for the word address.
Tsuneo