efm32pg12_pac/emu/
dcdcclimctrl.rs1#[doc = "Reader of register DCDCCLIMCTRL"]
2pub type R = crate::R<u32, super::DCDCCLIMCTRL>;
3#[doc = "Writer for register DCDCCLIMCTRL"]
4pub type W = crate::W<u32, super::DCDCCLIMCTRL>;
5#[doc = "Register DCDCCLIMCTRL `reset()`'s with value 0x0100"]
6impl crate::ResetValue for super::DCDCCLIMCTRL {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x0100
11 }
12}
13#[doc = "Reader of field `CLIMBLANKDLY`"]
14pub type CLIMBLANKDLY_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `CLIMBLANKDLY`"]
16pub struct CLIMBLANKDLY_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> CLIMBLANKDLY_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
24 self.w
25 }
26}
27#[doc = "Reader of field `BYPLIMEN`"]
28pub type BYPLIMEN_R = crate::R<bool, bool>;
29#[doc = "Write proxy for field `BYPLIMEN`"]
30pub struct BYPLIMEN_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> BYPLIMEN_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 << 13)) | (((value as u32) & 0x01) << 13);
48 self.w
49 }
50}
51impl R {
52 #[doc = "Bits 8:9 - Reserved for internal use. Do not change."]
53 #[inline(always)]
54 pub fn climblankdly(&self) -> CLIMBLANKDLY_R {
55 CLIMBLANKDLY_R::new(((self.bits >> 8) & 0x03) as u8)
56 }
57 #[doc = "Bit 13 - Bypass Current Limit Enable"]
58 #[inline(always)]
59 pub fn byplimen(&self) -> BYPLIMEN_R {
60 BYPLIMEN_R::new(((self.bits >> 13) & 0x01) != 0)
61 }
62}
63impl W {
64 #[doc = "Bits 8:9 - Reserved for internal use. Do not change."]
65 #[inline(always)]
66 pub fn climblankdly(&mut self) -> CLIMBLANKDLY_W {
67 CLIMBLANKDLY_W { w: self }
68 }
69 #[doc = "Bit 13 - Bypass Current Limit Enable"]
70 #[inline(always)]
71 pub fn byplimen(&mut self) -> BYPLIMEN_W {
72 BYPLIMEN_W { w: self }
73 }
74}