1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/native: select MTD defaults for FAT

The FAT file system makes some strong assumptions about sector and
block size that are not met by the default native MTD emulation.

To avoid this trip hazard, change the native MTD defaults when FAT is
used.
This commit is contained in:
Benjamin Valentin 2022-02-14 15:10:12 +01:00
parent ec0df56b67
commit 5f1dda0eda

View File

@ -60,11 +60,19 @@ void _native_LED_RED_TOGGLE(void);
* @{
*/
#ifndef MTD_PAGE_SIZE
#ifdef MODULE_FATFS
#define MTD_PAGE_SIZE (512)
#else
#define MTD_PAGE_SIZE (256)
#endif
#endif
#ifndef MTD_SECTOR_SIZE
#ifdef MODULE_FATFS
#define MTD_SECTOR_SIZE (512)
#else
#define MTD_SECTOR_SIZE (4096)
#endif
#endif
#ifndef MTD_SECTOR_NUM
#define MTD_SECTOR_NUM (2048)
#endif