microzig icon indicating copy to clipboard operation
microzig copied to clipboard

Flash driver interface

Open Copper280z opened this issue 7 months ago • 2 comments

Here's the start of a driver interface for flash memory, modeled roughly on the datagram device. Right now I'm implementing it as erasing/writing sectors only, and reading at an arbitrary offset.

I'm open to some bikeshedding on this, I think it mostly does what I was after when I wrote it, but it's definitely incomplete from a library perspective.

Copper280z avatar Jun 10 '25 13:06 Copper280z

Perhaps we can put more specific interfaces not under base but under a flash namespace (in this case)?

tact1m4n3 avatar Jun 16 '25 16:06 tact1m4n3

Looks like the rebase fixed the linter errors.

Perhaps we can put more specific interfaces not under base but under a flash namespace (in this case)?

I don't have a strong opinion about location in the tree, but I'm also not sure what level of abstraction is appropriate. It's labeled "flash" right now, and the main goal when writing it was a basic, consistent interface to MCU internal flash since I was working on a bootloader, but it could really represent just about any nonvolatile memory.

Copper280z avatar Jun 23 '25 11:06 Copper280z