stm32l4/stm32l4x5/sai1/ch/
im.rs1pub type R = crate::R<IMrs>;
3pub type W = crate::W<IMrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum OVRUDRIE {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<OVRUDRIE> for bool {
17 #[inline(always)]
18 fn from(variant: OVRUDRIE) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type OVRUDRIE_R = crate::BitReader<OVRUDRIE>;
24impl OVRUDRIE_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> OVRUDRIE {
28 match self.bits {
29 false => OVRUDRIE::Disabled,
30 true => OVRUDRIE::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == OVRUDRIE::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == OVRUDRIE::Enabled
42 }
43}
44pub type OVRUDRIE_W<'a, REG> = crate::BitWriter<'a, REG, OVRUDRIE>;
46impl<'a, REG> OVRUDRIE_W<'a, REG>
47where
48 REG: crate::Writable + crate::RegisterSpec,
49{
50 #[inline(always)]
52 pub fn disabled(self) -> &'a mut crate::W<REG> {
53 self.variant(OVRUDRIE::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(OVRUDRIE::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum MUTEDETIE {
67 Disabled = 0,
69 Enabled = 1,
71}
72impl From<MUTEDETIE> for bool {
73 #[inline(always)]
74 fn from(variant: MUTEDETIE) -> Self {
75 variant as u8 != 0
76 }
77}
78pub type MUTEDETIE_R = crate::BitReader<MUTEDETIE>;
80impl MUTEDETIE_R {
81 #[inline(always)]
83 pub const fn variant(&self) -> MUTEDETIE {
84 match self.bits {
85 false => MUTEDETIE::Disabled,
86 true => MUTEDETIE::Enabled,
87 }
88 }
89 #[inline(always)]
91 pub fn is_disabled(&self) -> bool {
92 *self == MUTEDETIE::Disabled
93 }
94 #[inline(always)]
96 pub fn is_enabled(&self) -> bool {
97 *self == MUTEDETIE::Enabled
98 }
99}
100pub type MUTEDETIE_W<'a, REG> = crate::BitWriter<'a, REG, MUTEDETIE>;
102impl<'a, REG> MUTEDETIE_W<'a, REG>
103where
104 REG: crate::Writable + crate::RegisterSpec,
105{
106 #[inline(always)]
108 pub fn disabled(self) -> &'a mut crate::W<REG> {
109 self.variant(MUTEDETIE::Disabled)
110 }
111 #[inline(always)]
113 pub fn enabled(self) -> &'a mut crate::W<REG> {
114 self.variant(MUTEDETIE::Enabled)
115 }
116}
117#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum WCKCFGIE {
123 Disabled = 0,
125 Enabled = 1,
127}
128impl From<WCKCFGIE> for bool {
129 #[inline(always)]
130 fn from(variant: WCKCFGIE) -> Self {
131 variant as u8 != 0
132 }
133}
134pub type WCKCFGIE_R = crate::BitReader<WCKCFGIE>;
136impl WCKCFGIE_R {
137 #[inline(always)]
139 pub const fn variant(&self) -> WCKCFGIE {
140 match self.bits {
141 false => WCKCFGIE::Disabled,
142 true => WCKCFGIE::Enabled,
143 }
144 }
145 #[inline(always)]
147 pub fn is_disabled(&self) -> bool {
148 *self == WCKCFGIE::Disabled
149 }
150 #[inline(always)]
152 pub fn is_enabled(&self) -> bool {
153 *self == WCKCFGIE::Enabled
154 }
155}
156pub type WCKCFGIE_W<'a, REG> = crate::BitWriter<'a, REG, WCKCFGIE>;
158impl<'a, REG> WCKCFGIE_W<'a, REG>
159where
160 REG: crate::Writable + crate::RegisterSpec,
161{
162 #[inline(always)]
164 pub fn disabled(self) -> &'a mut crate::W<REG> {
165 self.variant(WCKCFGIE::Disabled)
166 }
167 #[inline(always)]
169 pub fn enabled(self) -> &'a mut crate::W<REG> {
170 self.variant(WCKCFGIE::Enabled)
171 }
172}
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178pub enum FREQIE {
179 Disabled = 0,
181 Enabled = 1,
183}
184impl From<FREQIE> for bool {
185 #[inline(always)]
186 fn from(variant: FREQIE) -> Self {
187 variant as u8 != 0
188 }
189}
190pub type FREQIE_R = crate::BitReader<FREQIE>;
192impl FREQIE_R {
193 #[inline(always)]
195 pub const fn variant(&self) -> FREQIE {
196 match self.bits {
197 false => FREQIE::Disabled,
198 true => FREQIE::Enabled,
199 }
200 }
201 #[inline(always)]
203 pub fn is_disabled(&self) -> bool {
204 *self == FREQIE::Disabled
205 }
206 #[inline(always)]
208 pub fn is_enabled(&self) -> bool {
209 *self == FREQIE::Enabled
210 }
211}
212pub type FREQIE_W<'a, REG> = crate::BitWriter<'a, REG, FREQIE>;
214impl<'a, REG> FREQIE_W<'a, REG>
215where
216 REG: crate::Writable + crate::RegisterSpec,
217{
218 #[inline(always)]
220 pub fn disabled(self) -> &'a mut crate::W<REG> {
221 self.variant(FREQIE::Disabled)
222 }
223 #[inline(always)]
225 pub fn enabled(self) -> &'a mut crate::W<REG> {
226 self.variant(FREQIE::Enabled)
227 }
228}
229#[cfg_attr(feature = "defmt", derive(defmt::Format))]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum CNRDYIE {
235 Disabled = 0,
237 Enabled = 1,
239}
240impl From<CNRDYIE> for bool {
241 #[inline(always)]
242 fn from(variant: CNRDYIE) -> Self {
243 variant as u8 != 0
244 }
245}
246pub type CNRDYIE_R = crate::BitReader<CNRDYIE>;
248impl CNRDYIE_R {
249 #[inline(always)]
251 pub const fn variant(&self) -> CNRDYIE {
252 match self.bits {
253 false => CNRDYIE::Disabled,
254 true => CNRDYIE::Enabled,
255 }
256 }
257 #[inline(always)]
259 pub fn is_disabled(&self) -> bool {
260 *self == CNRDYIE::Disabled
261 }
262 #[inline(always)]
264 pub fn is_enabled(&self) -> bool {
265 *self == CNRDYIE::Enabled
266 }
267}
268pub type CNRDYIE_W<'a, REG> = crate::BitWriter<'a, REG, CNRDYIE>;
270impl<'a, REG> CNRDYIE_W<'a, REG>
271where
272 REG: crate::Writable + crate::RegisterSpec,
273{
274 #[inline(always)]
276 pub fn disabled(self) -> &'a mut crate::W<REG> {
277 self.variant(CNRDYIE::Disabled)
278 }
279 #[inline(always)]
281 pub fn enabled(self) -> &'a mut crate::W<REG> {
282 self.variant(CNRDYIE::Enabled)
283 }
284}
285#[cfg_attr(feature = "defmt", derive(defmt::Format))]
289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
290pub enum AFSDETIE {
291 Disabled = 0,
293 Enabled = 1,
295}
296impl From<AFSDETIE> for bool {
297 #[inline(always)]
298 fn from(variant: AFSDETIE) -> Self {
299 variant as u8 != 0
300 }
301}
302pub type AFSDETIE_R = crate::BitReader<AFSDETIE>;
304impl AFSDETIE_R {
305 #[inline(always)]
307 pub const fn variant(&self) -> AFSDETIE {
308 match self.bits {
309 false => AFSDETIE::Disabled,
310 true => AFSDETIE::Enabled,
311 }
312 }
313 #[inline(always)]
315 pub fn is_disabled(&self) -> bool {
316 *self == AFSDETIE::Disabled
317 }
318 #[inline(always)]
320 pub fn is_enabled(&self) -> bool {
321 *self == AFSDETIE::Enabled
322 }
323}
324pub type AFSDETIE_W<'a, REG> = crate::BitWriter<'a, REG, AFSDETIE>;
326impl<'a, REG> AFSDETIE_W<'a, REG>
327where
328 REG: crate::Writable + crate::RegisterSpec,
329{
330 #[inline(always)]
332 pub fn disabled(self) -> &'a mut crate::W<REG> {
333 self.variant(AFSDETIE::Disabled)
334 }
335 #[inline(always)]
337 pub fn enabled(self) -> &'a mut crate::W<REG> {
338 self.variant(AFSDETIE::Enabled)
339 }
340}
341#[cfg_attr(feature = "defmt", derive(defmt::Format))]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum LFSDETIE {
347 Disabled = 0,
349 Enabled = 1,
351}
352impl From<LFSDETIE> for bool {
353 #[inline(always)]
354 fn from(variant: LFSDETIE) -> Self {
355 variant as u8 != 0
356 }
357}
358pub type LFSDETIE_R = crate::BitReader<LFSDETIE>;
360impl LFSDETIE_R {
361 #[inline(always)]
363 pub const fn variant(&self) -> LFSDETIE {
364 match self.bits {
365 false => LFSDETIE::Disabled,
366 true => LFSDETIE::Enabled,
367 }
368 }
369 #[inline(always)]
371 pub fn is_disabled(&self) -> bool {
372 *self == LFSDETIE::Disabled
373 }
374 #[inline(always)]
376 pub fn is_enabled(&self) -> bool {
377 *self == LFSDETIE::Enabled
378 }
379}
380pub type LFSDETIE_W<'a, REG> = crate::BitWriter<'a, REG, LFSDETIE>;
382impl<'a, REG> LFSDETIE_W<'a, REG>
383where
384 REG: crate::Writable + crate::RegisterSpec,
385{
386 #[inline(always)]
388 pub fn disabled(self) -> &'a mut crate::W<REG> {
389 self.variant(LFSDETIE::Disabled)
390 }
391 #[inline(always)]
393 pub fn enabled(self) -> &'a mut crate::W<REG> {
394 self.variant(LFSDETIE::Enabled)
395 }
396}
397impl R {
398 #[inline(always)]
400 pub fn ovrudrie(&self) -> OVRUDRIE_R {
401 OVRUDRIE_R::new((self.bits & 1) != 0)
402 }
403 #[inline(always)]
405 pub fn mutedetie(&self) -> MUTEDETIE_R {
406 MUTEDETIE_R::new(((self.bits >> 1) & 1) != 0)
407 }
408 #[inline(always)]
410 pub fn wckcfgie(&self) -> WCKCFGIE_R {
411 WCKCFGIE_R::new(((self.bits >> 2) & 1) != 0)
412 }
413 #[inline(always)]
415 pub fn freqie(&self) -> FREQIE_R {
416 FREQIE_R::new(((self.bits >> 3) & 1) != 0)
417 }
418 #[inline(always)]
420 pub fn cnrdyie(&self) -> CNRDYIE_R {
421 CNRDYIE_R::new(((self.bits >> 4) & 1) != 0)
422 }
423 #[inline(always)]
425 pub fn afsdetie(&self) -> AFSDETIE_R {
426 AFSDETIE_R::new(((self.bits >> 5) & 1) != 0)
427 }
428 #[inline(always)]
430 pub fn lfsdetie(&self) -> LFSDETIE_R {
431 LFSDETIE_R::new(((self.bits >> 6) & 1) != 0)
432 }
433}
434impl core::fmt::Debug for R {
435 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
436 f.debug_struct("IM")
437 .field("lfsdetie", &self.lfsdetie())
438 .field("afsdetie", &self.afsdetie())
439 .field("cnrdyie", &self.cnrdyie())
440 .field("freqie", &self.freqie())
441 .field("wckcfgie", &self.wckcfgie())
442 .field("mutedetie", &self.mutedetie())
443 .field("ovrudrie", &self.ovrudrie())
444 .finish()
445 }
446}
447impl W {
448 #[inline(always)]
450 pub fn ovrudrie(&mut self) -> OVRUDRIE_W<IMrs> {
451 OVRUDRIE_W::new(self, 0)
452 }
453 #[inline(always)]
455 pub fn mutedetie(&mut self) -> MUTEDETIE_W<IMrs> {
456 MUTEDETIE_W::new(self, 1)
457 }
458 #[inline(always)]
460 pub fn wckcfgie(&mut self) -> WCKCFGIE_W<IMrs> {
461 WCKCFGIE_W::new(self, 2)
462 }
463 #[inline(always)]
465 pub fn freqie(&mut self) -> FREQIE_W<IMrs> {
466 FREQIE_W::new(self, 3)
467 }
468 #[inline(always)]
470 pub fn cnrdyie(&mut self) -> CNRDYIE_W<IMrs> {
471 CNRDYIE_W::new(self, 4)
472 }
473 #[inline(always)]
475 pub fn afsdetie(&mut self) -> AFSDETIE_W<IMrs> {
476 AFSDETIE_W::new(self, 5)
477 }
478 #[inline(always)]
480 pub fn lfsdetie(&mut self) -> LFSDETIE_W<IMrs> {
481 LFSDETIE_W::new(self, 6)
482 }
483}
484pub struct IMrs;
488impl crate::RegisterSpec for IMrs {
489 type Ux = u32;
490}
491impl crate::Readable for IMrs {}
493impl crate::Writable for IMrs {
495 type Safety = crate::Unsafe;
496}
497impl crate::Resettable for IMrs {}