stm32: Fix broken build when FAT FS multi-partition is disabled.
This commit is contained in:
parent
97108fce57
commit
a93d9b8c2d
|
@ -866,7 +866,9 @@ void sdcard_init_vfs(fs_user_mount_t *vfs, int part) {
|
|||
vfs->base.type = &mp_fat_vfs_type;
|
||||
vfs->blockdev.flags |= MP_BLOCKDEV_FLAG_NATIVE | MP_BLOCKDEV_FLAG_HAVE_IOCTL;
|
||||
vfs->fatfs.drv = vfs;
|
||||
#if MICROPY_FATFS_MULTI_PARTITION
|
||||
vfs->fatfs.part = part;
|
||||
#endif
|
||||
vfs->blockdev.readblocks[0] = MP_OBJ_FROM_PTR(&pyb_sdcard_readblocks_obj);
|
||||
vfs->blockdev.readblocks[1] = MP_OBJ_FROM_PTR(&pyb_sdcard_obj);
|
||||
vfs->blockdev.readblocks[2] = MP_OBJ_FROM_PTR(sdcard_read_blocks); // native version
|
||||
|
|
|
@ -453,7 +453,9 @@ void pyb_flash_init_vfs(fs_user_mount_t *vfs) {
|
|||
vfs->base.type = &mp_fat_vfs_type;
|
||||
vfs->blockdev.flags |= MP_BLOCKDEV_FLAG_NATIVE | MP_BLOCKDEV_FLAG_HAVE_IOCTL;
|
||||
vfs->fatfs.drv = vfs;
|
||||
#if MICROPY_FATFS_MULTI_PARTITION
|
||||
vfs->fatfs.part = 1; // flash filesystem lives on first partition
|
||||
#endif
|
||||
vfs->blockdev.readblocks[0] = MP_OBJ_FROM_PTR(&pyb_flash_readblocks_obj);
|
||||
vfs->blockdev.readblocks[1] = MP_OBJ_FROM_PTR(&pyb_flash_obj);
|
||||
vfs->blockdev.readblocks[2] = MP_OBJ_FROM_PTR(storage_read_blocks); // native version
|
||||
|
|
Loading…
Reference in New Issue