uses interface I2CPacket<TI2CBasicAddr>;
uses interface GpioInterrupt as InterruptAlert;
+ uses interface GeneralIO as InterruptPin;
}
implementation {
}
command error_t Init.init() {
+ call InterruptPin.makeInput();
+ call InterruptAlert.enableFallingEdge();
atomic {
mStopRequested = FALSE;
mState = STATE_STOPPED;
}
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) {