summaryrefslogtreecommitdiffstatshomepage
path: root/ports/stm32/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-11-27 22:47:05 +1100
committerDamien George <damien.p.george@gmail.com>2019-11-27 22:47:05 +1100
commitba5e4841ecdfc83b6473bf4c5d1725c6069c6567 (patch)
tree43e2b409050af220afc4eeb22f61d51569c18564 /ports/stm32/main.c
parent11c22430d4efe7eb8c87163faaae647b1e99abf8 (diff)
downloadmicropython-ba5e4841ecdfc83b6473bf4c5d1725c6069c6567.tar.gz
micropython-ba5e4841ecdfc83b6473bf4c5d1725c6069c6567.zip
stm32/main: Fix auto creation of pyb.Flash on boot with kw-only args.
Diffstat (limited to 'ports/stm32/main.c')
-rw-r--r--ports/stm32/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index e2b3f3c361..8cb6ed1e3b 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -222,8 +222,8 @@ MP_NOINLINE STATIC bool init_flash_fs(uint reset_mode) {
if (len != -1) {
// Detected a littlefs filesystem so create correct block device for it
- mp_obj_t args[] = { MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_NEW_SMALL_INT(len) };
- bdev = pyb_flash_type.make_new(&pyb_flash_type, 2, 0, args);
+ mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR_len), MP_OBJ_NEW_SMALL_INT(len) };
+ bdev = pyb_flash_type.make_new(&pyb_flash_type, 0, 1, args);
}
#endif