efm32pg1b_pac/rtcc/
cc0_time.rs1pub type R = crate::R<CC0_TIMErs>;
3pub type W = crate::W<CC0_TIMErs>;
5pub type SecuR = crate::FieldReader;
7pub type SecuW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9pub type SectR = crate::FieldReader;
11pub type SectW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13pub type MinuR = crate::FieldReader;
15pub type MinuW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17pub type MintR = crate::FieldReader;
19pub type MintW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
21pub type HouruR = crate::FieldReader;
23pub type HouruW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
25pub type HourtR = crate::FieldReader;
27pub type HourtW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29impl R {
30 #[inline(always)]
32 pub fn secu(&self) -> SecuR {
33 SecuR::new((self.bits & 0x0f) as u8)
34 }
35 #[inline(always)]
37 pub fn sect(&self) -> SectR {
38 SectR::new(((self.bits >> 4) & 7) as u8)
39 }
40 #[inline(always)]
42 pub fn minu(&self) -> MinuR {
43 MinuR::new(((self.bits >> 8) & 0x0f) as u8)
44 }
45 #[inline(always)]
47 pub fn mint(&self) -> MintR {
48 MintR::new(((self.bits >> 12) & 7) as u8)
49 }
50 #[inline(always)]
52 pub fn houru(&self) -> HouruR {
53 HouruR::new(((self.bits >> 16) & 0x0f) as u8)
54 }
55 #[inline(always)]
57 pub fn hourt(&self) -> HourtR {
58 HourtR::new(((self.bits >> 20) & 3) as u8)
59 }
60}
61impl core::fmt::Debug for R {
62 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
63 f.debug_struct("CC0_TIME")
64 .field("secu", &self.secu())
65 .field("sect", &self.sect())
66 .field("minu", &self.minu())
67 .field("mint", &self.mint())
68 .field("houru", &self.houru())
69 .field("hourt", &self.hourt())
70 .finish()
71 }
72}
73impl W {
74 #[inline(always)]
76 pub fn secu(&mut self) -> SecuW<CC0_TIMErs> {
77 SecuW::new(self, 0)
78 }
79 #[inline(always)]
81 pub fn sect(&mut self) -> SectW<CC0_TIMErs> {
82 SectW::new(self, 4)
83 }
84 #[inline(always)]
86 pub fn minu(&mut self) -> MinuW<CC0_TIMErs> {
87 MinuW::new(self, 8)
88 }
89 #[inline(always)]
91 pub fn mint(&mut self) -> MintW<CC0_TIMErs> {
92 MintW::new(self, 12)
93 }
94 #[inline(always)]
96 pub fn houru(&mut self) -> HouruW<CC0_TIMErs> {
97 HouruW::new(self, 16)
98 }
99 #[inline(always)]
101 pub fn hourt(&mut self) -> HourtW<CC0_TIMErs> {
102 HourtW::new(self, 20)
103 }
104}
105pub struct CC0_TIMErs;
109impl crate::RegisterSpec for CC0_TIMErs {
110 type Ux = u32;
111}
112impl crate::Readable for CC0_TIMErs {}
114impl crate::Writable for CC0_TIMErs {
116 type Safety = crate::Unsafe;
117 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
118 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
119}
120impl crate::Resettable for CC0_TIMErs {
122 const RESET_VALUE: u32 = 0;
123}