Skip to content

Commit cdd9f30

Browse files
committed
cpu/native: extend flashpage API
1 parent 4fa25af commit cdd9f30

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cpu/native/periph/flashpage.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,13 @@ void flashpage_write(void *target_addr, const void *data, size_t len)
6161

6262
_flash_write(target_addr, data, len);
6363
}
64+
65+
unsigned flashpage_first_free(void)
66+
{
67+
return flashpage_page(&_native_flash[0]);
68+
}
69+
70+
unsigned flashpage_last_free(void)
71+
{
72+
return flashpage_page(&_native_flash[FLASHPAGE_SIZE * FLASHPAGE_NUMOF - 1]);
73+
}

0 commit comments

Comments
 (0)