1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-10 06:01:52 +00:00

[stage2] Support sector sizes up to 4K in FatFs.

Note: SD cards always have a sector size of 512 bytes.
This commit is contained in:
TuxSH 2018-05-13 20:51:57 +02:00
parent 9f53aa13d1
commit a3792d94dc
2 changed files with 9 additions and 2 deletions

View file

@ -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;
}
}

View file

@ -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