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 f63d0c0 + 14c5e90 commit cf262c9Copy full SHA for cf262c9
src/peripheral/scb.rs
@@ -580,3 +580,21 @@ impl SCB {
580
::asm::isb();
581
}
582
583
+
584
+const SCB_SCR_SLEEPDEEP: u32 = 0x1 << 2;
585
586
+impl SCB {
587
+ /// Set the SLEEPDEEP bit in the SCR register
588
+ pub fn set_sleepdeep(&mut self) {
589
+ unsafe {
590
+ self.scr.modify(|scr| scr | SCB_SCR_SLEEPDEEP);
591
+ }
592
593
594
+ /// Clear the SLEEPDEEP bit in the SCR register
595
+ pub fn clear_sleepdeep(&mut self) {
596
597
+ self.scr.modify(|scr| scr & !SCB_SCR_SLEEPDEEP);
598
599
600
+}
0 commit comments