Hi All,
This is a question about the AM335x I2C starterware code which reads the EEPROM.
I am able to read EEPROM in both interrupt and polling mode and it works fine.
The i2c0 EEPROM address (7 bit slave address is set to 0x50) in my code. But i'm not able to figure out where the READ/WRITE bit
is sent to i2c device. The code which sends the EEPROM address goes like this
/* Data Count specifies the number of bytes to be transmitted */
I2CSetDataCount(SOC_I2C_0_REGS, 0x02); //This is i2C EEPROM memory address
/* Configure I2C controller in Master Transmitter mode */
I2CMasterControl(SOC_I2C_0_REGS, I2C_CFG_MST_TX);
/* Transmit interrupt is enabled */
I2CMasterIntEnableEx(SOC_I2C_0_REGS, I2C_INT_TRANSMIT_READY);
/* Generate Start Condition over I2C bus */
I2CMasterStart(SOC_I2C_0_REGS);
So this code will send i2c Packet as follows
Start bit 7 Bit Slave Addres Read/Write Bit EEPROM address MSB EEPROM LSB....
I wonder how the Read/Write Bit is sent as per the above Code. I'm not able to figure out. Please suggest?
Regards,