diff --git a/src/irqhandler.cpp b/src/irqhandler.cpp index 9d8e6ec5..f95f6fe9 100644 --- a/src/irqhandler.cpp +++ b/src/irqhandler.cpp @@ -121,13 +121,16 @@ void IRAM_ATTR GpsIRQ() { int mask_user_IRQ() { // begin of time critical section: lock I2C bus to ensure accurate timing - if (!I2C_MUTEX_LOCK()) + if (I2C_MUTEX_LOCK()) { + xTaskNotify(irqHandlerTask, MASK_IRQ, eSetBits); + return 0; + } else return 1; // failure - xTaskNotify(irqHandlerTask, MASK_IRQ, eSetBits); } int unmask_user_IRQ() { // end of time critical section: release I2C bus I2C_MUTEX_UNLOCK(); xTaskNotify(irqHandlerTask, UNMASK_IRQ, eSetBits); -} + return 0; +} \ No newline at end of file