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/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ v0.22.2] - 2022-04-13
11
+
12
+ - Fix #579 2: support 1-element arrays
13
+
10
14
## [ v0.22.1] - 2022-04-05
11
15
12
16
- Fix #579
@@ -677,7 +681,8 @@ peripheral.register.write(|w| w.field().set());
677
681
678
682
- Initial version of the ` svd2rust ` tool
679
683
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
681
686
[ v0.22.1 ] : https://github.com/rust-embedded/svd2rust/compare/v0.22.0...v0.22.1
682
687
[ v0.22.0 ] : https://github.com/rust-embedded/svd2rust/compare/v0.21.0...v0.22.0
683
688
[ 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 = [
23
23
license = " MIT OR Apache-2.0"
24
24
name = " svd2rust"
25
25
repository = " https://github.com/rust-embedded/svd2rust/"
26
- version = " 0.22.1 "
26
+ version = " 0.22.2 "
27
27
readme = " README.md"
28
28
29
29
[package .metadata .deb ]
Original file line number Diff line number Diff line change @@ -713,7 +713,8 @@ fn expand_cluster(
713
713
accessors : None ,
714
714
} ) ,
715
715
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 ) ;
717
718
718
719
// if dimIndex exists, test if it is a sequence of numbers from 0 to dim
719
720
let sequential_indexes = array_info. dim_index . as_ref ( ) . map_or ( true , |dim_index| {
@@ -823,7 +824,8 @@ fn expand_register(
823
824
accessors : None ,
824
825
} ) ,
825
826
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 ) ;
827
829
828
830
// if dimIndex exists, test if it is a sequence of numbers from 0 to dim
829
831
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