X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmax136x%2FHplMAX136xLogicP.nc;h=d17091d57724661cba7f9b4fb395a5adbcf5d770;hb=337d0b13acf569c2640b3ed7b7f5c7cec35d7ddd;hp=a4fc0d8a18490a810e7380d9abacfe0ce1c577af;hpb=1a329382c4f4556fd52d85f4e3f4a67e54911682;p=tinyos-2.x.git diff --git a/tos/chips/max136x/HplMAX136xLogicP.nc b/tos/chips/max136x/HplMAX136xLogicP.nc index a4fc0d8a..d17091d5 100644 --- a/tos/chips/max136x/HplMAX136xLogicP.nc +++ b/tos/chips/max136x/HplMAX136xLogicP.nc @@ -48,6 +48,7 @@ generic module HplMAX136xLogicP(uint16_t devAddr) uses interface I2CPacket; 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) {