cc2538/sys_ctrl/
emuovr.rs1#[doc = "Reader of register EMUOVR"]
2pub type R = crate::R<u32, super::EMUOVR>;
3#[doc = "Writer for register EMUOVR"]
4pub type W = crate::W<u32, super::EMUOVR>;
5#[doc = "Register EMUOVR `reset()`'s with value 0"]
6impl crate::ResetValue for super::EMUOVR {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `Reserved32`"]
14pub type RESERVED32_R = crate::R<u32, u32>;
15#[doc = "Write proxy for field `Reserved32`"]
16pub struct RESERVED32_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> RESERVED32_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u32) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x00ff_ffff << 8)) | (((value as u32) & 0x00ff_ffff) << 8);
24 self.w
25 }
26}
27#[doc = "Reader of field `ICEPICK_FORCE_CLOCK_CG`"]
28pub type ICEPICK_FORCE_CLOCK_CG_R = crate::R<bool, bool>;
29#[doc = "Write proxy for field `ICEPICK_FORCE_CLOCK_CG`"]
30pub struct ICEPICK_FORCE_CLOCK_CG_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> ICEPICK_FORCE_CLOCK_CG_W<'a> {
34 #[doc = r"Sets the field bit"]
35 #[inline(always)]
36 pub fn set_bit(self) -> &'a mut W {
37 self.bit(true)
38 }
39 #[doc = r"Clears the field bit"]
40 #[inline(always)]
41 pub fn clear_bit(self) -> &'a mut W {
42 self.bit(false)
43 }
44 #[doc = r"Writes raw bits to the field"]
45 #[inline(always)]
46 pub fn bit(self, value: bool) -> &'a mut W {
47 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
48 self.w
49 }
50}
51#[doc = "Reader of field `ICEPICK_FORCE_POWER_CG`"]
52pub type ICEPICK_FORCE_POWER_CG_R = crate::R<bool, bool>;
53#[doc = "Write proxy for field `ICEPICK_FORCE_POWER_CG`"]
54pub struct ICEPICK_FORCE_POWER_CG_W<'a> {
55 w: &'a mut W,
56}
57impl<'a> ICEPICK_FORCE_POWER_CG_W<'a> {
58 #[doc = r"Sets the field bit"]
59 #[inline(always)]
60 pub fn set_bit(self) -> &'a mut W {
61 self.bit(true)
62 }
63 #[doc = r"Clears the field bit"]
64 #[inline(always)]
65 pub fn clear_bit(self) -> &'a mut W {
66 self.bit(false)
67 }
68 #[doc = r"Writes raw bits to the field"]
69 #[inline(always)]
70 pub fn bit(self, value: bool) -> &'a mut W {
71 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
72 self.w
73 }
74}
75#[doc = "Reader of field `ICEPICK_INHIBIT_SLEEP_CG`"]
76pub type ICEPICK_INHIBIT_SLEEP_CG_R = crate::R<bool, bool>;
77#[doc = "Write proxy for field `ICEPICK_INHIBIT_SLEEP_CG`"]
78pub struct ICEPICK_INHIBIT_SLEEP_CG_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> ICEPICK_INHIBIT_SLEEP_CG_W<'a> {
82 #[doc = r"Sets the field bit"]
83 #[inline(always)]
84 pub fn set_bit(self) -> &'a mut W {
85 self.bit(true)
86 }
87 #[doc = r"Clears the field bit"]
88 #[inline(always)]
89 pub fn clear_bit(self) -> &'a mut W {
90 self.bit(false)
91 }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
96 self.w
97 }
98}
99#[doc = "Reader of field `ICEMELTER_WKUP_CG`"]
100pub type ICEMELTER_WKUP_CG_R = crate::R<bool, bool>;
101#[doc = "Write proxy for field `ICEMELTER_WKUP_CG`"]
102pub struct ICEMELTER_WKUP_CG_W<'a> {
103 w: &'a mut W,
104}
105impl<'a> ICEMELTER_WKUP_CG_W<'a> {
106 #[doc = r"Sets the field bit"]
107 #[inline(always)]
108 pub fn set_bit(self) -> &'a mut W {
109 self.bit(true)
110 }
111 #[doc = r"Clears the field bit"]
112 #[inline(always)]
113 pub fn clear_bit(self) -> &'a mut W {
114 self.bit(false)
115 }
116 #[doc = r"Writes raw bits to the field"]
117 #[inline(always)]
118 pub fn bit(self, value: bool) -> &'a mut W {
119 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
120 self.w
121 }
122}
123#[doc = "Reader of field `ICEPICK_FORCE_CLOCK_PM`"]
124pub type ICEPICK_FORCE_CLOCK_PM_R = crate::R<bool, bool>;
125#[doc = "Write proxy for field `ICEPICK_FORCE_CLOCK_PM`"]
126pub struct ICEPICK_FORCE_CLOCK_PM_W<'a> {
127 w: &'a mut W,
128}
129impl<'a> ICEPICK_FORCE_CLOCK_PM_W<'a> {
130 #[doc = r"Sets the field bit"]
131 #[inline(always)]
132 pub fn set_bit(self) -> &'a mut W {
133 self.bit(true)
134 }
135 #[doc = r"Clears the field bit"]
136 #[inline(always)]
137 pub fn clear_bit(self) -> &'a mut W {
138 self.bit(false)
139 }
140 #[doc = r"Writes raw bits to the field"]
141 #[inline(always)]
142 pub fn bit(self, value: bool) -> &'a mut W {
143 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
144 self.w
145 }
146}
147#[doc = "Reader of field `ICEPICK_FORCE_POWER_PM`"]
148pub type ICEPICK_FORCE_POWER_PM_R = crate::R<bool, bool>;
149#[doc = "Write proxy for field `ICEPICK_FORCE_POWER_PM`"]
150pub struct ICEPICK_FORCE_POWER_PM_W<'a> {
151 w: &'a mut W,
152}
153impl<'a> ICEPICK_FORCE_POWER_PM_W<'a> {
154 #[doc = r"Sets the field bit"]
155 #[inline(always)]
156 pub fn set_bit(self) -> &'a mut W {
157 self.bit(true)
158 }
159 #[doc = r"Clears the field bit"]
160 #[inline(always)]
161 pub fn clear_bit(self) -> &'a mut W {
162 self.bit(false)
163 }
164 #[doc = r"Writes raw bits to the field"]
165 #[inline(always)]
166 pub fn bit(self, value: bool) -> &'a mut W {
167 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
168 self.w
169 }
170}
171#[doc = "Reader of field `ICEPICK_INHIBIT_SLEEP_PM`"]
172pub type ICEPICK_INHIBIT_SLEEP_PM_R = crate::R<bool, bool>;
173#[doc = "Write proxy for field `ICEPICK_INHIBIT_SLEEP_PM`"]
174pub struct ICEPICK_INHIBIT_SLEEP_PM_W<'a> {
175 w: &'a mut W,
176}
177impl<'a> ICEPICK_INHIBIT_SLEEP_PM_W<'a> {
178 #[doc = r"Sets the field bit"]
179 #[inline(always)]
180 pub fn set_bit(self) -> &'a mut W {
181 self.bit(true)
182 }
183 #[doc = r"Clears the field bit"]
184 #[inline(always)]
185 pub fn clear_bit(self) -> &'a mut W {
186 self.bit(false)
187 }
188 #[doc = r"Writes raw bits to the field"]
189 #[inline(always)]
190 pub fn bit(self, value: bool) -> &'a mut W {
191 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
192 self.w
193 }
194}
195#[doc = "Reader of field `ICEMELTER_WKUP_PM`"]
196pub type ICEMELTER_WKUP_PM_R = crate::R<bool, bool>;
197#[doc = "Write proxy for field `ICEMELTER_WKUP_PM`"]
198pub struct ICEMELTER_WKUP_PM_W<'a> {
199 w: &'a mut W,
200}
201impl<'a> ICEMELTER_WKUP_PM_W<'a> {
202 #[doc = r"Sets the field bit"]
203 #[inline(always)]
204 pub fn set_bit(self) -> &'a mut W {
205 self.bit(true)
206 }
207 #[doc = r"Clears the field bit"]
208 #[inline(always)]
209 pub fn clear_bit(self) -> &'a mut W {
210 self.bit(false)
211 }
212 #[doc = r"Writes raw bits to the field"]
213 #[inline(always)]
214 pub fn bit(self, value: bool) -> &'a mut W {
215 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
216 self.w
217 }
218}
219impl R {
220 #[doc = "Bits 8:31 - 31:8\\] Unused. This register is 8 bits in a 32-bit address space."]
221 #[inline(always)]
222 pub fn reserved32(&self) -> RESERVED32_R {
223 RESERVED32_R::new(((self.bits >> 8) & 0x00ff_ffff) as u32)
224 }
225 #[doc = "Bit 7 - 7:7\\] ICEPick 'Force Active' clock gate override bit. 'Force Active' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
226 #[inline(always)]
227 pub fn icepick_force_clock_cg(&self) -> ICEPICK_FORCE_CLOCK_CG_R {
228 ICEPICK_FORCE_CLOCK_CG_R::new(((self.bits >> 7) & 0x01) != 0)
229 }
230 #[doc = "Bit 6 - 6:6\\] ICEPick 'Force Power' clock gate override bit. 'Force Power' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
231 #[inline(always)]
232 pub fn icepick_force_power_cg(&self) -> ICEPICK_FORCE_POWER_CG_R {
233 ICEPICK_FORCE_POWER_CG_R::new(((self.bits >> 6) & 0x01) != 0)
234 }
235 #[doc = "Bit 5 - 5:5\\] ICEPick 'Inhibit Sleep' clock gate override bit. 'Inhibit Sleep' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
236 #[inline(always)]
237 pub fn icepick_inhibit_sleep_cg(&self) -> ICEPICK_INHIBIT_SLEEP_CG_R {
238 ICEPICK_INHIBIT_SLEEP_CG_R::new(((self.bits >> 5) & 0x01) != 0)
239 }
240 #[doc = "Bit 4 - 4:4\\] ICEMelter 'WAKEUPEMU' clock gate override bit. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings"]
241 #[inline(always)]
242 pub fn icemelter_wkup_cg(&self) -> ICEMELTER_WKUP_CG_R {
243 ICEMELTER_WKUP_CG_R::new(((self.bits >> 4) & 0x01) != 0)
244 }
245 #[doc = "Bit 3 - 3:3\\] ICEPick 'Force Active' power mode override bit. 'Force Active' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
246 #[inline(always)]
247 pub fn icepick_force_clock_pm(&self) -> ICEPICK_FORCE_CLOCK_PM_R {
248 ICEPICK_FORCE_CLOCK_PM_R::new(((self.bits >> 3) & 0x01) != 0)
249 }
250 #[doc = "Bit 2 - 2:2\\] ICEPick 'Force Power' power mode override bit. 'Force Power' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
251 #[inline(always)]
252 pub fn icepick_force_power_pm(&self) -> ICEPICK_FORCE_POWER_PM_R {
253 ICEPICK_FORCE_POWER_PM_R::new(((self.bits >> 2) & 0x01) != 0)
254 }
255 #[doc = "Bit 1 - 1:1\\] ICEPick 'Inhibit Sleep' power mode override bit. 'Inhibit Sleep' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
256 #[inline(always)]
257 pub fn icepick_inhibit_sleep_pm(&self) -> ICEPICK_INHIBIT_SLEEP_PM_R {
258 ICEPICK_INHIBIT_SLEEP_PM_R::new(((self.bits >> 1) & 0x01) != 0)
259 }
260 #[doc = "Bit 0 - 0:0\\] ICEMelter 'WAKEUPEMU' power mode override bit. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
261 #[inline(always)]
262 pub fn icemelter_wkup_pm(&self) -> ICEMELTER_WKUP_PM_R {
263 ICEMELTER_WKUP_PM_R::new((self.bits & 0x01) != 0)
264 }
265}
266impl W {
267 #[doc = "Bits 8:31 - 31:8\\] Unused. This register is 8 bits in a 32-bit address space."]
268 #[inline(always)]
269 pub fn reserved32(&mut self) -> RESERVED32_W {
270 RESERVED32_W { w: self }
271 }
272 #[doc = "Bit 7 - 7:7\\] ICEPick 'Force Active' clock gate override bit. 'Force Active' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
273 #[inline(always)]
274 pub fn icepick_force_clock_cg(&mut self) -> ICEPICK_FORCE_CLOCK_CG_W {
275 ICEPICK_FORCE_CLOCK_CG_W { w: self }
276 }
277 #[doc = "Bit 6 - 6:6\\] ICEPick 'Force Power' clock gate override bit. 'Force Power' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
278 #[inline(always)]
279 pub fn icepick_force_power_cg(&mut self) -> ICEPICK_FORCE_POWER_CG_W {
280 ICEPICK_FORCE_POWER_CG_W { w: self }
281 }
282 #[doc = "Bit 5 - 5:5\\] ICEPick 'Inhibit Sleep' clock gate override bit. 'Inhibit Sleep' is an ICEPick command. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings."]
283 #[inline(always)]
284 pub fn icepick_inhibit_sleep_cg(&mut self) -> ICEPICK_INHIBIT_SLEEP_CG_W {
285 ICEPICK_INHIBIT_SLEEP_CG_W { w: self }
286 }
287 #[doc = "Bit 4 - 4:4\\] ICEMelter 'WAKEUPEMU' clock gate override bit. 1 --> In non-sleep power mode, peripherals clocks are forced to follow RCG* register settings. It forces CM3 clocks on. 0 --> Does not affect the peripheral clock settings"]
288 #[inline(always)]
289 pub fn icemelter_wkup_cg(&mut self) -> ICEMELTER_WKUP_CG_W {
290 ICEMELTER_WKUP_CG_W { w: self }
291 }
292 #[doc = "Bit 3 - 3:3\\] ICEPick 'Force Active' power mode override bit. 'Force Active' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
293 #[inline(always)]
294 pub fn icepick_force_clock_pm(&mut self) -> ICEPICK_FORCE_CLOCK_PM_W {
295 ICEPICK_FORCE_CLOCK_PM_W { w: self }
296 }
297 #[doc = "Bit 2 - 2:2\\] ICEPick 'Force Power' power mode override bit. 'Force Power' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
298 #[inline(always)]
299 pub fn icepick_force_power_pm(&mut self) -> ICEPICK_FORCE_POWER_PM_W {
300 ICEPICK_FORCE_POWER_PM_W { w: self }
301 }
302 #[doc = "Bit 1 - 1:1\\] ICEPick 'Inhibit Sleep' power mode override bit. 'Inhibit Sleep' is an ICEPick command. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
303 #[inline(always)]
304 pub fn icepick_inhibit_sleep_pm(&mut self) -> ICEPICK_INHIBIT_SLEEP_PM_W {
305 ICEPICK_INHIBIT_SLEEP_PM_W { w: self }
306 }
307 #[doc = "Bit 0 - 0:0\\] ICEMelter 'WAKEUPEMU' power mode override bit. 1 --> Prohibit the system to go into any power down modes. Keeps the emulator attached. 0 --> Does not override any power mode settings from SYSREGS and does not prohibit system to go into any power down modes."]
308 #[inline(always)]
309 pub fn icemelter_wkup_pm(&mut self) -> ICEMELTER_WKUP_PM_W {
310 ICEMELTER_WKUP_PM_W { w: self }
311 }
312}