tweedegolf / sequential-storage

A crate for storing data in flash memory with minimal need for erasing pages
Apache License 2.0
97 stars 9 forks source link

Support for non-bytewise reads #1

Closed katyo closed 9 months ago

katyo commented 1 year ago

As I see only bytewise read supported for now.

https://github.com/tweedegolf/sequential-storage/blob/00857858f5ee82d2a74946c2be89b5a25feeb635/src/lib.rs#L30

Any chance to overcome this limitation?

diondokter commented 1 year ago

Hi! I'm open to suggestions. Theoretically it could support bigger minimum reads. But it would be at the cost of some efficiency and code complexity.

What chip do you want to use this with?

katyo commented 1 year ago

I implemented NOR Flash API for esp-storage. By design ESP supports only wordwise reads, where machine word is a 32bit length values. Currently I implemented bytewise read as an optional feature which is emulated via wordwise of course. I tested it with this crate and it works pretty fine. But I still have some doubts.