8000 stm32/main: Fix auto creation of pyb.Flash on boot with kw-only args. · lvgl/lv_micropython@ba5e484 · GitHub
[go: up one dir, main page]

Skip to content 6601

Commit ba5e484

Browse files
committed
stm32/main: Fix auto creation of pyb.Flash on boot with kw-only args.
1 parent 11c2243 commit ba5e484

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/stm32/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ MP_NOINLINE STATIC bool init_flash_fs(uint reset_mode) {
222222

223223
if (len != -1) {
224224
// Detected a littlefs filesystem so create correct block device for it
225-
mp_obj_t args[] = { MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_NEW_SMALL_INT(len) };
226-
bdev = pyb_flash_type.make_new(&pyb_flash_type, 2, 0, args);
225+
mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR_len), MP_OBJ_NEW_SMALL_INT(len) };
226+
bdev = pyb_flash_type.make_new(&pyb_flash_type, 0, 1, args);
227227
}
228228

229229
#endif

0 commit comments

Comments
 (0)
0