summaryrefslogtreecommitdiff
path: root/stmhal/sdcard.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-30 13:02:10 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-30 13:02:10 +1100
commita52635245491214a6fe92dc357ff214bd6ff8892 (patch)
tree858639c1b2bc49056ae945be6778fc88876f2ea2 /stmhal/sdcard.c
parent220abca311063e736489adb675c18a25ff725932 (diff)
stmhal: Set the FatFs partition number when initialising VFS object.
stmhal has MULTI_PARTITION enabled for FatFs and so these values need to be initialised.
Diffstat (limited to 'stmhal/sdcard.c')
-rw-r--r--stmhal/sdcard.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c
index b1d67f62a..f4ad98504 100644
--- a/stmhal/sdcard.c
+++ b/stmhal/sdcard.c
@@ -447,6 +447,7 @@ void sdcard_init_vfs(fs_user_mount_t *vfs) {
vfs->base.type = &mp_fat_vfs_type;
vfs->flags |= FSUSER_NATIVE | FSUSER_HAVE_IOCTL;
vfs->fatfs.drv = vfs;
+ vfs->fatfs.part = 0; // autodetect partition
vfs->readblocks[0] = (mp_obj_t)&pyb_sdcard_readblocks_obj;
vfs->readblocks[1] = (mp_obj_t)&pyb_sdcard_obj;
vfs->readblocks[2] = (mp_obj_t)sdcard_read_blocks; // native version