summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/extint.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r--stmhal/extint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/extint.c b/stmhal/extint.c
index 40254ac4dd..cda393ed8a 100644
--- a/stmhal/extint.c
+++ b/stmhal/extint.c
@@ -31,7 +31,7 @@
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
-#include "py/pfenv.h"
+#include MICROPY_HAL_H
#include "pin.h"
#include "extint.h"
@@ -296,9 +296,9 @@ STATIC mp_obj_t extint_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_
return self;
}
-STATIC void extint_obj_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
+STATIC void extint_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
extint_obj_t *self = self_in;
- print(env, "<ExtInt line=%u>", self->line);
+ mp_printf(print, "<ExtInt line=%u>", self->line);
}
STATIC const mp_map_elem_t extint_locals_dict_table[] = {
@@ -356,7 +356,7 @@ void Handle_EXTI_Irq(uint32_t line) {
*cb = mp_const_none;
extint_disable(line);
printf("Uncaught exception in ExtInt interrupt handler line %lu\n", line);
- mp_obj_print_exception(printf_wrapper, NULL, (mp_obj_t)nlr.ret_val);
+ mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
}
gc_unlock();
}