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

boards/native: Configure write_size in MTD device

This commit is contained in:
chrysn 2022-02-21 12:04:48 +01:00
parent 882f76ab01
commit 35b57af065
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ mtd_native_dev_t mtd0_dev = {
.sector_count = MTD_SECTOR_NUM,
.pages_per_sector = MTD_SECTOR_SIZE / MTD_PAGE_SIZE,
.page_size = MTD_PAGE_SIZE,
.write_size = MTD_WRITE_SIZE,
},
.fname = MTD_NATIVE_FILENAME,
};

View File

@ -76,6 +76,11 @@ void _native_LED_RED_TOGGLE(void);
#ifndef MTD_SECTOR_NUM
#define MTD_SECTOR_NUM (2048)
#endif
/** Advertised write size. While the file system backend supports single byte
* granularity, this can be increased to mimic other media. */
#ifndef MTD_WRITE_SIZE
#define MTD_WRITE_SIZE (1)
#endif
#ifndef MTD_NATIVE_FILENAME
#define MTD_NATIVE_FILENAME "MEMORY.bin"
#endif