1
0
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:
Marian Buschsieweke 2024-02-23 14:06:38 +00:00 committed by GitHub
commit e4a64f2ada
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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;