diff --git a/fusee/fusee-secondary/src/lib/fatfs/diskio.c b/fusee/fusee-secondary/src/lib/fatfs/diskio.c index e81d44c47..98d0e7e2d 100644 --- a/fusee/fusee-secondary/src/lib/fatfs/diskio.c +++ b/fusee/fusee-secondary/src/lib/fatfs/diskio.c @@ -116,6 +116,13 @@ DRESULT disk_ioctl ( void *buff /* Buffer to send/receive control data */ ) { - return 0; + device_partition_t *devpart = g_volume_to_devparts[pdrv]; + switch (cmd) { + case GET_SECTOR_SIZE: + *(WORD *)buff = devpart != NULL ? (WORD)devpart->sector_size : 512; + return 0; + default: + return 0; + } } diff --git a/fusee/fusee-secondary/src/lib/fatfs/ffconf.h b/fusee/fusee-secondary/src/lib/fatfs/ffconf.h index c7d15edc2..78a3133ce 100644 --- a/fusee/fusee-secondary/src/lib/fatfs/ffconf.h +++ b/fusee/fusee-secondary/src/lib/fatfs/ffconf.h @@ -191,7 +191,7 @@ #define FF_MIN_SS 512 -#define FF_MAX_SS 512 +#define FF_MAX_SS 4096 /* This set of options configures the range of sector size to be supported. (512, / 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and / harddisk. But a larger value may be required for on-board flash memory and some