We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b70a217 + f7f2555 commit db67186Copy full SHA for db67186
src/peripheral/scb.rs
@@ -596,6 +596,24 @@ impl SCB {
596
}
597
598
599
+const SCB_SCR_SLEEPONEXIT: u32 = 0x1 << 1;
600
+
601
+impl SCB {
602
+ /// Set the SLEEPONEXIT bit in the SCR register
603
+ pub fn set_sleeponexit(&mut self) {
604
+ unsafe {
605
+ self.scr.modify(|scr| scr | SCB_SCR_SLEEPONEXIT);
606
+ }
607
608
609
+ /// Clear the SLEEPONEXIT bit in the SCR register
610
+ pub fn clear_sleeponexit(&mut self) {
611
612
+ self.scr.modify(|scr| scr & !SCB_SCR_SLEEPONEXIT);
613
614
615
+}
616
617
const SCB_AIRCR_VECTKEY: u32 = 0x05FA << 16;
618
const SCB_AIRCR_PRIGROUP_MASK: u32 = 0x5 << 8;
619
const SCB_AIRCR_SYSRESETREQ: u32 = 1 << 2;
0 commit comments