efm32pg1b_pac/emu/
dcdclpctrl.rs1pub type R = crate::R<DCDCLPCTRLrs>;
3pub type W = crate::W<DCDCLPCTRLrs>;
5pub type LpcmphysselR = crate::FieldReader;
7pub type LpcmphysselW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9pub type LpvrefdutyenR = crate::BitReader;
11pub type LpvrefdutyenW<'a, REG> = crate::BitWriter<'a, REG>;
13pub type LpblankR = crate::FieldReader;
15pub type LpblankW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17impl R {
18 #[inline(always)]
20 pub fn lpcmphyssel(&self) -> LpcmphysselR {
21 LpcmphysselR::new(((self.bits >> 12) & 0x0f) as u8)
22 }
23 #[inline(always)]
25 pub fn lpvrefdutyen(&self) -> LpvrefdutyenR {
26 LpvrefdutyenR::new(((self.bits >> 24) & 1) != 0)
27 }
28 #[inline(always)]
30 pub fn lpblank(&self) -> LpblankR {
31 LpblankR::new(((self.bits >> 25) & 3) as u8)
32 }
33}
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("DCDCLPCTRL")
37 .field("lpcmphyssel", &self.lpcmphyssel())
38 .field("lpvrefdutyen", &self.lpvrefdutyen())
39 .field("lpblank", &self.lpblank())
40 .finish()
41 }
42}
43impl W {
44 #[inline(always)]
46 pub fn lpcmphyssel(&mut self) -> LpcmphysselW<'_, DCDCLPCTRLrs> {
47 LpcmphysselW::new(self, 12)
48 }
49 #[inline(always)]
51 pub fn lpvrefdutyen(&mut self) -> LpvrefdutyenW<'_, DCDCLPCTRLrs> {
52 LpvrefdutyenW::new(self, 24)
53 }
54 #[inline(always)]
56 pub fn lpblank(&mut self) -> LpblankW<'_, DCDCLPCTRLrs> {
57 LpblankW::new(self, 25)
58 }
59}
60pub struct DCDCLPCTRLrs;
64impl crate::RegisterSpec for DCDCLPCTRLrs {
65 type Ux = u32;
66}
67impl crate::Readable for DCDCLPCTRLrs {}
69impl crate::Writable for DCDCLPCTRLrs {
71 type Safety = crate::Unsafe;
72}
73impl crate::Resettable for DCDCLPCTRLrs {
75 const RESET_VALUE: u32 = 0x7000;
76}