aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/mpconfig.h7
-rw-r--r--py/scheduler.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 8e06153a8..f2754ddd1 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -1439,6 +1439,13 @@ typedef double mp_float_t;
#endif
/*****************************************************************************/
+/* Hooks for a port to wrap functions with attributes */
+
+#ifndef MICROPY_WRAP_MP_KEYBOARD_INTERRUPT
+#define MICROPY_WRAP_MP_KEYBOARD_INTERRUPT(f) f
+#endif
+
+/*****************************************************************************/
/* Miscellaneous settings */
// All uPy objects in ROM must be aligned on at least a 4 byte boundary
diff --git a/py/scheduler.c b/py/scheduler.c
index 250c85983..ca91e42da 100644
--- a/py/scheduler.c
+++ b/py/scheduler.c
@@ -29,7 +29,7 @@
#include "py/runtime.h"
#if MICROPY_KBD_EXCEPTION
-void mp_keyboard_interrupt(void) {
+void MICROPY_WRAP_MP_KEYBOARD_INTERRUPT(mp_keyboard_interrupt)(void) {
MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
#if MICROPY_ENABLE_SCHEDULER
if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) {