]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/max136x/HplMAX136xLogicP.nc
Swapping HEAD and DEVEL branches
[tinyos-2.x.git] / tos / chips / max136x / HplMAX136xLogicP.nc
index a4fc0d8a18490a810e7380d9abacfe0ce1c577af..d17091d57724661cba7f9b4fb395a5adbcf5d770 100644 (file)
@@ -48,6 +48,7 @@ generic module HplMAX136xLogicP(uint16_t devAddr)
 
   uses interface I2CPacket<TI2CBasicAddr>;
   uses interface GpioInterrupt as InterruptAlert;
+  uses interface GeneralIO as InterruptPin;
 }
 
 implementation {
@@ -124,6 +125,8 @@ implementation {
   }
 
   command error_t Init.init() {
+    call InterruptPin.makeInput();
+    call InterruptAlert.enableFallingEdge();
     atomic {
       mStopRequested = FALSE;
       mState = STATE_STOPPED;
@@ -177,7 +180,6 @@ implementation {
   }
 
   async event void I2CPacket.readDone(error_t i2c_error, uint16_t chipAddr, uint8_t len, uint8_t *buf) {
-    uint16_t tempVal;
     error_t error = i2c_error;
 
     switch (mState) {