diff --git a/CHANGELOG-rust.md b/CHANGELOG-rust.md index 8af2dbd..3d68df1 100644 --- a/CHANGELOG-rust.md +++ b/CHANGELOG-rust.md @@ -5,6 +5,10 @@ This changelog tracks the Rust `svdtools` project. See ## [Unreleased] +## [v0.4.2] 2025-01-25 + +* Fix optional `fspec` in `set_field_modified_write_values` + ## [v0.4.1] 2025-01-21 * `html`: field `readAction` and `modifiedWriteValues` in `access` @@ -205,7 +209,8 @@ Other changes: * Initial release with feature-parity with the Python project. -[Unreleased]: https://github.com/rust-embedded/svdtools/compare/v0.4.1...HEAD +[Unreleased]: https://github.com/rust-embedded/svdtools/compare/v0.4.2...HEAD +[v0.4.2]: https://github.com/rust-embedded/svdtools/compare/v0.4.1...v0.4.2 [v0.4.1]: https://github.com/rust-embedded/svdtools/compare/v0.4.0...v0.4.1 [v0.4.0]: https://github.com/rust-embedded/svdtools/compare/v0.3.21...v0.4.0 [v0.3.21]: https://github.com/rust-embedded/svdtools/compare/v0.3.20...v0.3.21 diff --git a/Cargo.toml b/Cargo.toml index 918e623..c699e72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "svdtools" -version = "0.4.1" +version = "0.4.2" repository = "https://github.com/rust-embedded/svdtools/" description = "Tool for modifying bugs in CMSIS SVD" authors = ["Andrey Zgarbul ", "MarcoIeni"] diff --git a/src/patch/register.rs b/src/patch/register.rs index 9b62b26..36e08b7 100644 --- a/src/patch/register.rs +++ b/src/patch/register.rs @@ -711,12 +711,14 @@ impl RegisterExt for Register { } fn set_field_read_action(&mut self, fspec: &str, action: ReadAction) { + let (fspec, _) = fspec.spec(); for ftag in self.iter_fields(fspec) { ftag.read_action = Some(action); } } fn set_field_modified_write_values(&mut self, fspec: &str, mwv: ModifiedWriteValues) { + let (fspec, _) = fspec.spec(); for ftag in self.iter_fields(fspec) { ftag.modified_write_values = if mwv == ModifiedWriteValues::Modify { None