summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/extint.c2
-rw-r--r--ports/stm32/extint.h1
-rw-r--r--ports/stm32/rtc.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/ports/stm32/extint.c b/ports/stm32/extint.c
index df0ed6e23..b1e5c8a8f 100644
--- a/ports/stm32/extint.c
+++ b/ports/stm32/extint.c
@@ -127,7 +127,7 @@ static uint8_t pyb_extint_mode[EXTI_NUM_VECTORS];
static bool pyb_extint_hard_irq[EXTI_NUM_VECTORS];
// The callback arg is a small-int or a ROM Pin object, so no need to scan by GC
-static mp_obj_t pyb_extint_callback_arg[EXTI_NUM_VECTORS];
+mp_obj_t pyb_extint_callback_arg[EXTI_NUM_VECTORS];
#if !defined(ETH)
#define ETH_WKUP_IRQn 62 // Some MCUs don't have ETH, but we want a value to put in our table
diff --git a/ports/stm32/extint.h b/ports/stm32/extint.h
index 801dcf62b..cdebf6eb8 100644
--- a/ports/stm32/extint.h
+++ b/ports/stm32/extint.h
@@ -64,6 +64,7 @@
#endif
#define EXTI_NUM_VECTORS (PYB_EXTI_NUM_VECTORS)
+extern mp_obj_t pyb_extint_callback_arg[];
void extint_init0(void);
diff --git a/ports/stm32/rtc.c b/ports/stm32/rtc.c
index fa28fda6a..fb106e179 100644
--- a/ports/stm32/rtc.c
+++ b/ports/stm32/rtc.c
@@ -771,6 +771,7 @@ mp_obj_t pyb_rtc_wakeup(size_t n_args, const mp_obj_t *args) {
// set the callback
MP_STATE_PORT(pyb_extint_callback)[EXTI_RTC_WAKEUP] = callback;
+ pyb_extint_callback_arg[EXTI_RTC_WAKEUP] = MP_OBJ_NEW_SMALL_INT(EXTI_RTC_WAKEUP);
// disable register write protection
RTC->WPR = 0xca;