This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28374S: why design variable 'temp' like this in i2c_ex6

Part Number: TMS320F28374S
Other Parts Discussed in Thread: C2000WARE

Hi Team,

C:\ti\c2000\C2000Ware_5_00_00_00\driverlib\f2837xs\examples\cpu1\i2c, ex6

spracs8_Interfacing EEPROM Using PMBus in I2C Mode

1. 

'temp' is an unsigned 32 bits integer variable and stored the 'pControlAddr' and 'NumOfDataBytes' like below figure:

Why design the format like this? 16bits are enough to store the EEPROM's address, why put NumOfDataBytes together with it?

2. I can't find the part which transmit the data the pTX_MsgBuffer pointed. Could you please point it to us?

For example, in Example 1: EEPROM Byte WriteI2C_MasterTransmitter has been called in main.c line201. Then it called I2C_TransmitSlaveAddress_ControlBytes in i2cLib_FIFO_master_interrupt.c line177. After it put the EEPROM's address to transmit, it return SUCCESS. I don't find the pTX_MsgBuffer's handler.

--

Thanks & Regards

Yale