summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2021-01-04 15:47:06 -0600
committerGitHub <noreply@github.com>2021-01-04 15:47:06 -0600
commit76e9f495c744153f10f40992a04256bf8770184b (patch)
tree548142ea70d26eb69fd5d3560b2800f297f8098b /py
parent9c14593d623181e7b1eb5f5358869977befc1d74 (diff)
parentf6f1ef7dc26f9e253f09d48a8ec822a2f5e805fb (diff)
Merge pull request #37 from adafruit/main
update from adafruit main
Diffstat (limited to 'py')
-rw-r--r--py/circuitpy_defns.mk1
-rw-r--r--py/obj.c8
-rw-r--r--py/vm.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk
index 94f8ba42e..d6d192a95 100644
--- a/py/circuitpy_defns.mk
+++ b/py/circuitpy_defns.mk
@@ -311,6 +311,7 @@ SRC_COMMON_HAL_ALL = \
alarm/__init__.c \
alarm/pin/PinAlarm.c \
alarm/time/TimeAlarm.c \
+ alarm/touch/TouchAlarm.c \
analogio/AnalogIn.c \
analogio/AnalogOut.c \
analogio/__init__.c \
diff --git a/py/obj.c b/py/obj.c
index b6462641c..5f19089e8 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -29,6 +29,7 @@
#include <stdarg.h>
#include <assert.h>
+#include "lib/utils/interrupt_char.h"
#include "py/obj.h"
#include "py/objtype.h"
#include "py/objint.h"
@@ -67,7 +68,12 @@ void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t
#ifdef RUN_BACKGROUND_TASKS
RUN_BACKGROUND_TASKS;
#endif
- mp_handle_pending();
+ #if MICROPY_KBD_EXCEPTION
+ // Stop printing if we've been interrupted.
+ if (mp_hal_is_interrupted()) {
+ return;
+ }
+ #endif
#ifndef NDEBUG
if (o_in == MP_OBJ_NULL) {
diff --git a/py/vm.c b/py/vm.c
index 9b3354b09..13a9980aa 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -1015,7 +1015,7 @@ unwind_jump:;
}
#endif
SET_TOP(mp_call_method_n_kw(unum & 0xff, (unum >> 8) & 0xff, sp));
- DISPATCH();
+ DISPATCH_WITH_PEND_EXC_CHECK();
}
ENTRY(MP_BC_CALL_METHOD_VAR_KW): {