summaryrefslogtreecommitdiff
path: root/esp8266/esp_mphal.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-15 17:45:36 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-20 15:20:26 +1100
commit1b7d67266df7dd0853698726e98d63b4aeebe205 (patch)
tree59ef8880c23b1587585d5a6c4dce0fa21f708513 /esp8266/esp_mphal.c
parenta5159edc2090a5670c33a829d7e54ab2ba8635c4 (diff)
esp8266: Enable micropython.schedule() with locking in pin callback.
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r--esp8266/esp_mphal.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index f5e284fde..7ecc7776a 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -33,6 +33,7 @@
#include "ets_alt_task.h"
#include "py/obj.h"
#include "py/mpstate.h"
+#include "py/runtime.h"
#include "extmod/misc.h"
#include "lib/utils/pyexec.h"
@@ -130,11 +131,7 @@ void mp_hal_delay_ms(uint32_t delay) {
void ets_event_poll(void) {
ets_loop_iter();
- if (MP_STATE_VM(mp_pending_exception) != NULL) {
- mp_obj_t obj = MP_STATE_VM(mp_pending_exception);
- MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
- nlr_raise(obj);
- }
+ mp_handle_pending();
}
void __assert_func(const char *file, int line, const char *func, const char *expr) {