Then at least users could choose different modules while using the same code - although obviously the eraseChip/erasePage stuff still needs to be exposed.
I'd like to expose Espruino's internal flash memory somehow too, and it'd be nice to use the same API for that. As it's got variable size pages, I wonder whether something like this might work:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, it'd be a really good idea to get it in - this totally slipped off my radar.
@Dennis, what do you think?
IMO it'd be nice if
read
andwrite
worked a bit like the AT24/AT25/DS2xxx modules though:Then at least users could choose different modules while using the same code - although obviously the eraseChip/erasePage stuff still needs to be exposed.
I'd like to expose Espruino's internal flash memory somehow too, and it'd be nice to use the same API for that. As it's got variable size pages, I wonder whether something like this might work:
In your case I guess:
That way it's relatively easy for code to see which page it needs to erase, and the same API should be transferrable to other flash memory.