mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +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:
parent
9f53aa13d1
commit
a3792d94dc
2 changed files with 9 additions and 2 deletions
|
@ -116,6 +116,13 @@ DRESULT disk_ioctl (
|
||||||
void *buff /* Buffer to send/receive control data */
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define FF_MIN_SS 512
|
#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,
|
/* 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
|
/ 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
|
/ harddisk. But a larger value may be required for on-board flash memory and some
|
||||||
|
|
Loading…
Reference in a new issue