Skip to content

Commit 290f6f2

Browse files
committed
Enable critical-section by default
The new svd2rust code needs `critical-section` for implementing the `Peripherals::take()` function. This means almost all uses of `avr-device` will need it as well. Rename the `critical-section-impl` feature to just `critical-section` and make it a part of the crate's default features.
1 parent f2605f4 commit 290f6f2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ avr64du32 = ["device-selected"]
8282
avr64du28 = ["device-selected"]
8383
rt = ["avr-device-macros"]
8484

85-
critical-section-impl = ["critical-section/restore-state-u8"]
85+
critical-section = ["critical-section/restore-state-u8"]
86+
87+
default = ["critical-section"]
8688

8789
# Unfortunately, we can only build documentation for a subset of the supported
8890
# MCUs on docs.rs. If you think a very popular chip is missing from the list,

src/interrupt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ where
235235
}
236236
}
237237

238-
#[cfg(feature = "critical-section-impl")]
238+
#[cfg(feature = "critical-section")]
239239
mod cs {
240240
use critical_section::RawRestoreState;
241241

0 commit comments

Comments
 (0)