1 parent 181fe50 commit 005a7f4Copy full SHA for 005a7f4
1 file changed
cc3200/mods/pybpin.c
@@ -331,11 +331,15 @@ STATIC void pin_extint_enable (mp_obj_t self_in) {
331
MAP_PRCMHibernateWakeupSourceDisable(hib_pin);
332
}
333
334
- // 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
335
if (idx >= PYBPIN_NUM_WAKE_PINS || pybpin_wake_pin[idx].active) {
336
MAP_GPIOIntClear(self->port, self->bit);
337
MAP_GPIOIntEnable(self->port, self->bit);
338
339
+ // in case in was enabled before
340
+ else if (idx < PYBPIN_NUM_WAKE_PINS && !pybpin_wake_pin[idx].active) {
341
+ MAP_GPIOIntDisable(self->port, self->bit);
342
+ }
343
344
345
STATIC void pin_extint_disable (mp_obj_t self_in) {
0 commit comments