mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20425 from benpicco/tests/pkg/flashdb_fal_cfg
tests/pkg/flashdb_fal_cfg: abort test if no MTD device is configured
This commit is contained in:
commit
e4a64f2ada
@ -74,6 +74,8 @@ struct fal_flash_dev mtd_flash0 = {
|
||||
|
||||
void fdb_mtd_init(mtd_dev_t *mtd)
|
||||
{
|
||||
assert(mtd);
|
||||
|
||||
unsigned sector_size;
|
||||
if (_mtd) {
|
||||
return;
|
||||
|
@ -103,6 +103,11 @@ static fdb_time_t _get_time(void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (FDB_MTD == NULL) {
|
||||
puts("No MTD device configured for test, abort.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int init_failed;
|
||||
fdb_mtd_init(FDB_MTD);
|
||||
size_t size = FDB_MTD->pages_per_sector * FDB_MTD->page_size;
|
||||
|
Loading…
Reference in New Issue
Block a user