hello everyone.
if i want to write something onto the flash memory via adl_flhWrite() i need the id where i want to save it.
Since the module goes out every know and then (which is intended) i need to know the next free id, where i can save some information, without overriding something.
since the size of the objects isn´t fix, i can´t just do int nextId = (sizeOfFlash - adl_flhGetFreeMem()) / sizeOf(someThing); to get it.
adl_flhGetIDCount returns the number of avaiable ids (which is 5120 in my case), but not the next free one.
with adl_flhExist() i can check if a specific id is used or free.
ofcause i could write into the very first field, what the next free id should be. But this doesn´t feel like a good solution, since flash has only a limited amount of write/erease calls.
so, is there another way then guessing the next free id with adl_flhExist() to get the next free id?