summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modpybpin.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-25 19:28:12 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-25 19:31:17 +0300
commit6d103b65482d8dc1d688fcfd59b3400ebfbe0f0f (patch)
treedc407b8c1aaeb9ac5d85f1110be7c487972cf275 /esp8266/modpybpin.c
parent104aa26271d38fc6204fcee6d65044716e4dae31 (diff)
downloadmicropython-6d103b65482d8dc1d688fcfd59b3400ebfbe0f0f.tar.gz
micropython-6d103b65482d8dc1d688fcfd59b3400ebfbe0f0f.zip
py: Move call_function_*_protected() functions to py/ for reuse.
They almost certainly needed by any C code which calls Python callbacks.
Diffstat (limited to 'esp8266/modpybpin.c')
-rw-r--r--esp8266/modpybpin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/esp8266/modpybpin.c b/esp8266/modpybpin.c
index a65911cbd1..ca2b87d935 100644
--- a/esp8266/modpybpin.c
+++ b/esp8266/modpybpin.c
@@ -37,7 +37,6 @@
#include "py/runtime.h"
#include "py/gc.h"
#include "modpyb.h"
-#include "utils.h"
#define GET_TRIGGER(phys_port) \
GPIO_PIN_INT_TYPE_GET(GPIO_REG_READ(GPIO_PIN_ADDR(phys_port)))
@@ -105,7 +104,7 @@ void pin_intr_handler(uint32_t status) {
if (status & 1) {
mp_obj_t handler = MP_STATE_PORT(pin_irq_handler)[p];
if (handler != MP_OBJ_NULL) {
- call_function_1_protected(handler, MP_OBJ_FROM_PTR(&pyb_pin_obj[p]));
+ mp_call_function_1_protected(handler, MP_OBJ_FROM_PTR(&pyb_pin_obj[p]));
}
}
}