|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I2C - Current Address Read
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); Does anyone have I2C code for Current Address Read? Start -> Address|1 -> Ack -> Data -> No Ack -> Stop |
|
#2
|
|||
|
|||
|
Re: I2C - Current Address Read
Quote:
So you want to read without sending the register address? If that is what you mean, you should be able to simply use the new "Transaction" entry-point in the I2C class and pass 0 for the sendSize. This was added in the update that came out today. -Joe |
|
#3
|
|||
|
|||
|
Re: I2C - Current Address Read
As usual, you are one step ahead. Thanks.
EDIT - any idea if/when the new sources will be posted at firstforge? Last edited by oddjob : 05-02-2010 at 06:35. |
|
#4
|
|||
|
|||
|
Re: I2C - Current Address Read
Quote:
|
|
#5
|
|||
|
|||
|
Re: I2C - Current Address Read
I was looking at the snapshot area, and the new source zip file didn't make it to there yet.
snapshot EDIT - there is a new release there, but it looks like it is the update patch, not the source zip file. Last edited by oddjob : 05-02-2010 at 11:59. |
|
#7
|
|||
|
|||
|
Re: I2C - Current Address Read
Whoops... just put up the team update... not the source... just a few more minutes.
|
|
#8
|
|||
|
|||
|
Re: I2C - Current Address Read
Sorry for the confusion... the source is now posted as a snapshot.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ADXL345 using I2C | tdidi | C/C++ | 1 | 29-01-2010 21:02 |
| i2c output | virtuald | Programming | 16 | 18-01-2009 19:20 |
| what I2C means? | matanost | General Forum | 6 | 11-12-2008 16:44 |
| I2C tutorials | John Gutmann | Electrical | 3 | 30-07-2005 10:44 |
| I2C? | John Gutmann | Electrical | 3 | 19-07-2005 22:52 |