1#[doc = "Register `LDO_50_CTRL_0` reader"]
2pub struct R(crate::R<LDO_50_CTRL_0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<LDO_50_CTRL_0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<LDO_50_CTRL_0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<LDO_50_CTRL_0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `LDO_50_CTRL_0` writer"]
17pub struct W(crate::W<LDO_50_CTRL_0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<LDO_50_CTRL_0_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<LDO_50_CTRL_0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<LDO_50_CTRL_0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Used to disable LDO_30\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum DIS_A {
40 #[doc = "0: Enable LDO_50 output"]
41 ENABLE = 0,
42 #[doc = "1: Disable LDO_50 output"]
43 DISABLE = 1,
44}
45impl From<DIS_A> for bool {
46 #[inline(always)]
47 fn from(variant: DIS_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `DIS` reader - Used to disable LDO_30"]
52pub struct DIS_R(crate::FieldReader<bool, DIS_A>);
53impl DIS_R {
54 #[inline(always)]
55 pub(crate) fn new(bits: bool) -> Self {
56 DIS_R(crate::FieldReader::new(bits))
57 }
58 #[doc = r"Get enumerated values variant"]
59 #[inline(always)]
60 pub fn variant(&self) -> DIS_A {
61 match self.bits {
62 false => DIS_A::ENABLE,
63 true => DIS_A::DISABLE,
64 }
65 }
66 #[doc = "Checks if the value of the field is `ENABLE`"]
67 #[inline(always)]
68 pub fn is_enable(&self) -> bool {
69 **self == DIS_A::ENABLE
70 }
71 #[doc = "Checks if the value of the field is `DISABLE`"]
72 #[inline(always)]
73 pub fn is_disable(&self) -> bool {
74 **self == DIS_A::DISABLE
75 }
76}
77impl core::ops::Deref for DIS_R {
78 type Target = crate::FieldReader<bool, DIS_A>;
79 #[inline(always)]
80 fn deref(&self) -> &Self::Target {
81 &self.0
82 }
83}
84#[doc = "Field `DIS` writer - Used to disable LDO_30"]
85pub struct DIS_W<'a> {
86 w: &'a mut W,
87}
88impl<'a> DIS_W<'a> {
89 #[doc = r"Writes `variant` to the field"]
90 #[inline(always)]
91 pub fn variant(self, variant: DIS_A) -> &'a mut W {
92 self.bit(variant.into())
93 }
94 #[doc = "Enable LDO_50 output"]
95 #[inline(always)]
96 pub fn enable(self) -> &'a mut W {
97 self.variant(DIS_A::ENABLE)
98 }
99 #[doc = "Disable LDO_50 output"]
100 #[inline(always)]
101 pub fn disable(self) -> &'a mut W {
102 self.variant(DIS_A::DISABLE)
103 }
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W {
107 self.bit(true)
108 }
109 #[doc = r"Clears the field bit"]
110 #[inline(always)]
111 pub fn clear_bit(self) -> &'a mut W {
112 self.bit(false)
113 }
114 #[doc = r"Writes raw bits to the field"]
115 #[inline(always)]
116 pub fn bit(self, value: bool) -> &'a mut W {
117 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
118 self.w
119 }
120}
121#[doc = "Used to disable the power good comparator\n\nValue on reset: 0"]
122#[derive(Clone, Copy, Debug, PartialEq)]
123pub enum DISPG_A {
124 #[doc = "0: Enable LDO_50 power good comparator"]
125 ENABLE = 0,
126 #[doc = "1: Disable LDO_50 power good comparator"]
127 DISABLE = 1,
128}
129impl From<DISPG_A> for bool {
130 #[inline(always)]
131 fn from(variant: DISPG_A) -> Self {
132 variant as u8 != 0
133 }
134}
135#[doc = "Field `DISPG` reader - Used to disable the power good comparator"]
136pub struct DISPG_R(crate::FieldReader<bool, DISPG_A>);
137impl DISPG_R {
138 #[inline(always)]
139 pub(crate) fn new(bits: bool) -> Self {
140 DISPG_R(crate::FieldReader::new(bits))
141 }
142 #[doc = r"Get enumerated values variant"]
143 #[inline(always)]
144 pub fn variant(&self) -> DISPG_A {
145 match self.bits {
146 false => DISPG_A::ENABLE,
147 true => DISPG_A::DISABLE,
148 }
149 }
150 #[doc = "Checks if the value of the field is `ENABLE`"]
151 #[inline(always)]
152 pub fn is_enable(&self) -> bool {
153 **self == DISPG_A::ENABLE
154 }
155 #[doc = "Checks if the value of the field is `DISABLE`"]
156 #[inline(always)]
157 pub fn is_disable(&self) -> bool {
158 **self == DISPG_A::DISABLE
159 }
160}
161impl core::ops::Deref for DISPG_R {
162 type Target = crate::FieldReader<bool, DISPG_A>;
163 #[inline(always)]
164 fn deref(&self) -> &Self::Target {
165 &self.0
166 }
167}
168#[doc = "Field `DISPG` writer - Used to disable the power good comparator"]
169pub struct DISPG_W<'a> {
170 w: &'a mut W,
171}
172impl<'a> DISPG_W<'a> {
173 #[doc = r"Writes `variant` to the field"]
174 #[inline(always)]
175 pub fn variant(self, variant: DISPG_A) -> &'a mut W {
176 self.bit(variant.into())
177 }
178 #[doc = "Enable LDO_50 power good comparator"]
179 #[inline(always)]
180 pub fn enable(self) -> &'a mut W {
181 self.variant(DISPG_A::ENABLE)
182 }
183 #[doc = "Disable LDO_50 power good comparator"]
184 #[inline(always)]
185 pub fn disable(self) -> &'a mut W {
186 self.variant(DISPG_A::DISABLE)
187 }
188 #[doc = r"Sets the field bit"]
189 #[inline(always)]
190 pub fn set_bit(self) -> &'a mut W {
191 self.bit(true)
192 }
193 #[doc = r"Clears the field bit"]
194 #[inline(always)]
195 pub fn clear_bit(self) -> &'a mut W {
196 self.bit(false)
197 }
198 #[doc = r"Writes raw bits to the field"]
199 #[inline(always)]
200 pub fn bit(self, value: bool) -> &'a mut W {
201 self.w.bits =
202 (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
203 self.w
204 }
205}
206#[doc = "Configures the control for maximum expected current imax current (mA)\n\nValue on reset: 3"]
207#[derive(Clone, Copy, Debug, PartialEq)]
208#[repr(u8)]
209pub enum IMAX_A {
210 #[doc = "0: Configure the maximum current for LDO_50 as 50mA"]
211 MAX_50MA_CURRENT = 0,
212 #[doc = "1: Configure the maximum current for LDO_50 as 30mA"]
213 MAX_30MA_CURRENT = 1,
214 #[doc = "2: Configure the maximum current for LDO_50 as 20mA"]
215 MAX_20MA_CURRENT = 2,
216 #[doc = "3: Configure the maximum current for LDO_50 as 12mA (default)"]
217 MAX_12MA_CURRENT = 3,
218 #[doc = "4: Configure the maximum current for LDO_50 as 8mA"]
219 MAX_8MA_CURRENT = 4,
220 #[doc = "5: Configure the maximum current for LDO_50 as 4mA"]
221 MAX_4MA_CURRENT = 5,
222 #[doc = "6: Configure the maximum current for LDO_50 as 2mA"]
223 MAX_2MA_CURRENT = 6,
224 #[doc = "7: Configure the maximum current for LDO_50 as 1mA"]
225 MAX_1MA_CURRENT = 7,
226}
227impl From<IMAX_A> for u8 {
228 #[inline(always)]
229 fn from(variant: IMAX_A) -> Self {
230 variant as _
231 }
232}
233#[doc = "Field `IMAX` reader - Configures the control for maximum expected current imax current (mA)"]
234pub struct IMAX_R(crate::FieldReader<u8, IMAX_A>);
235impl IMAX_R {
236 #[inline(always)]
237 pub(crate) fn new(bits: u8) -> Self {
238 IMAX_R(crate::FieldReader::new(bits))
239 }
240 #[doc = r"Get enumerated values variant"]
241 #[inline(always)]
242 pub fn variant(&self) -> IMAX_A {
243 match self.bits {
244 0 => IMAX_A::MAX_50MA_CURRENT,
245 1 => IMAX_A::MAX_30MA_CURRENT,
246 2 => IMAX_A::MAX_20MA_CURRENT,
247 3 => IMAX_A::MAX_12MA_CURRENT,
248 4 => IMAX_A::MAX_8MA_CURRENT,
249 5 => IMAX_A::MAX_4MA_CURRENT,
250 6 => IMAX_A::MAX_2MA_CURRENT,
251 7 => IMAX_A::MAX_1MA_CURRENT,
252 _ => unreachable!(),
253 }
254 }
255 #[doc = "Checks if the value of the field is `MAX_50MA_CURRENT`"]
256 #[inline(always)]
257 pub fn is_max_50m_a_current(&self) -> bool {
258 **self == IMAX_A::MAX_50MA_CURRENT
259 }
260 #[doc = "Checks if the value of the field is `MAX_30MA_CURRENT`"]
261 #[inline(always)]
262 pub fn is_max_30m_a_current(&self) -> bool {
263 **self == IMAX_A::MAX_30MA_CURRENT
264 }
265 #[doc = "Checks if the value of the field is `MAX_20MA_CURRENT`"]
266 #[inline(always)]
267 pub fn is_max_20m_a_current(&self) -> bool {
268 **self == IMAX_A::MAX_20MA_CURRENT
269 }
270 #[doc = "Checks if the value of the field is `MAX_12MA_CURRENT`"]
271 #[inline(always)]
272 pub fn is_max_12m_a_current(&self) -> bool {
273 **self == IMAX_A::MAX_12MA_CURRENT
274 }
275 #[doc = "Checks if the value of the field is `MAX_8MA_CURRENT`"]
276 #[inline(always)]
277 pub fn is_max_8m_a_current(&self) -> bool {
278 **self == IMAX_A::MAX_8MA_CURRENT
279 }
280 #[doc = "Checks if the value of the field is `MAX_4MA_CURRENT`"]
281 #[inline(always)]
282 pub fn is_max_4m_a_current(&self) -> bool {
283 **self == IMAX_A::MAX_4MA_CURRENT
284 }
285 #[doc = "Checks if the value of the field is `MAX_2MA_CURRENT`"]
286 #[inline(always)]
287 pub fn is_max_2m_a_current(&self) -> bool {
288 **self == IMAX_A::MAX_2MA_CURRENT
289 }
290 #[doc = "Checks if the value of the field is `MAX_1MA_CURRENT`"]
291 #[inline(always)]
292 pub fn is_max_1m_a_current(&self) -> bool {
293 **self == IMAX_A::MAX_1MA_CURRENT
294 }
295}
296impl core::ops::Deref for IMAX_R {
297 type Target = crate::FieldReader<u8, IMAX_A>;
298 #[inline(always)]
299 fn deref(&self) -> &Self::Target {
300 &self.0
301 }
302}
303#[doc = "Field `IMAX` writer - Configures the control for maximum expected current imax current (mA)"]
304pub struct IMAX_W<'a> {
305 w: &'a mut W,
306}
307impl<'a> IMAX_W<'a> {
308 #[doc = r"Writes `variant` to the field"]
309 #[inline(always)]
310 pub fn variant(self, variant: IMAX_A) -> &'a mut W {
311 self.bits(variant.into())
312 }
313 #[doc = "Configure the maximum current for LDO_50 as 50mA"]
314 #[inline(always)]
315 pub fn max_50m_a_current(self) -> &'a mut W {
316 self.variant(IMAX_A::MAX_50MA_CURRENT)
317 }
318 #[doc = "Configure the maximum current for LDO_50 as 30mA"]
319 #[inline(always)]
320 pub fn max_30m_a_current(self) -> &'a mut W {
321 self.variant(IMAX_A::MAX_30MA_CURRENT)
322 }
323 #[doc = "Configure the maximum current for LDO_50 as 20mA"]
324 #[inline(always)]
325 pub fn max_20m_a_current(self) -> &'a mut W {
326 self.variant(IMAX_A::MAX_20MA_CURRENT)
327 }
328 #[doc = "Configure the maximum current for LDO_50 as 12mA (default)"]
329 #[inline(always)]
330 pub fn max_12m_a_current(self) -> &'a mut W {
331 self.variant(IMAX_A::MAX_12MA_CURRENT)
332 }
333 #[doc = "Configure the maximum current for LDO_50 as 8mA"]
334 #[inline(always)]
335 pub fn max_8m_a_current(self) -> &'a mut W {
336 self.variant(IMAX_A::MAX_8MA_CURRENT)
337 }
338 #[doc = "Configure the maximum current for LDO_50 as 4mA"]
339 #[inline(always)]
340 pub fn max_4m_a_current(self) -> &'a mut W {
341 self.variant(IMAX_A::MAX_4MA_CURRENT)
342 }
343 #[doc = "Configure the maximum current for LDO_50 as 2mA"]
344 #[inline(always)]
345 pub fn max_2m_a_current(self) -> &'a mut W {
346 self.variant(IMAX_A::MAX_2MA_CURRENT)
347 }
348 #[doc = "Configure the maximum current for LDO_50 as 1mA"]
349 #[inline(always)]
350 pub fn max_1m_a_current(self) -> &'a mut W {
351 self.variant(IMAX_A::MAX_1MA_CURRENT)
352 }
353 #[doc = r"Writes raw bits to the field"]
354 #[inline(always)]
355 pub fn bits(self, value: u8) -> &'a mut W {
356 self.w.bits =
357 (self.w.bits & !(0x07 << 2)) | ((value as u32 & 0x07) << 2);
358 self.w
359 }
360}
361#[doc = "Output voltage programming. Note: Please keep LDO_30_DI and LDO_50_DI to be equal values for proper operation and lower power consumption.\n\nValue on reset: 17"]
362#[derive(Clone, Copy, Debug, PartialEq)]
363#[repr(u8)]
364pub enum DI_A {
365 #[doc = "0: Configures the LDO_50 output voltage as 0.75v"]
366 AS_0_75V_OUTPUT = 0,
367 #[doc = "1: Configures the LDO_50 output voltage as 0.77v"]
368 AS_0_77V_OUTPUT = 1,
369 #[doc = "2: Configures the LDO_50 output voltage as 0.79v"]
370 AS_0_79V_OUTPUT = 2,
371 #[doc = "3: Configures the LDO_50 output voltage as 0.81v"]
372 AS_0_81V_OUTPUT = 3,
373 #[doc = "4: Configures the LDO_50 output voltage as 0.83v"]
374 AS_0_83V_OUTPUT = 4,
375 #[doc = "5: Configures the LDO_50 output voltage as 0.85v"]
376 AS_0_85V_OUTPUT = 5,
377 #[doc = "6: Configures the LDO_50 output voltage as 0.87v"]
378 AS_0_87V_OUTPUT = 6,
379 #[doc = "7: Configures the LDO_50 output voltage as 0.89v"]
380 AS_0_89V_OUTPUT = 7,
381 #[doc = "8: Configures the LDO_50 output voltage as 0.91v"]
382 AS_0_91V_OUTPUT = 8,
383 #[doc = "9: Configures the LDO_50 output voltage as 0.93v"]
384 AS_0_93V_OUTPUT = 9,
385 #[doc = "10: Configures the LDO_50 output voltage as 0.95v"]
386 AS_0_95V_OUTPUT = 10,
387 #[doc = "11: Configures the LDO_50 output voltage as 0.97v"]
388 AS_0_97V_OUTPUT = 11,
389 #[doc = "12: Configures the LDO_50 output voltage as 0.99v"]
390 AS_0_99V_OUTPUT = 12,
391 #[doc = "13: Configures the LDO_50 output voltage as 1.01v"]
392 AS_1_01V_OUTPUT = 13,
393 #[doc = "14: Configures the LDO_50 output voltage as 1.03v"]
394 AS_1_03V_OUTPUT = 14,
395 #[doc = "15: Configures the LDO_50 output voltage as 1.05v"]
396 AS_1_05V_OUTPUT = 15,
397 #[doc = "16: Configures the LDO_50 output voltage as 1.07v"]
398 AS_1_07V_OUTPUT = 16,
399 #[doc = "17: Configures the LDO_50 output voltage as 1.09v (default)"]
400 AS_1_09V_OUTPUT = 17,
401 #[doc = "18: Configures the LDO_50 output voltage as 1.11v"]
402 AS_1_11V_OUTPUT = 18,
403 #[doc = "19: Configures the LDO_50 output voltage as 1.13v"]
404 AS_1_13V_OUTPUT = 19,
405 #[doc = "20: Configures the LDO_50 output voltage as 1.15v"]
406 AS_1_15V_OUTPUT = 20,
407 #[doc = "21: Configures the LDO_50 output voltage as 1.17v"]
408 AS_1_17V_OUTPUT = 21,
409 #[doc = "22: Configures the LDO_50 output voltage as 1.19v"]
410 AS_1_19V_OUTPUT = 22,
411 #[doc = "23: Configures the LDO_50 output voltage as 1.21v"]
412 AS_1_21V_OUTPUT = 23,
413}
414impl From<DI_A> for u8 {
415 #[inline(always)]
416 fn from(variant: DI_A) -> Self {
417 variant as _
418 }
419}
420#[doc = "Field `DI` reader - Output voltage programming. Note: Please keep LDO_30_DI and LDO_50_DI to be equal values for proper operation and lower power consumption."]
421pub struct DI_R(crate::FieldReader<u8, DI_A>);
422impl DI_R {
423 #[inline(always)]
424 pub(crate) fn new(bits: u8) -> Self {
425 DI_R(crate::FieldReader::new(bits))
426 }
427 #[doc = r"Get enumerated values variant"]
428 #[inline(always)]
429 pub fn variant(&self) -> Option<DI_A> {
430 match self.bits {
431 0 => Some(DI_A::AS_0_75V_OUTPUT),
432 1 => Some(DI_A::AS_0_77V_OUTPUT),
433 2 => Some(DI_A::AS_0_79V_OUTPUT),
434 3 => Some(DI_A::AS_0_81V_OUTPUT),
435 4 => Some(DI_A::AS_0_83V_OUTPUT),
436 5 => Some(DI_A::AS_0_85V_OUTPUT),
437 6 => Some(DI_A::AS_0_87V_OUTPUT),
438 7 => Some(DI_A::AS_0_89V_OUTPUT),
439 8 => Some(DI_A::AS_0_91V_OUTPUT),
440 9 => Some(DI_A::AS_0_93V_OUTPUT),
441 10 => Some(DI_A::AS_0_95V_OUTPUT),
442 11 => Some(DI_A::AS_0_97V_OUTPUT),
443 12 => Some(DI_A::AS_0_99V_OUTPUT),
444 13 => Some(DI_A::AS_1_01V_OUTPUT),
445 14 => Some(DI_A::AS_1_03V_OUTPUT),
446 15 => Some(DI_A::AS_1_05V_OUTPUT),
447 16 => Some(DI_A::AS_1_07V_OUTPUT),
448 17 => Some(DI_A::AS_1_09V_OUTPUT),
449 18 => Some(DI_A::AS_1_11V_OUTPUT),
450 19 => Some(DI_A::AS_1_13V_OUTPUT),
451 20 => Some(DI_A::AS_1_15V_OUTPUT),
452 21 => Some(DI_A::AS_1_17V_OUTPUT),
453 22 => Some(DI_A::AS_1_19V_OUTPUT),
454 23 => Some(DI_A::AS_1_21V_OUTPUT),
455 _ => None,
456 }
457 }
458 #[doc = "Checks if the value of the field is `AS_0_75V_OUTPUT`"]
459 #[inline(always)]
460 pub fn is_as_0_75v_output(&self) -> bool {
461 **self == DI_A::AS_0_75V_OUTPUT
462 }
463 #[doc = "Checks if the value of the field is `AS_0_77V_OUTPUT`"]
464 #[inline(always)]
465 pub fn is_as_0_77v_output(&self) -> bool {
466 **self == DI_A::AS_0_77V_OUTPUT
467 }
468 #[doc = "Checks if the value of the field is `AS_0_79V_OUTPUT`"]
469 #[inline(always)]
470 pub fn is_as_0_79v_output(&self) -> bool {
471 **self == DI_A::AS_0_79V_OUTPUT
472 }
473 #[doc = "Checks if the value of the field is `AS_0_81V_OUTPUT`"]
474 #[inline(always)]
475 pub fn is_as_0_81v_output(&self) -> bool {
476 **self == DI_A::AS_0_81V_OUTPUT
477 }
478 #[doc = "Checks if the value of the field is `AS_0_83V_OUTPUT`"]
479 #[inline(always)]
480 pub fn is_as_0_83v_output(&self) -> bool {
481 **self == DI_A::AS_0_83V_OUTPUT
482 }
483 #[doc = "Checks if the value of the field is `AS_0_85V_OUTPUT`"]
484 #[inline(always)]
485 pub fn is_as_0_85v_output(&self) -> bool {
486 **self == DI_A::AS_0_85V_OUTPUT
487 }
488 #[doc = "Checks if the value of the field is `AS_0_87V_OUTPUT`"]
489 #[inline(always)]
490 pub fn is_as_0_87v_output(&self) -> bool {
491 **self == DI_A::AS_0_87V_OUTPUT
492 }
493 #[doc = "Checks if the value of the field is `AS_0_89V_OUTPUT`"]
494 #[inline(always)]
495 pub fn is_as_0_89v_output(&self) -> bool {
496 **self == DI_A::AS_0_89V_OUTPUT
497 }
498 #[doc = "Checks if the value of the field is `AS_0_91V_OUTPUT`"]
499 #[inline(always)]
500 pub fn is_as_0_91v_output(&self) -> bool {
501 **self == DI_A::AS_0_91V_OUTPUT
502 }
503 #[doc = "Checks if the value of the field is `AS_0_93V_OUTPUT`"]
504 #[inline(always)]
505 pub fn is_as_0_93v_output(&self) -> bool {
506 **self == DI_A::AS_0_93V_OUTPUT
507 }
508 #[doc = "Checks if the value of the field is `AS_0_95V_OUTPUT`"]
509 #[inline(always)]
510 pub fn is_as_0_95v_output(&self) -> bool {
511 **self == DI_A::AS_0_95V_OUTPUT
512 }
513 #[doc = "Checks if the value of the field is `AS_0_97V_OUTPUT`"]
514 #[inline(always)]
515 pub fn is_as_0_97v_output(&self) -> bool {
516 **self == DI_A::AS_0_97V_OUTPUT
517 }
518 #[doc = "Checks if the value of the field is `AS_0_99V_OUTPUT`"]
519 #[inline(always)]
520 pub fn is_as_0_99v_output(&self) -> bool {
521 **self == DI_A::AS_0_99V_OUTPUT
522 }
523 #[doc = "Checks if the value of the field is `AS_1_01V_OUTPUT`"]
524 #[inline(always)]
525 pub fn is_as_1_01v_output(&self) -> bool {
526 **self == DI_A::AS_1_01V_OUTPUT
527 }
528 #[doc = "Checks if the value of the field is `AS_1_03V_OUTPUT`"]
529 #[inline(always)]
530 pub fn is_as_1_03v_output(&self) -> bool {
531 **self == DI_A::AS_1_03V_OUTPUT
532 }
533 #[doc = "Checks if the value of the field is `AS_1_05V_OUTPUT`"]
534 #[inline(always)]
535 pub fn is_as_1_05v_output(&self) -> bool {
536 **self == DI_A::AS_1_05V_OUTPUT
537 }
538 #[doc = "Checks if the value of the field is `AS_1_07V_OUTPUT`"]
539 #[inline(always)]
540 pub fn is_as_1_07v_output(&self) -> bool {
541 **self == DI_A::AS_1_07V_OUTPUT
542 }
543 #[doc = "Checks if the value of the field is `AS_1_09V_OUTPUT`"]
544 #[inline(always)]
545 pub fn is_as_1_09v_output(&self) -> bool {
546 **self == DI_A::AS_1_09V_OUTPUT
547 }
548 #[doc = "Checks if the value of the field is `AS_1_11V_OUTPUT`"]
549 #[inline(always)]
550 pub fn is_as_1_11v_output(&self) -> bool {
551 **self == DI_A::AS_1_11V_OUTPUT
552 }
553 #[doc = "Checks if the value of the field is `AS_1_13V_OUTPUT`"]
554 #[inline(always)]
555 pub fn is_as_1_13v_output(&self) -> bool {
556 **self == DI_A::AS_1_13V_OUTPUT
557 }
558 #[doc = "Checks if the value of the field is `AS_1_15V_OUTPUT`"]
559 #[inline(always)]
560 pub fn is_as_1_15v_output(&self) -> bool {
561 **self == DI_A::AS_1_15V_OUTPUT
562 }
563 #[doc = "Checks if the value of the field is `AS_1_17V_OUTPUT`"]
564 #[inline(always)]
565 pub fn is_as_1_17v_output(&self) -> bool {
566 **self == DI_A::AS_1_17V_OUTPUT
567 }
568 #[doc = "Checks if the value of the field is `AS_1_19V_OUTPUT`"]
569 #[inline(always)]
570 pub fn is_as_1_19v_output(&self) -> bool {
571 **self == DI_A::AS_1_19V_OUTPUT
572 }
573 #[doc = "Checks if the value of the field is `AS_1_21V_OUTPUT`"]
574 #[inline(always)]
575 pub fn is_as_1_21v_output(&self) -> bool {
576 **self == DI_A::AS_1_21V_OUTPUT
577 }
578}
579impl core::ops::Deref for DI_R {
580 type Target = crate::FieldReader<u8, DI_A>;
581 #[inline(always)]
582 fn deref(&self) -> &Self::Target {
583 &self.0
584 }
585}
586#[doc = "Field `DI` writer - Output voltage programming. Note: Please keep LDO_30_DI and LDO_50_DI to be equal values for proper operation and lower power consumption."]
587pub struct DI_W<'a> {
588 w: &'a mut W,
589}
590impl<'a> DI_W<'a> {
591 #[doc = r"Writes `variant` to the field"]
592 #[inline(always)]
593 pub fn variant(self, variant: DI_A) -> &'a mut W {
594 unsafe { self.bits(variant.into()) }
595 }
596 #[doc = "Configures the LDO_50 output voltage as 0.75v"]
597 #[inline(always)]
598 pub fn as_0_75v_output(self) -> &'a mut W {
599 self.variant(DI_A::AS_0_75V_OUTPUT)
600 }
601 #[doc = "Configures the LDO_50 output voltage as 0.77v"]
602 #[inline(always)]
603 pub fn as_0_77v_output(self) -> &'a mut W {
604 self.variant(DI_A::AS_0_77V_OUTPUT)
605 }
606 #[doc = "Configures the LDO_50 output voltage as 0.79v"]
607 #[inline(always)]
608 pub fn as_0_79v_output(self) -> &'a mut W {
609 self.variant(DI_A::AS_0_79V_OUTPUT)
610 }
611 #[doc = "Configures the LDO_50 output voltage as 0.81v"]
612 #[inline(always)]
613 pub fn as_0_81v_output(self) -> &'a mut W {
614 self.variant(DI_A::AS_0_81V_OUTPUT)
615 }
616 #[doc = "Configures the LDO_50 output voltage as 0.83v"]
617 #[inline(always)]
618 pub fn as_0_83v_output(self) -> &'a mut W {
619 self.variant(DI_A::AS_0_83V_OUTPUT)
620 }
621 #[doc = "Configures the LDO_50 output voltage as 0.85v"]
622 #[inline(always)]
623 pub fn as_0_85v_output(self) -> &'a mut W {
624 self.variant(DI_A::AS_0_85V_OUTPUT)
625 }
626 #[doc = "Configures the LDO_50 output voltage as 0.87v"]
627 #[inline(always)]
628 pub fn as_0_87v_output(self) -> &'a mut W {
629 self.variant(DI_A::AS_0_87V_OUTPUT)
630 }
631 #[doc = "Configures the LDO_50 output voltage as 0.89v"]
632 #[inline(always)]
633 pub fn as_0_89v_output(self) -> &'a mut W {
634 self.variant(DI_A::AS_0_89V_OUTPUT)
635 }
636 #[doc = "Configures the LDO_50 output voltage as 0.91v"]
637 #[inline(always)]
638 pub fn as_0_91v_output(self) -> &'a mut W {
639 self.variant(DI_A::AS_0_91V_OUTPUT)
640 }
641 #[doc = "Configures the LDO_50 output voltage as 0.93v"]
642 #[inline(always)]
643 pub fn as_0_93v_output(self) -> &'a mut W {
644 self.variant(DI_A::AS_0_93V_OUTPUT)
645 }
646 #[doc = "Configures the LDO_50 output voltage as 0.95v"]
647 #[inline(always)]
648 pub fn as_0_95v_output(self) -> &'a mut W {
649 self.variant(DI_A::AS_0_95V_OUTPUT)
650 }
651 #[doc = "Configures the LDO_50 output voltage as 0.97v"]
652 #[inline(always)]
653 pub fn as_0_97v_output(self) -> &'a mut W {
654 self.variant(DI_A::AS_0_97V_OUTPUT)
655 }
656 #[doc = "Configures the LDO_50 output voltage as 0.99v"]
657 #[inline(always)]
658 pub fn as_0_99v_output(self) -> &'a mut W {
659 self.variant(DI_A::AS_0_99V_OUTPUT)
660 }
661 #[doc = "Configures the LDO_50 output voltage as 1.01v"]
662 #[inline(always)]
663 pub fn as_1_01v_output(self) -> &'a mut W {
664 self.variant(DI_A::AS_1_01V_OUTPUT)
665 }
666 #[doc = "Configures the LDO_50 output voltage as 1.03v"]
667 #[inline(always)]
668 pub fn as_1_03v_output(self) -> &'a mut W {
669 self.variant(DI_A::AS_1_03V_OUTPUT)
670 }
671 #[doc = "Configures the LDO_50 output voltage as 1.05v"]
672 #[inline(always)]
673 pub fn as_1_05v_output(self) -> &'a mut W {
674 self.variant(DI_A::AS_1_05V_OUTPUT)
675 }
676 #[doc = "Configures the LDO_50 output voltage as 1.07v"]
677 #[inline(always)]
678 pub fn as_1_07v_output(self) -> &'a mut W {
679 self.variant(DI_A::AS_1_07V_OUTPUT)
680 }
681 #[doc = "Configures the LDO_50 output voltage as 1.09v (default)"]
682 #[inline(always)]
683 pub fn as_1_09v_output(self) -> &'a mut W {
684 self.variant(DI_A::AS_1_09V_OUTPUT)
685 }
686 #[doc = "Configures the LDO_50 output voltage as 1.11v"]
687 #[inline(always)]
688 pub fn as_1_11v_output(self) -> &'a mut W {
689 self.variant(DI_A::AS_1_11V_OUTPUT)
690 }
691 #[doc = "Configures the LDO_50 output voltage as 1.13v"]
692 #[inline(always)]
693 pub fn as_1_13v_output(self) -> &'a mut W {
694 self.variant(DI_A::AS_1_13V_OUTPUT)
695 }
696 #[doc = "Configures the LDO_50 output voltage as 1.15v"]
697 #[inline(always)]
698 pub fn as_1_15v_output(self) -> &'a mut W {
699 self.variant(DI_A::AS_1_15V_OUTPUT)
700 }
701 #[doc = "Configures the LDO_50 output voltage as 1.17v"]
702 #[inline(always)]
703 pub fn as_1_17v_output(self) -> &'a mut W {
704 self.variant(DI_A::AS_1_17V_OUTPUT)
705 }
706 #[doc = "Configures the LDO_50 output voltage as 1.19v"]
707 #[inline(always)]
708 pub fn as_1_19v_output(self) -> &'a mut W {
709 self.variant(DI_A::AS_1_19V_OUTPUT)
710 }
711 #[doc = "Configures the LDO_50 output voltage as 1.21v"]
712 #[inline(always)]
713 pub fn as_1_21v_output(self) -> &'a mut W {
714 self.variant(DI_A::AS_1_21V_OUTPUT)
715 }
716 #[doc = r"Writes raw bits to the field"]
717 #[inline(always)]
718 pub unsafe fn bits(self, value: u8) -> &'a mut W {
719 self.w.bits =
720 (self.w.bits & !(0x1f << 5)) | ((value as u32 & 0x1f) << 5);
721 self.w
722 }
723}
724impl R {
725 #[doc = "Bit 0 - Used to disable LDO_30"]
726 #[inline(always)]
727 pub fn dis(&self) -> DIS_R {
728 DIS_R::new((self.bits & 0x01) != 0)
729 }
730 #[doc = "Bit 1 - Used to disable the power good comparator"]
731 #[inline(always)]
732 pub fn dispg(&self) -> DISPG_R {
733 DISPG_R::new(((self.bits >> 1) & 0x01) != 0)
734 }
735 #[doc = "Bits 2:4 - Configures the control for maximum expected current imax current (mA)"]
736 #[inline(always)]
737 pub fn imax(&self) -> IMAX_R {
738 IMAX_R::new(((self.bits >> 2) & 0x07) as u8)
739 }
740 #[doc = "Bits 5:9 - Output voltage programming. Note: Please keep LDO_30_DI and LDO_50_DI to be equal values for proper operation and lower power consumption."]
741 #[inline(always)]
742 pub fn di(&self) -> DI_R {
743 DI_R::new(((self.bits >> 5) & 0x1f) as u8)
744 }
745}
746impl W {
747 #[doc = "Bit 0 - Used to disable LDO_30"]
748 #[inline(always)]
749 pub fn dis(&mut self) -> DIS_W {
750 DIS_W { w: self }
751 }
752 #[doc = "Bit 1 - Used to disable the power good comparator"]
753 #[inline(always)]
754 pub fn dispg(&mut self) -> DISPG_W {
755 DISPG_W { w: self }
756 }
757 #[doc = "Bits 2:4 - Configures the control for maximum expected current imax current (mA)"]
758 #[inline(always)]
759 pub fn imax(&mut self) -> IMAX_W {
760 IMAX_W { w: self }
761 }
762 #[doc = "Bits 5:9 - Output voltage programming. Note: Please keep LDO_30_DI and LDO_50_DI to be equal values for proper operation and lower power consumption."]
763 #[inline(always)]
764 pub fn di(&mut self) -> DI_W {
765 DI_W { w: self }
766 }
767 #[doc = "Writes raw bits to the register."]
768 #[inline(always)]
769 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
770 self.0.bits(bits);
771 self
772 }
773}
774#[doc = "LDO_50 control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ldo_50_ctrl_0](index.html) module"]
775pub struct LDO_50_CTRL_0_SPEC;
776impl crate::RegisterSpec for LDO_50_CTRL_0_SPEC {
777 type Ux = u32;
778}
779#[doc = "`read()` method returns [ldo_50_ctrl_0::R](R) reader structure"]
780impl crate::Readable for LDO_50_CTRL_0_SPEC {
781 type Reader = R;
782}
783#[doc = "`write(|w| ..)` method takes [ldo_50_ctrl_0::W](W) writer structure"]
784impl crate::Writable for LDO_50_CTRL_0_SPEC {
785 type Writer = W;
786}
787#[doc = "`reset()` method sets LDO_50_CTRL_0 to value 0x022c"]
788impl crate::Resettable for LDO_50_CTRL_0_SPEC {
789 #[inline(always)]
790 fn reset_value() -> Self::Ux {
791 0x022c
792 }
793}