From: r-studio Date: Wed, 21 Apr 2010 14:02:17 +0000 (+0000) Subject: Removed two atomic warnings from the DS2782 driver. X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=8282d7042d3f425061482530a8835d095c28096a;p=tinyos-2.x.git Removed two atomic warnings from the DS2782 driver. --- diff --git a/tos/chips/ds2782/HplDS2782LogicP.nc b/tos/chips/ds2782/HplDS2782LogicP.nc index 4040cf62..30618933 100644 --- a/tos/chips/ds2782/HplDS2782LogicP.nc +++ b/tos/chips/ds2782/HplDS2782LogicP.nc @@ -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;