Skip to content

Commit 9ddc065

Browse files
authored
Merge pull request #768 from rust-embedded/r031
release 0.31.0
2 parents c6fbca1 + 667764b commit 9ddc065

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.31.0] - 2023-11-24
11+
1012
- Use methods to access any register or cluster
1113
- Remove all deny lints from generated crate
1214
- Add `reexport-core-peripherals` and `reexport-interrupt` features disabled by default
13-
- ~~rename `const-generic` feature to `array_proxy`~~ remove `ArrayProxy`
15+
- remove `ArrayProxy` and `const_generic` feature
1416
- `FieldWriter` takes offset as struct field instead of const generic.
1517
Improves SVD field array access
1618
Add `width`, `offset` methods
@@ -835,7 +837,8 @@ peripheral.register.write(|w| w.field().set());
835837

836838
- Initial version of the `svd2rust` tool
837839

838-
[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.30.3...HEAD
840+
[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.31.0...HEAD
841+
[v0.31.0]: https://github.com/rust-embedded/svd2rust/compare/v0.30.3...v0.31.0
839842
[v0.30.3]: https://github.com/rust-embedded/svd2rust/compare/v0.30.2...v0.30.3
840843
[v0.30.2]: https://github.com/rust-embedded/svd2rust/compare/v0.30.1...v0.30.2
841844
[v0.30.1]: https://github.com/rust-embedded/svd2rust/compare/v0.30.0...v0.30.1

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ keywords = [
2323
license = "MIT OR Apache-2.0"
2424
name = "svd2rust"
2525
repository = "https://github.com/rust-embedded/svd2rust/"
26-
version = "0.30.3"
26+
version = "0.31.0"
2727
readme = "README.md"
2828
rust-version = "1.70"
2929

src/generate/interrupt.rs

+7
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,15 @@ pub fn render(
261261
(quote!(#[repr(u16)]), quote!(#self_token as u16))
262262
};
263263

264+
let defmt = config
265+
.impl_defmt
266+
.as_ref()
267+
.map(|feature| quote!(#[cfg_attr(feature = #feature, derive(defmt::Format))]));
268+
264269
if target == Target::Msp430 {
265270
let interrupt_enum = quote! {
266271
///Enumeration of all the interrupts. This enum is seldom used in application or library crates. It is present primarily for documenting the device's implemented interrupts.
272+
#defmt
267273
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
268274
#enum_repr
269275
pub enum Interrupt {
@@ -275,6 +281,7 @@ pub fn render(
275281
} else {
276282
let interrupt_enum = quote! {
277283
///Enumeration of all the interrupts.
284+
#defmt
278285
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
279286
#enum_repr
280287
pub enum Interrupt {

0 commit comments

Comments
 (0)