irqhandler.h: bugfix mask_user_IRQ mutex
This commit is contained in:
parent
ddaf15d61f
commit
1117dc5520
@ -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())
|
||||
return 1; // failure
|
||||
if (I2C_MUTEX_LOCK()) {
|
||||
xTaskNotify(irqHandlerTask, MASK_IRQ, eSetBits);
|
||||
return 0;
|
||||
} else
|
||||
return 1; // failure
|
||||
}
|
||||
|
||||
int unmask_user_IRQ() {
|
||||
// end of time critical section: release I2C bus
|
||||
I2C_MUTEX_UNLOCK();
|
||||
xTaskNotify(irqHandlerTask, UNMASK_IRQ, eSetBits);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user