stm32wb_pac/pwr/
extscr.rs1#[doc = "Reader of register EXTSCR"]
2pub type R = crate::R<u32, super::EXTSCR>;
3#[doc = "Writer for register EXTSCR"]
4pub type W = crate::W<u32, super::EXTSCR>;
5#[doc = "Register EXTSCR `reset()`'s with value 0"]
6impl crate::ResetValue for super::EXTSCR {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `C2DS`"]
14pub type C2DS_R = crate::R<bool, bool>;
15#[doc = "Reader of field `C1DS`"]
16pub type C1DS_R = crate::R<bool, bool>;
17#[doc = "Reader of field `CRPF`"]
18pub type CRPF_R = crate::R<bool, bool>;
19#[doc = "Reader of field `C2STOPF`"]
20pub type C2STOPF_R = crate::R<bool, bool>;
21#[doc = "Reader of field `C2SBF`"]
22pub type C2SBF_R = crate::R<bool, bool>;
23#[doc = "Reader of field `C1STOPF`"]
24pub type C1STOPF_R = crate::R<bool, bool>;
25#[doc = "Reader of field `C1SBF`"]
26pub type C1SBF_R = crate::R<bool, bool>;
27#[doc = "Write proxy for field `CCRPF`"]
28pub struct CCRPF_W<'a> {
29 w: &'a mut W,
30}
31impl<'a> CCRPF_W<'a> {
32 #[doc = r"Sets the field bit"]
33 #[inline(always)]
34 pub fn set_bit(self) -> &'a mut W {
35 self.bit(true)
36 }
37 #[doc = r"Clears the field bit"]
38 #[inline(always)]
39 pub fn clear_bit(self) -> &'a mut W {
40 self.bit(false)
41 }
42 #[doc = r"Writes raw bits to the field"]
43 #[inline(always)]
44 pub fn bit(self, value: bool) -> &'a mut W {
45 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
46 self.w
47 }
48}
49#[doc = "Write proxy for field `C2CSSF`"]
50pub struct C2CSSF_W<'a> {
51 w: &'a mut W,
52}
53impl<'a> C2CSSF_W<'a> {
54 #[doc = r"Sets the field bit"]
55 #[inline(always)]
56 pub fn set_bit(self) -> &'a mut W {
57 self.bit(true)
58 }
59 #[doc = r"Clears the field bit"]
60 #[inline(always)]
61 pub fn clear_bit(self) -> &'a mut W {
62 self.bit(false)
63 }
64 #[doc = r"Writes raw bits to the field"]
65 #[inline(always)]
66 pub fn bit(self, value: bool) -> &'a mut W {
67 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
68 self.w
69 }
70}
71#[doc = "Write proxy for field `C1CSSF`"]
72pub struct C1CSSF_W<'a> {
73 w: &'a mut W,
74}
75impl<'a> C1CSSF_W<'a> {
76 #[doc = r"Sets the field bit"]
77 #[inline(always)]
78 pub fn set_bit(self) -> &'a mut W {
79 self.bit(true)
80 }
81 #[doc = r"Clears the field bit"]
82 #[inline(always)]
83 pub fn clear_bit(self) -> &'a mut W {
84 self.bit(false)
85 }
86 #[doc = r"Writes raw bits to the field"]
87 #[inline(always)]
88 pub fn bit(self, value: bool) -> &'a mut W {
89 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
90 self.w
91 }
92}
93impl R {
94 #[doc = "Bit 15 - CPU2 deepsleep mode"]
95 #[inline(always)]
96 pub fn c2ds(&self) -> C2DS_R {
97 C2DS_R::new(((self.bits >> 15) & 0x01) != 0)
98 }
99 #[doc = "Bit 14 - CPU1 deepsleep mode"]
100 #[inline(always)]
101 pub fn c1ds(&self) -> C1DS_R {
102 C1DS_R::new(((self.bits >> 14) & 0x01) != 0)
103 }
104 #[doc = "Bit 13 - Critical Radio system phase"]
105 #[inline(always)]
106 pub fn crpf(&self) -> CRPF_R {
107 CRPF_R::new(((self.bits >> 13) & 0x01) != 0)
108 }
109 #[doc = "Bit 11 - System Stop flag for CPU2"]
110 #[inline(always)]
111 pub fn c2stopf(&self) -> C2STOPF_R {
112 C2STOPF_R::new(((self.bits >> 11) & 0x01) != 0)
113 }
114 #[doc = "Bit 10 - System Standby flag for CPU2"]
115 #[inline(always)]
116 pub fn c2sbf(&self) -> C2SBF_R {
117 C2SBF_R::new(((self.bits >> 10) & 0x01) != 0)
118 }
119 #[doc = "Bit 9 - System Stop flag for CPU1"]
120 #[inline(always)]
121 pub fn c1stopf(&self) -> C1STOPF_R {
122 C1STOPF_R::new(((self.bits >> 9) & 0x01) != 0)
123 }
124 #[doc = "Bit 8 - System Standby flag for CPU1"]
125 #[inline(always)]
126 pub fn c1sbf(&self) -> C1SBF_R {
127 C1SBF_R::new(((self.bits >> 8) & 0x01) != 0)
128 }
129}
130impl W {
131 #[doc = "Bit 2 - Clear Critical Radio system phase"]
132 #[inline(always)]
133 pub fn ccrpf(&mut self) -> CCRPF_W {
134 CCRPF_W { w: self }
135 }
136 #[doc = "Bit 1 - Clear CPU2 Stop Standby flags"]
137 #[inline(always)]
138 pub fn c2cssf(&mut self) -> C2CSSF_W {
139 C2CSSF_W { w: self }
140 }
141 #[doc = "Bit 0 - Clear CPU1 Stop Standby flags"]
142 #[inline(always)]
143 pub fn c1cssf(&mut self) -> C1CSSF_W {
144 C1CSSF_W { w: self }
145 }
146}