Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-RtosI2cDriver by
Diff: I2CDriver.cpp
- Revision:
- 11:8c1d44595620
- Parent:
- 10:e3d6c92ff222
- Child:
- 13:530968937ccb
diff -r e3d6c92ff222 -r 8c1d44595620 I2CDriver.cpp
--- a/I2CDriver.cpp Wed May 08 19:22:45 2013 +0000
+++ b/I2CDriver.cpp Thu May 09 20:52:07 2013 +0000
@@ -24,7 +24,7 @@
else error("I2CDriver: Invalid I2C pins selected\n");
if(s_channels[channel]==0) {
- new Thread(threadFun,(void *)channel,osPriorityRealtime,512); // evillive
+ new Thread(threadFun,(void *)channel,osPriorityRealtime,1024); // evillive
}
m_channel = s_channels[channel];
}
@@ -79,12 +79,9 @@
tr.ret = i2cRtos_read(&i2c, tr.adr, tr.dta, tr.len, (tr.rep?0:1));
break;
case READ_MST_REG:
- //printf("drv00\n");
tr.ret = i2cRtos_write(&i2c, tr.adr,(const char*)&(tr.reg), 1, 0);
- //printf("drv01\n");
if(tr.ret)break; // error => bail out
tr.ret = i2cRtos_read(&i2c, tr.adr, tr.dta, tr.len, (tr.rep?0:1));
- //printf("drv02\n");
break;
case READ_SLV:
tr.ret = i2cRtos_slave_read(&i2c, tr.dta, tr.len);
@@ -119,7 +116,7 @@
m_callerID = osThreadGetId();
m_callerPrio = osThreadGetPriority(m_callerID);
m_channel->mutex.lock(osWaitForever);
- osThreadSetPriority(m_callerID, c_drvPrio); // hopefully not interrupted since the lock
+ osThreadSetPriority(m_callerID, c_drvPrio); // evillive hopefully not interrupted since the lock
}
void I2CDriver::unlock()
