Skip to content

Commit

Permalink
Merge pull request #796 from rust-embedded/Ux
Browse files Browse the repository at this point in the history
cargo doc constants generation
  • Loading branch information
Emilgardis authored Jan 4, 2024
2 parents 8e64fe0 + cd11fdf commit 6b14520
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

- Fix `cargo doc` constants generation

## [v0.31.4] - 2024-01-03

- Custom prefix/case/suffix for identifiers (by `svd2rust.toml` config file)
Expand Down
6 changes: 3 additions & 3 deletions src/generate/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ pub fn render_register_mod(
mod_items.extend(quote! {
#[doc = #doc]
impl crate::Writable for #regspec_ty {
const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = #zero_to_modify_fields_bitmap;
const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = #one_to_modify_fields_bitmap;
const ZERO_TO_MODIFY_FIELDS_BITMAP: #rty = #zero_to_modify_fields_bitmap;
const ONE_TO_MODIFY_FIELDS_BITMAP: #rty = #one_to_modify_fields_bitmap;
}
});
}
Expand All @@ -426,7 +426,7 @@ pub fn render_register_mod(
mod_items.extend(quote! {
#[doc = #doc]
impl crate::Resettable for #regspec_ty {
const RESET_VALUE: Self::Ux = #rv;
const RESET_VALUE: #rty = #rv;
}
});
}
Expand Down

0 comments on commit 6b14520

Please sign in to comment.