rust-embedded-community / embedded-storage

An Embedded Storage Abstraction Layer
Apache License 2.0
68 stars 23 forks source link

BlockDevice trait #56

Open qwandor opened 3 months ago

qwandor commented 3 months ago

Hello, How would folks feel about the addition of a BlockDevice trait, something like the one from embedded_sdmmc? This would be a common interface between things like SD card drivers, VirtIO block devices and so on, and crates which provide filesystem implementations on top of a block device. Unlike the other traits in embedded-storage it would only allow access to whole blocks. It would also avoid the 4 GiB size limit the other traits have due to using u32 addresses.

I originally proposed this for the embedded-io crate, but they suggested that this crate might be a better fit. If this seems like a reasonable place for it I'm happy to send a PR to discuss the details.