mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
cc3200: Fix extint_enable behaviour when the callback is updated.
This commit is contained in:
@@ -331,11 +331,15 @@ STATIC void pin_extint_enable (mp_obj_t self_in) {
|
|||||||
MAP_PRCMHibernateWakeupSourceDisable(hib_pin);
|
MAP_PRCMHibernateWakeupSourceDisable(hib_pin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if idx is invalid, the the pin supports active_idle interrupts for sure
|
// if idx is invalid, the the pin supports active interrupts for sure
|
||||||
if (idx >= PYBPIN_NUM_WAKE_PINS || pybpin_wake_pin[idx].active) {
|
if (idx >= PYBPIN_NUM_WAKE_PINS || pybpin_wake_pin[idx].active) {
|
||||||
MAP_GPIOIntClear(self->port, self->bit);
|
MAP_GPIOIntClear(self->port, self->bit);
|
||||||
MAP_GPIOIntEnable(self->port, self->bit);
|
MAP_GPIOIntEnable(self->port, self->bit);
|
||||||
}
|
}
|
||||||
|
// in case in was enabled before
|
||||||
|
else if (idx < PYBPIN_NUM_WAKE_PINS && !pybpin_wake_pin[idx].active) {
|
||||||
|
MAP_GPIOIntDisable(self->port, self->bit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void pin_extint_disable (mp_obj_t self_in) {
|
STATIC void pin_extint_disable (mp_obj_t self_in) {
|
||||||
|
|||||||
Reference in New Issue
Block a user