stm32l1/stm32l100/rtc/
tafcr.rs1pub type R = crate::R<TAFCRrs>;
3pub type W = crate::W<TAFCRrs>;
5pub type TAMP1E_R = crate::BitReader;
7pub type TAMP1E_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type TAMP1ETRG_R = crate::BitReader;
11pub type TAMP1ETRG_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TAMPIE_R = crate::BitReader;
15pub type TAMPIE_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type TAMP2E_R = crate::BitReader;
19pub type TAMP2E_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TAMP2TRG_R = crate::BitReader;
23pub type TAMP2TRG_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type TAMP3E_R = crate::BitReader;
27pub type TAMP3E_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type TAMP3TRG_R = crate::BitReader;
31pub type TAMP3TRG_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type TAMPTS_R = crate::BitReader;
35pub type TAMPTS_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type TAMPFREQ_R = crate::FieldReader;
39pub type TAMPFREQ_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
41pub type TAMPFLT_R = crate::FieldReader;
43pub type TAMPFLT_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
45pub type TAMPPRCH_R = crate::FieldReader;
47pub type TAMPPRCH_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
49pub type TAMPPUDIS_R = crate::BitReader;
51pub type TAMPPUDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type ALARMOUTTYPE_R = crate::BitReader;
55pub type ALARMOUTTYPE_W<'a, REG> = crate::BitWriter<'a, REG>;
57impl R {
58 #[inline(always)]
60 pub fn tamp1e(&self) -> TAMP1E_R {
61 TAMP1E_R::new((self.bits & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn tamp1etrg(&self) -> TAMP1ETRG_R {
66 TAMP1ETRG_R::new(((self.bits >> 1) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn tampie(&self) -> TAMPIE_R {
71 TAMPIE_R::new(((self.bits >> 2) & 1) != 0)
72 }
73 #[inline(always)]
75 pub fn tamp2e(&self) -> TAMP2E_R {
76 TAMP2E_R::new(((self.bits >> 3) & 1) != 0)
77 }
78 #[inline(always)]
80 pub fn tamp2trg(&self) -> TAMP2TRG_R {
81 TAMP2TRG_R::new(((self.bits >> 4) & 1) != 0)
82 }
83 #[inline(always)]
85 pub fn tamp3e(&self) -> TAMP3E_R {
86 TAMP3E_R::new(((self.bits >> 5) & 1) != 0)
87 }
88 #[inline(always)]
90 pub fn tamp3trg(&self) -> TAMP3TRG_R {
91 TAMP3TRG_R::new(((self.bits >> 6) & 1) != 0)
92 }
93 #[inline(always)]
95 pub fn tampts(&self) -> TAMPTS_R {
96 TAMPTS_R::new(((self.bits >> 7) & 1) != 0)
97 }
98 #[inline(always)]
100 pub fn tampfreq(&self) -> TAMPFREQ_R {
101 TAMPFREQ_R::new(((self.bits >> 8) & 7) as u8)
102 }
103 #[inline(always)]
105 pub fn tampflt(&self) -> TAMPFLT_R {
106 TAMPFLT_R::new(((self.bits >> 11) & 3) as u8)
107 }
108 #[inline(always)]
110 pub fn tampprch(&self) -> TAMPPRCH_R {
111 TAMPPRCH_R::new(((self.bits >> 13) & 3) as u8)
112 }
113 #[inline(always)]
115 pub fn tamppudis(&self) -> TAMPPUDIS_R {
116 TAMPPUDIS_R::new(((self.bits >> 15) & 1) != 0)
117 }
118 #[inline(always)]
120 pub fn alarmouttype(&self) -> ALARMOUTTYPE_R {
121 ALARMOUTTYPE_R::new(((self.bits >> 18) & 1) != 0)
122 }
123}
124impl core::fmt::Debug for R {
125 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
126 f.debug_struct("TAFCR")
127 .field("alarmouttype", &self.alarmouttype())
128 .field("tamppudis", &self.tamppudis())
129 .field("tampprch", &self.tampprch())
130 .field("tampflt", &self.tampflt())
131 .field("tampfreq", &self.tampfreq())
132 .field("tampts", &self.tampts())
133 .field("tamp3trg", &self.tamp3trg())
134 .field("tamp3e", &self.tamp3e())
135 .field("tamp2trg", &self.tamp2trg())
136 .field("tamp2e", &self.tamp2e())
137 .field("tampie", &self.tampie())
138 .field("tamp1etrg", &self.tamp1etrg())
139 .field("tamp1e", &self.tamp1e())
140 .finish()
141 }
142}
143impl W {
144 #[inline(always)]
146 pub fn tamp1e(&mut self) -> TAMP1E_W<TAFCRrs> {
147 TAMP1E_W::new(self, 0)
148 }
149 #[inline(always)]
151 pub fn tamp1etrg(&mut self) -> TAMP1ETRG_W<TAFCRrs> {
152 TAMP1ETRG_W::new(self, 1)
153 }
154 #[inline(always)]
156 pub fn tampie(&mut self) -> TAMPIE_W<TAFCRrs> {
157 TAMPIE_W::new(self, 2)
158 }
159 #[inline(always)]
161 pub fn tamp2e(&mut self) -> TAMP2E_W<TAFCRrs> {
162 TAMP2E_W::new(self, 3)
163 }
164 #[inline(always)]
166 pub fn tamp2trg(&mut self) -> TAMP2TRG_W<TAFCRrs> {
167 TAMP2TRG_W::new(self, 4)
168 }
169 #[inline(always)]
171 pub fn tamp3e(&mut self) -> TAMP3E_W<TAFCRrs> {
172 TAMP3E_W::new(self, 5)
173 }
174 #[inline(always)]
176 pub fn tamp3trg(&mut self) -> TAMP3TRG_W<TAFCRrs> {
177 TAMP3TRG_W::new(self, 6)
178 }
179 #[inline(always)]
181 pub fn tampts(&mut self) -> TAMPTS_W<TAFCRrs> {
182 TAMPTS_W::new(self, 7)
183 }
184 #[inline(always)]
186 pub fn tampfreq(&mut self) -> TAMPFREQ_W<TAFCRrs> {
187 TAMPFREQ_W::new(self, 8)
188 }
189 #[inline(always)]
191 pub fn tampflt(&mut self) -> TAMPFLT_W<TAFCRrs> {
192 TAMPFLT_W::new(self, 11)
193 }
194 #[inline(always)]
196 pub fn tampprch(&mut self) -> TAMPPRCH_W<TAFCRrs> {
197 TAMPPRCH_W::new(self, 13)
198 }
199 #[inline(always)]
201 pub fn tamppudis(&mut self) -> TAMPPUDIS_W<TAFCRrs> {
202 TAMPPUDIS_W::new(self, 15)
203 }
204 #[inline(always)]
206 pub fn alarmouttype(&mut self) -> ALARMOUTTYPE_W<TAFCRrs> {
207 ALARMOUTTYPE_W::new(self, 18)
208 }
209}
210pub struct TAFCRrs;
216impl crate::RegisterSpec for TAFCRrs {
217 type Ux = u32;
218}
219impl crate::Readable for TAFCRrs {}
221impl crate::Writable for TAFCRrs {
223 type Safety = crate::Unsafe;
224}
225impl crate::Resettable for TAFCRrs {}