From 1af8bbcd7922638868bb3a5645202b83d3e5ee49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCha=20=C3=9Cn=C3=BCvar?= <87157627+phycrax@users.noreply.github.com> Date: Sun, 20 Sep 2026 17:49:10 +0800 Subject: [PATCH 1/6] revert breaking change and test --- embedded-storage-async/Cargo.toml | 2 +- embedded-storage-async/src/nor_flash.rs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/embedded-storage-async/Cargo.toml b/embedded-storage-async/Cargo.toml index fa2446f..7ba83e8 100644 --- a/embedded-storage-async/Cargo.toml +++ b/embedded-storage-async/Cargo.toml @@ -19,4 +19,4 @@ keywords = ["storage"] categories = ["embedded", "hardware-support", "no-std"] [dependencies] -embedded-storage = { version = "0.3.1", path = "../" } +embedded-storage = "0.3.1" diff --git a/embedded-storage-async/src/nor_flash.rs b/embedded-storage-async/src/nor_flash.rs index b353fdf..2e4952d 100644 --- a/embedded-storage-async/src/nor_flash.rs +++ b/embedded-storage-async/src/nor_flash.rs @@ -103,15 +103,17 @@ impl Page { size, } } -} -impl Region for Page { - fn start(&self) -> u32 { - self.start + /// The end address of the page + const fn end(&self) -> u32 { + self.start + self.size as u32 } +} - fn end(&self) -> u32 { - self.start + self.size as u32 +impl Region for Page { + /// Checks if an address offset is contained within the page + fn contains(&self, address: u32) -> bool { + (self.start <= address) && (self.end() > address) } } From 3a26752042c6d4ac1a4abb300268434b86f91cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCha=20=C3=9Cn=C3=BCvar?= <87157627+phycrax@users.noreply.github.com> Date: Sun, 20 Sep 2026 18:06:46 +0800 Subject: [PATCH 2/6] add missing doc --- embedded-storage-async/src/nor_flash.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/embedded-storage-async/src/nor_flash.rs b/embedded-storage-async/src/nor_flash.rs index 2e4952d..46782d2 100644 --- a/embedded-storage-async/src/nor_flash.rs +++ b/embedded-storage-async/src/nor_flash.rs @@ -117,7 +117,8 @@ impl Region for Page { } } -/// +/// Adapter that adapts a [`NorFlash`] as a generic [`Storage`] by performing +/// RMW operations. #[derive(Debug)] pub struct RmwNorFlashStorage<'a, S> { storage: S, @@ -195,7 +196,8 @@ where } } -/// +/// Adapter that adapts a [`MultiwriteNorFlash`] as a generic [`Storage`] by +/// performing RMW operations, avoiding erases where possible. pub struct RmwMultiwriteNorFlashStorage<'a, S> { storage: S, merge_buffer: &'a mut [u8], From 3425e3d4d31ef24c3293749c471910859c7f4701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCha=20=C3=9Cn=C3=BCvar?= <87157627+phycrax@users.noreply.github.com> Date: Sun, 20 Sep 2026 18:07:54 +0800 Subject: [PATCH 3/6] prep release async v0.4.2 --- embedded-storage-async/CHANGELOG.md | 9 +++++++-- embedded-storage-async/Cargo.toml | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/embedded-storage-async/CHANGELOG.md b/embedded-storage-async/CHANGELOG.md index c5f210f..1bfe713 100644 --- a/embedded-storage-async/CHANGELOG.md +++ b/embedded-storage-async/CHANGELOG.md @@ -7,8 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased -- Add RMW helpers for Nor flashes, implementing `Storage` trait. +## [0.4.2] - 2026-09-20 + +- Add async `ReadStorage` and `Storage` traits. +- Add `RmwNorFlashStorage` and `RmwMultiwriteNorFlashStorage` helpers for Nor flashes, implementing `Storage` trait. - Let `&mut` `MultiwriteNorFlash` implement `MultiwriteNorFlash`. +- Use stable Rust with MSRV 1.75. ## [0.4.1] - 2023-11-28 @@ -26,7 +30,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Initial release to crates.io. -[Unreleased]: https://github.com/rust-embedded-community/embedded-storage/compare/embedded-storage-async-v0.4.1...HEAD +[Unreleased]: https://github.com/rust-embedded-community/embedded-storage/compare/embedded-storage-async-v0.4.2...HEAD +[0.4.2]: https://github.com/rust-embedded-community/embedded-storage/compare/embedded-storage-async-v0.4.1...embedded-storage-async-v0.4.2 [0.4.1]: https://github.com/rust-embedded-community/embedded-storage/compare/embedded-storage-async-v0.4.0...embedded-storage-async-v0.4.1 [0.4.0]: https://github.com/rust-embedded-community/embedded-storage/compare/embedded-storage-async-v0.3.0...embedded-storage-async-v0.4.0 [0.3.0]: https://github.com/rust-embedded-community/embedded-storage/releases/tag/embedded-storage-async-v0.3.0 diff --git a/embedded-storage-async/Cargo.toml b/embedded-storage-async/Cargo.toml index 7ba83e8..b699c37 100644 --- a/embedded-storage-async/Cargo.toml +++ b/embedded-storage-async/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "embedded-storage-async" -version = "0.4.1" +version = "0.4.2" authors = [ "Mathias Koch ", "Ulf Lilleengen ", @@ -19,4 +19,4 @@ keywords = ["storage"] categories = ["embedded", "hardware-support", "no-std"] [dependencies] -embedded-storage = "0.3.1" +embedded-storage = { version = "0.3.1" } From 7a1d810ebbd6fb1629e13d0dd57f346ee6ed049d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCha=20=C3=9Cn=C3=BCvar?= <87157627+phycrax@users.noreply.github.com> Date: Sun, 20 Sep 2026 18:48:35 +0800 Subject: [PATCH 4/6] revert path change --- embedded-storage-async/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-storage-async/Cargo.toml b/embedded-storage-async/Cargo.toml index b699c37..5f9cd4d 100644 --- a/embedded-storage-async/Cargo.toml +++ b/embedded-storage-async/Cargo.toml @@ -19,4 +19,4 @@ keywords = ["storage"] categories = ["embedded", "hardware-support", "no-std"] [dependencies] -embedded-storage = { version = "0.3.1" } +embedded-storage = { version = "0.3.1", path = "../" } \ No newline at end of file From 6cc923da8c409a6e1effec2bfa2921ff97505b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=BCha=20=C3=9Cn=C3=BCvar?= <87157627+phycrax@users.noreply.github.com> Date: Sun, 20 Sep 2026 20:46:44 +0800 Subject: [PATCH 5/6] keep diff cleaner --- embedded-storage-async/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embedded-storage-async/Cargo.toml b/embedded-storage-async/Cargo.toml index 5f9cd4d..848ebd3 100644 --- a/embedded-storage-async/Cargo.toml +++ b/embedded-storage-async/Cargo.toml @@ -19,4 +19,4 @@ keywords = ["storage"] categories = ["embedded", "hardware-support", "no-std"] [dependencies] -embedded-storage = { version = "0.3.1", path = "../" } \ No newline at end of file +embedded-storage = { version = "0.3.1", path = "../" } From 7a365f8e1c98c9f1a8e78b53e895e0590e36e279 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Sun, 20 Sep 2026 15:52:46 +0200 Subject: [PATCH 6/6] Bump versions & update changelogs --- embedded-storage/CHANGELOG.md | 5 ++++- embedded-storage/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/embedded-storage/CHANGELOG.md b/embedded-storage/CHANGELOG.md index 5d9bec5..d1d5b67 100644 --- a/embedded-storage/CHANGELOG.md +++ b/embedded-storage/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +## [0.3.2] - 2026-09-20 + - Let `&mut` `MultiwriteNorFlash` implement `MultiwriteNorFlash`. ## [0.3.1] - 2023-12-04 @@ -29,7 +31,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Initial release to crates.io. -[Unreleased]: https://github.com/rust-embedded-community/embedded-storage/compare/v0.3.1...HEAD +[Unreleased]: https://github.com/rust-embedded-community/embedded-storage/compare/v0.3.2...HEAD +[0.3.2]: https://github.com/rust-embedded-community/embedded-storage/releases/tag/v0.3.2 [0.3.1]: https://github.com/rust-embedded-community/embedded-storage/releases/tag/v0.3.1 [0.3.0]: https://github.com/rust-embedded-community/embedded-storage/releases/tag/v0.3.0 [0.2.0]: https://github.com/rust-embedded-community/embedded-storage/releases/tag/v0.2.0 diff --git a/embedded-storage/Cargo.toml b/embedded-storage/Cargo.toml index 1123f78..1added5 100644 --- a/embedded-storage/Cargo.toml +++ b/embedded-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "embedded-storage" -version = "0.3.1" +version = "0.3.2" authors = [ "Mathias Koch ", ]