summaryrefslogtreecommitdiffstatshomepage
path: root/stm
diff options
context:
space:
mode:
Diffstat (limited to 'stm')
-rw-r--r--stm/main.c3
-rw-r--r--stm/pybmodule.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/stm/main.c b/stm/main.c
index 6ad3111276..44be4d348c 100644
--- a/stm/main.c
+++ b/stm/main.c
@@ -24,6 +24,7 @@
#include "lexerfatfs.h"
#include "parse.h"
#include "obj.h"
+#include "objmodule.h"
#include "parsehelper.h"
#include "compile.h"
#include "runtime0.h"
@@ -273,7 +274,7 @@ soft_reset:
rt_store_name(MP_QSTR_open, rt_make_function_n(2, pyb_io_open));
// load the pyb module
- mp_obj_module_register(MP_QSTR_pyb, (mp_obj_t)&pyb_module);
+ mp_module_register(MP_QSTR_pyb, (mp_obj_t)&pyb_module);
// check if user switch held (initiates reset of filesystem)
bool reset_filesystem = false;
diff --git a/stm/pybmodule.c b/stm/pybmodule.c
index ed705af73d..fde61b513d 100644
--- a/stm/pybmodule.c
+++ b/stm/pybmodule.c
@@ -181,7 +181,8 @@ STATIC mp_obj_t pyb_standby(void) {
MP_DEFINE_CONST_FUN_OBJ_0(pyb_standby_obj, pyb_standby);
STATIC mp_obj_t pyb_hid_send_report(mp_obj_t arg) {
- mp_obj_t *items = mp_obj_get_array_fixed_n(arg, 4);
+ mp_obj_t *items;
+ mp_obj_get_array_fixed_n(arg, 4, &items);
uint8_t data[4];
data[0] = mp_obj_get_int(items[0]);
data[1] = mp_obj_get_int(items[1]);