You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework: Enum typename considering name in enumeratedValues
This pull request is a rework to #612; it only considers enumeration name
other than writer structure and reader structure. Names to those two
proxy structures are yet to be discussed.
svd2rust has a good mechanism to parse enumeratedValues into Rust enums.
However, current code would pick name of the first field the enum resides,
and use `pub type` to re-export it into other names.
SVD files provide `name` field in enumeratedValues, this commit make use of
them to name the Rust enums it generated.
After this commit, more information of SVD file is considered in output pac crate.
Users may also discover a significant drop in amount of types, which will speed up
rustdoc generation and crate compilation.
This commit is tested on deriving enum from other peripherals and
registers, and it uses old convention of format! macro to match the
1.51.0 minimum supported Rust version.
0 commit comments