File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
88## [ Unreleased]
99
10+ ## [ v0.22.2] - 2022-04-13
11+
12+ - Fix #579 2: support 1-element arrays
13+
1014## [ v0.22.1] - 2022-04-05
1115
1216- Fix #579
@@ -677,7 +681,8 @@ peripheral.register.write(|w| w.field().set());
677681
678682- Initial version of the ` svd2rust ` tool
679683
680- [ Unreleased ] : https://github.com/rust-embedded/svd2rust/compare/v0.22.1...HEAD
684+ [ Unreleased ] : https://github.com/rust-embedded/svd2rust/compare/v0.22.2...HEAD
685+ [ v0.22.2 ] : https://github.com/rust-embedded/svd2rust/compare/v0.22.1...v0.22.2
681686[ v0.22.1 ] : https://github.com/rust-embedded/svd2rust/compare/v0.22.0...v0.22.1
682687[ v0.22.0 ] : https://github.com/rust-embedded/svd2rust/compare/v0.21.0...v0.22.0
683688[ v0.21.0 ] : https://github.com/rust-embedded/svd2rust/compare/v0.20.0...v0.21.0
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ keywords = [
2323license = " MIT OR Apache-2.0"
2424name = " svd2rust"
2525repository = " https://github.com/rust-embedded/svd2rust/"
26- version = " 0.22.1 "
26+ version = " 0.22.2 "
2727readme = " README.md"
2828
2929[package .metadata .deb ]
Original file line number Diff line number Diff line change @@ -713,7 +713,8 @@ fn expand_cluster(
713713 accessors : None ,
714714 } ) ,
715715 Cluster :: Array ( info, array_info) => {
716- let sequential_addresses = cluster_size == array_info. dim_increment * BITS_PER_BYTE ;
716+ let sequential_addresses =
717+ ( array_info. dim == 1 ) || ( cluster_size == array_info. dim_increment * BITS_PER_BYTE ) ;
717718
718719 // if dimIndex exists, test if it is a sequence of numbers from 0 to dim
719720 let sequential_indexes = array_info. dim_index . as_ref ( ) . map_or ( true , |dim_index| {
@@ -823,7 +824,8 @@ fn expand_register(
823824 accessors : None ,
824825 } ) ,
825826 Register :: Array ( info, array_info) => {
826- let sequential_addresses = register_size == array_info. dim_increment * BITS_PER_BYTE ;
827+ let sequential_addresses = ( array_info. dim == 1 )
828+ || ( register_size == array_info. dim_increment * BITS_PER_BYTE ) ;
827829
828830 // if dimIndex exists, test if it is a sequence of numbers from 0 to dim
829831 let sequential_indexes = array_info. dim_index . as_ref ( ) . map_or ( true , |dim_index| {
You can’t perform that action at this time.
0 commit comments