The I2C library Read() code is
Code:
Synchronized sync(m_semaphore);
m_module->m_fpgaDIO->writeI2CConfig_Address(m_deviceAddress, &status);
m_module->m_fpgaDIO->writeI2CConfig_BytesToWrite(sizeof(registerAddress), &status);
m_module->m_fpgaDIO->writeI2CConfig_BytesToRead(count, &status);
m_module->m_fpgaDIO->writeI2CDataToSend(registerAddress, &status);
UINT8 transaction = m_module->m_fpgaDIO->readI2CStatus_Transaction(&status);
m_module->m_fpgaDIO->strobeI2CStart(&status);
while(transaction == m_module->m_fpgaDIO->readI2CStatus_Transaction(&status)) taskDelay(1);
while(!m_module->m_fpgaDIO->readI2CStatus_Done(&status)) taskDelay(1);
data = m_module->m_fpgaDIO->readI2CDataReceived(&status);
I'm not sure, but that appears to be a I2C Random Address Read protocol.
Does anyone have I2C code for Current Address Read?
Start -> Address|1 -> Ack -> Data -> No Ack -> Stop