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

tests: Set a MTD write size of 1 wherever an MTD is mocked

This commit is contained in:
chrysn 2022-03-31 13:56:30 +02:00
parent 47148642f9
commit 38d0ec52d0
4 changed files with 7 additions and 0 deletions

View File

@ -115,6 +115,7 @@ static mtd_dev_t dev = {
.sector_count = SECTOR_COUNT,
.pages_per_sector = PAGE_PER_SECTOR,
.page_size = PAGE_SIZE,
.write_size = 1,
};
static mtd_dev_t *_dev = (mtd_dev_t*) &dev;

View File

@ -115,6 +115,7 @@ static mtd_dev_t dev = {
.sector_count = SECTOR_COUNT,
.pages_per_sector = PAGE_PER_SECTOR,
.page_size = PAGE_SIZE,
.write_size = 1,
};
static mtd_dev_t *_dev = (mtd_dev_t*) &dev;

View File

@ -112,6 +112,7 @@ static mtd_dev_t dev = {
.sector_count = SECTOR_COUNT,
.pages_per_sector = PAGE_PER_SECTOR,
.page_size = PAGE_SIZE,
.write_size = 1,
};
static mtd_dev_t *_dev = (mtd_dev_t*) &dev;

View File

@ -39,6 +39,9 @@
#ifndef PAGE_SIZE
#define PAGE_SIZE 128
#endif
#ifndef WRITE_SIZE
#define WRITE_SIZE 1
#endif
static uint8_t dummy_memory[PAGE_PER_SECTOR * PAGE_SIZE * SECTOR_COUNT];
@ -115,6 +118,7 @@ static mtd_dev_t _dev = {
.sector_count = SECTOR_COUNT,
.pages_per_sector = PAGE_PER_SECTOR,
.page_size = PAGE_SIZE,
.write_size = WRITE_SIZE,
};
static mtd_dev_t *dev = (mtd_dev_t*) &_dev;