]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Removed two atomic warnings from the DS2782 driver.
authorr-studio <r-studio>
Wed, 21 Apr 2010 14:02:17 +0000 (14:02 +0000)
committerr-studio <r-studio>
Wed, 21 Apr 2010 14:02:17 +0000 (14:02 +0000)
tos/chips/ds2782/HplDS2782LogicP.nc

index 4040cf6275c8faee39fbf427fc5aea33e1a92e7c..3061893373579b3398ec99344df075273e77c557 100644 (file)
@@ -224,7 +224,7 @@ implementation {
     tempVal = buf[0];
     tempVal = ((tempVal << 8) | buf[1]);
 
-    switch (mState) {
+    atomic switch (mState) {
       case STATE_READTEMP:
         signal HplDS2782.measureTemperatureDone(i2c_error,tempVal);
         break;
@@ -256,7 +256,7 @@ implementation {
   async event void I2CPacket.writeDone(error_t i2c_error, uint16_t chipAddr, uint8_t len, uint8_t *buf) {
     error_t error = i2c_error;
 
-    switch (mState) {
+    atomic switch (mState) {
       case STATE_SETCONFIG:
         call I2CResource.release();
         atomic mState = STATE_IDLE;