stm32f1/stm32f103/can/
ier.rs

1///Register `IER` reader
2pub type R = crate::R<IERrs>;
3///Register `IER` writer
4pub type W = crate::W<IERrs>;
5/**TMEIE
6
7Value on reset: 0*/
8#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum TMEIE {
11    ///0: No interrupt when RQCPx bit is set
12    Disabled = 0,
13    ///1: Interrupt generated when RQCPx bit is set
14    Enabled = 1,
15}
16impl From<TMEIE> for bool {
17    #[inline(always)]
18    fn from(variant: TMEIE) -> Self {
19        variant as u8 != 0
20    }
21}
22///Field `TMEIE` reader - TMEIE
23pub type TMEIE_R = crate::BitReader<TMEIE>;
24impl TMEIE_R {
25    ///Get enumerated values variant
26    #[inline(always)]
27    pub const fn variant(&self) -> TMEIE {
28        match self.bits {
29            false => TMEIE::Disabled,
30            true => TMEIE::Enabled,
31        }
32    }
33    ///No interrupt when RQCPx bit is set
34    #[inline(always)]
35    pub fn is_disabled(&self) -> bool {
36        *self == TMEIE::Disabled
37    }
38    ///Interrupt generated when RQCPx bit is set
39    #[inline(always)]
40    pub fn is_enabled(&self) -> bool {
41        *self == TMEIE::Enabled
42    }
43}
44///Field `TMEIE` writer - TMEIE
45pub type TMEIE_W<'a, REG> = crate::BitWriter<'a, REG, TMEIE>;
46impl<'a, REG> TMEIE_W<'a, REG>
47where
48    REG: crate::Writable + crate::RegisterSpec,
49{
50    ///No interrupt when RQCPx bit is set
51    #[inline(always)]
52    pub fn disabled(self) -> &'a mut crate::W<REG> {
53        self.variant(TMEIE::Disabled)
54    }
55    ///Interrupt generated when RQCPx bit is set
56    #[inline(always)]
57    pub fn enabled(self) -> &'a mut crate::W<REG> {
58        self.variant(TMEIE::Enabled)
59    }
60}
61/**FMPIE0
62
63Value on reset: 0*/
64#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum FMPIE0 {
67    ///0: No interrupt generated when state of FMP\[1:0\] bits are not 00
68    Disabled = 0,
69    ///1: Interrupt generated when state of FMP\[1:0\] bits are not 00b
70    Enabled = 1,
71}
72impl From<FMPIE0> for bool {
73    #[inline(always)]
74    fn from(variant: FMPIE0) -> Self {
75        variant as u8 != 0
76    }
77}
78///Field `FMPIE0` reader - FMPIE0
79pub type FMPIE0_R = crate::BitReader<FMPIE0>;
80impl FMPIE0_R {
81    ///Get enumerated values variant
82    #[inline(always)]
83    pub const fn variant(&self) -> FMPIE0 {
84        match self.bits {
85            false => FMPIE0::Disabled,
86            true => FMPIE0::Enabled,
87        }
88    }
89    ///No interrupt generated when state of FMP\[1:0\] bits are not 00
90    #[inline(always)]
91    pub fn is_disabled(&self) -> bool {
92        *self == FMPIE0::Disabled
93    }
94    ///Interrupt generated when state of FMP\[1:0\] bits are not 00b
95    #[inline(always)]
96    pub fn is_enabled(&self) -> bool {
97        *self == FMPIE0::Enabled
98    }
99}
100///Field `FMPIE0` writer - FMPIE0
101pub type FMPIE0_W<'a, REG> = crate::BitWriter<'a, REG, FMPIE0>;
102impl<'a, REG> FMPIE0_W<'a, REG>
103where
104    REG: crate::Writable + crate::RegisterSpec,
105{
106    ///No interrupt generated when state of FMP\[1:0\] bits are not 00
107    #[inline(always)]
108    pub fn disabled(self) -> &'a mut crate::W<REG> {
109        self.variant(FMPIE0::Disabled)
110    }
111    ///Interrupt generated when state of FMP\[1:0\] bits are not 00b
112    #[inline(always)]
113    pub fn enabled(self) -> &'a mut crate::W<REG> {
114        self.variant(FMPIE0::Enabled)
115    }
116}
117/**FFIE0
118
119Value on reset: 0*/
120#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum FFIE0 {
123    ///0: No interrupt when FULL bit is set
124    Disabled = 0,
125    ///1: Interrupt generated when FULL bit is set
126    Enabled = 1,
127}
128impl From<FFIE0> for bool {
129    #[inline(always)]
130    fn from(variant: FFIE0) -> Self {
131        variant as u8 != 0
132    }
133}
134///Field `FFIE0` reader - FFIE0
135pub type FFIE0_R = crate::BitReader<FFIE0>;
136impl FFIE0_R {
137    ///Get enumerated values variant
138    #[inline(always)]
139    pub const fn variant(&self) -> FFIE0 {
140        match self.bits {
141            false => FFIE0::Disabled,
142            true => FFIE0::Enabled,
143        }
144    }
145    ///No interrupt when FULL bit is set
146    #[inline(always)]
147    pub fn is_disabled(&self) -> bool {
148        *self == FFIE0::Disabled
149    }
150    ///Interrupt generated when FULL bit is set
151    #[inline(always)]
152    pub fn is_enabled(&self) -> bool {
153        *self == FFIE0::Enabled
154    }
155}
156///Field `FFIE0` writer - FFIE0
157pub type FFIE0_W<'a, REG> = crate::BitWriter<'a, REG, FFIE0>;
158impl<'a, REG> FFIE0_W<'a, REG>
159where
160    REG: crate::Writable + crate::RegisterSpec,
161{
162    ///No interrupt when FULL bit is set
163    #[inline(always)]
164    pub fn disabled(self) -> &'a mut crate::W<REG> {
165        self.variant(FFIE0::Disabled)
166    }
167    ///Interrupt generated when FULL bit is set
168    #[inline(always)]
169    pub fn enabled(self) -> &'a mut crate::W<REG> {
170        self.variant(FFIE0::Enabled)
171    }
172}
173/**FOVIE0
174
175Value on reset: 0*/
176#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178pub enum FOVIE0 {
179    ///0: No interrupt when FOVR bit is set
180    Disabled = 0,
181    ///1: Interrupt generated when FOVR bit is set
182    Enabled = 1,
183}
184impl From<FOVIE0> for bool {
185    #[inline(always)]
186    fn from(variant: FOVIE0) -> Self {
187        variant as u8 != 0
188    }
189}
190///Field `FOVIE0` reader - FOVIE0
191pub type FOVIE0_R = crate::BitReader<FOVIE0>;
192impl FOVIE0_R {
193    ///Get enumerated values variant
194    #[inline(always)]
195    pub const fn variant(&self) -> FOVIE0 {
196        match self.bits {
197            false => FOVIE0::Disabled,
198            true => FOVIE0::Enabled,
199        }
200    }
201    ///No interrupt when FOVR bit is set
202    #[inline(always)]
203    pub fn is_disabled(&self) -> bool {
204        *self == FOVIE0::Disabled
205    }
206    ///Interrupt generated when FOVR bit is set
207    #[inline(always)]
208    pub fn is_enabled(&self) -> bool {
209        *self == FOVIE0::Enabled
210    }
211}
212///Field `FOVIE0` writer - FOVIE0
213pub type FOVIE0_W<'a, REG> = crate::BitWriter<'a, REG, FOVIE0>;
214impl<'a, REG> FOVIE0_W<'a, REG>
215where
216    REG: crate::Writable + crate::RegisterSpec,
217{
218    ///No interrupt when FOVR bit is set
219    #[inline(always)]
220    pub fn disabled(self) -> &'a mut crate::W<REG> {
221        self.variant(FOVIE0::Disabled)
222    }
223    ///Interrupt generated when FOVR bit is set
224    #[inline(always)]
225    pub fn enabled(self) -> &'a mut crate::W<REG> {
226        self.variant(FOVIE0::Enabled)
227    }
228}
229/**FMPIE1
230
231Value on reset: 0*/
232#[cfg_attr(feature = "defmt", derive(defmt::Format))]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum FMPIE1 {
235    ///0: No interrupt generated when state of FMP\[1:0\] bits are not 00b
236    Disabled = 0,
237    ///1: Interrupt generated when state of FMP\[1:0\] bits are not 00b
238    Enabled = 1,
239}
240impl From<FMPIE1> for bool {
241    #[inline(always)]
242    fn from(variant: FMPIE1) -> Self {
243        variant as u8 != 0
244    }
245}
246///Field `FMPIE1` reader - FMPIE1
247pub type FMPIE1_R = crate::BitReader<FMPIE1>;
248impl FMPIE1_R {
249    ///Get enumerated values variant
250    #[inline(always)]
251    pub const fn variant(&self) -> FMPIE1 {
252        match self.bits {
253            false => FMPIE1::Disabled,
254            true => FMPIE1::Enabled,
255        }
256    }
257    ///No interrupt generated when state of FMP\[1:0\] bits are not 00b
258    #[inline(always)]
259    pub fn is_disabled(&self) -> bool {
260        *self == FMPIE1::Disabled
261    }
262    ///Interrupt generated when state of FMP\[1:0\] bits are not 00b
263    #[inline(always)]
264    pub fn is_enabled(&self) -> bool {
265        *self == FMPIE1::Enabled
266    }
267}
268///Field `FMPIE1` writer - FMPIE1
269pub type FMPIE1_W<'a, REG> = crate::BitWriter<'a, REG, FMPIE1>;
270impl<'a, REG> FMPIE1_W<'a, REG>
271where
272    REG: crate::Writable + crate::RegisterSpec,
273{
274    ///No interrupt generated when state of FMP\[1:0\] bits are not 00b
275    #[inline(always)]
276    pub fn disabled(self) -> &'a mut crate::W<REG> {
277        self.variant(FMPIE1::Disabled)
278    }
279    ///Interrupt generated when state of FMP\[1:0\] bits are not 00b
280    #[inline(always)]
281    pub fn enabled(self) -> &'a mut crate::W<REG> {
282        self.variant(FMPIE1::Enabled)
283    }
284}
285/**FFIE1
286
287Value on reset: 0*/
288#[cfg_attr(feature = "defmt", derive(defmt::Format))]
289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
290pub enum FFIE1 {
291    ///0: No interrupt when FULL bit is set
292    Disabled = 0,
293    ///1: Interrupt generated when FULL bit is set
294    Enabled = 1,
295}
296impl From<FFIE1> for bool {
297    #[inline(always)]
298    fn from(variant: FFIE1) -> Self {
299        variant as u8 != 0
300    }
301}
302///Field `FFIE1` reader - FFIE1
303pub type FFIE1_R = crate::BitReader<FFIE1>;
304impl FFIE1_R {
305    ///Get enumerated values variant
306    #[inline(always)]
307    pub const fn variant(&self) -> FFIE1 {
308        match self.bits {
309            false => FFIE1::Disabled,
310            true => FFIE1::Enabled,
311        }
312    }
313    ///No interrupt when FULL bit is set
314    #[inline(always)]
315    pub fn is_disabled(&self) -> bool {
316        *self == FFIE1::Disabled
317    }
318    ///Interrupt generated when FULL bit is set
319    #[inline(always)]
320    pub fn is_enabled(&self) -> bool {
321        *self == FFIE1::Enabled
322    }
323}
324///Field `FFIE1` writer - FFIE1
325pub type FFIE1_W<'a, REG> = crate::BitWriter<'a, REG, FFIE1>;
326impl<'a, REG> FFIE1_W<'a, REG>
327where
328    REG: crate::Writable + crate::RegisterSpec,
329{
330    ///No interrupt when FULL bit is set
331    #[inline(always)]
332    pub fn disabled(self) -> &'a mut crate::W<REG> {
333        self.variant(FFIE1::Disabled)
334    }
335    ///Interrupt generated when FULL bit is set
336    #[inline(always)]
337    pub fn enabled(self) -> &'a mut crate::W<REG> {
338        self.variant(FFIE1::Enabled)
339    }
340}
341/**FOVIE1
342
343Value on reset: 0*/
344#[cfg_attr(feature = "defmt", derive(defmt::Format))]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum FOVIE1 {
347    ///0: No interrupt when FOVR is set
348    Disabled = 0,
349    ///1: Interrupt generation when FOVR is set
350    Enabled = 1,
351}
352impl From<FOVIE1> for bool {
353    #[inline(always)]
354    fn from(variant: FOVIE1) -> Self {
355        variant as u8 != 0
356    }
357}
358///Field `FOVIE1` reader - FOVIE1
359pub type FOVIE1_R = crate::BitReader<FOVIE1>;
360impl FOVIE1_R {
361    ///Get enumerated values variant
362    #[inline(always)]
363    pub const fn variant(&self) -> FOVIE1 {
364        match self.bits {
365            false => FOVIE1::Disabled,
366            true => FOVIE1::Enabled,
367        }
368    }
369    ///No interrupt when FOVR is set
370    #[inline(always)]
371    pub fn is_disabled(&self) -> bool {
372        *self == FOVIE1::Disabled
373    }
374    ///Interrupt generation when FOVR is set
375    #[inline(always)]
376    pub fn is_enabled(&self) -> bool {
377        *self == FOVIE1::Enabled
378    }
379}
380///Field `FOVIE1` writer - FOVIE1
381pub type FOVIE1_W<'a, REG> = crate::BitWriter<'a, REG, FOVIE1>;
382impl<'a, REG> FOVIE1_W<'a, REG>
383where
384    REG: crate::Writable + crate::RegisterSpec,
385{
386    ///No interrupt when FOVR is set
387    #[inline(always)]
388    pub fn disabled(self) -> &'a mut crate::W<REG> {
389        self.variant(FOVIE1::Disabled)
390    }
391    ///Interrupt generation when FOVR is set
392    #[inline(always)]
393    pub fn enabled(self) -> &'a mut crate::W<REG> {
394        self.variant(FOVIE1::Enabled)
395    }
396}
397/**EWGIE
398
399Value on reset: 0*/
400#[cfg_attr(feature = "defmt", derive(defmt::Format))]
401#[derive(Clone, Copy, Debug, PartialEq, Eq)]
402pub enum EWGIE {
403    ///0: ERRI bit will not be set when EWGF is set
404    Disabled = 0,
405    ///1: ERRI bit will be set when EWGF is set
406    Enabled = 1,
407}
408impl From<EWGIE> for bool {
409    #[inline(always)]
410    fn from(variant: EWGIE) -> Self {
411        variant as u8 != 0
412    }
413}
414///Field `EWGIE` reader - EWGIE
415pub type EWGIE_R = crate::BitReader<EWGIE>;
416impl EWGIE_R {
417    ///Get enumerated values variant
418    #[inline(always)]
419    pub const fn variant(&self) -> EWGIE {
420        match self.bits {
421            false => EWGIE::Disabled,
422            true => EWGIE::Enabled,
423        }
424    }
425    ///ERRI bit will not be set when EWGF is set
426    #[inline(always)]
427    pub fn is_disabled(&self) -> bool {
428        *self == EWGIE::Disabled
429    }
430    ///ERRI bit will be set when EWGF is set
431    #[inline(always)]
432    pub fn is_enabled(&self) -> bool {
433        *self == EWGIE::Enabled
434    }
435}
436///Field `EWGIE` writer - EWGIE
437pub type EWGIE_W<'a, REG> = crate::BitWriter<'a, REG, EWGIE>;
438impl<'a, REG> EWGIE_W<'a, REG>
439where
440    REG: crate::Writable + crate::RegisterSpec,
441{
442    ///ERRI bit will not be set when EWGF is set
443    #[inline(always)]
444    pub fn disabled(self) -> &'a mut crate::W<REG> {
445        self.variant(EWGIE::Disabled)
446    }
447    ///ERRI bit will be set when EWGF is set
448    #[inline(always)]
449    pub fn enabled(self) -> &'a mut crate::W<REG> {
450        self.variant(EWGIE::Enabled)
451    }
452}
453/**EPVIE
454
455Value on reset: 0*/
456#[cfg_attr(feature = "defmt", derive(defmt::Format))]
457#[derive(Clone, Copy, Debug, PartialEq, Eq)]
458pub enum EPVIE {
459    ///0: ERRI bit will not be set when EPVF is set
460    Disabled = 0,
461    ///1: ERRI bit will be set when EPVF is set
462    Enabled = 1,
463}
464impl From<EPVIE> for bool {
465    #[inline(always)]
466    fn from(variant: EPVIE) -> Self {
467        variant as u8 != 0
468    }
469}
470///Field `EPVIE` reader - EPVIE
471pub type EPVIE_R = crate::BitReader<EPVIE>;
472impl EPVIE_R {
473    ///Get enumerated values variant
474    #[inline(always)]
475    pub const fn variant(&self) -> EPVIE {
476        match self.bits {
477            false => EPVIE::Disabled,
478            true => EPVIE::Enabled,
479        }
480    }
481    ///ERRI bit will not be set when EPVF is set
482    #[inline(always)]
483    pub fn is_disabled(&self) -> bool {
484        *self == EPVIE::Disabled
485    }
486    ///ERRI bit will be set when EPVF is set
487    #[inline(always)]
488    pub fn is_enabled(&self) -> bool {
489        *self == EPVIE::Enabled
490    }
491}
492///Field `EPVIE` writer - EPVIE
493pub type EPVIE_W<'a, REG> = crate::BitWriter<'a, REG, EPVIE>;
494impl<'a, REG> EPVIE_W<'a, REG>
495where
496    REG: crate::Writable + crate::RegisterSpec,
497{
498    ///ERRI bit will not be set when EPVF is set
499    #[inline(always)]
500    pub fn disabled(self) -> &'a mut crate::W<REG> {
501        self.variant(EPVIE::Disabled)
502    }
503    ///ERRI bit will be set when EPVF is set
504    #[inline(always)]
505    pub fn enabled(self) -> &'a mut crate::W<REG> {
506        self.variant(EPVIE::Enabled)
507    }
508}
509/**BOFIE
510
511Value on reset: 0*/
512#[cfg_attr(feature = "defmt", derive(defmt::Format))]
513#[derive(Clone, Copy, Debug, PartialEq, Eq)]
514pub enum BOFIE {
515    ///0: ERRI bit will not be set when BOFF is set
516    Disabled = 0,
517    ///1: ERRI bit will be set when BOFF is set
518    Enabled = 1,
519}
520impl From<BOFIE> for bool {
521    #[inline(always)]
522    fn from(variant: BOFIE) -> Self {
523        variant as u8 != 0
524    }
525}
526///Field `BOFIE` reader - BOFIE
527pub type BOFIE_R = crate::BitReader<BOFIE>;
528impl BOFIE_R {
529    ///Get enumerated values variant
530    #[inline(always)]
531    pub const fn variant(&self) -> BOFIE {
532        match self.bits {
533            false => BOFIE::Disabled,
534            true => BOFIE::Enabled,
535        }
536    }
537    ///ERRI bit will not be set when BOFF is set
538    #[inline(always)]
539    pub fn is_disabled(&self) -> bool {
540        *self == BOFIE::Disabled
541    }
542    ///ERRI bit will be set when BOFF is set
543    #[inline(always)]
544    pub fn is_enabled(&self) -> bool {
545        *self == BOFIE::Enabled
546    }
547}
548///Field `BOFIE` writer - BOFIE
549pub type BOFIE_W<'a, REG> = crate::BitWriter<'a, REG, BOFIE>;
550impl<'a, REG> BOFIE_W<'a, REG>
551where
552    REG: crate::Writable + crate::RegisterSpec,
553{
554    ///ERRI bit will not be set when BOFF is set
555    #[inline(always)]
556    pub fn disabled(self) -> &'a mut crate::W<REG> {
557        self.variant(BOFIE::Disabled)
558    }
559    ///ERRI bit will be set when BOFF is set
560    #[inline(always)]
561    pub fn enabled(self) -> &'a mut crate::W<REG> {
562        self.variant(BOFIE::Enabled)
563    }
564}
565/**LECIE
566
567Value on reset: 0*/
568#[cfg_attr(feature = "defmt", derive(defmt::Format))]
569#[derive(Clone, Copy, Debug, PartialEq, Eq)]
570pub enum LECIE {
571    ///0: ERRI bit will not be set when the error code in LEC\[2:0\] is set by hardware on error detection
572    Disabled = 0,
573    ///1: ERRI bit will be set when the error code in LEC\[2:0\] is set by hardware on error detection
574    Enabled = 1,
575}
576impl From<LECIE> for bool {
577    #[inline(always)]
578    fn from(variant: LECIE) -> Self {
579        variant as u8 != 0
580    }
581}
582///Field `LECIE` reader - LECIE
583pub type LECIE_R = crate::BitReader<LECIE>;
584impl LECIE_R {
585    ///Get enumerated values variant
586    #[inline(always)]
587    pub const fn variant(&self) -> LECIE {
588        match self.bits {
589            false => LECIE::Disabled,
590            true => LECIE::Enabled,
591        }
592    }
593    ///ERRI bit will not be set when the error code in LEC\[2:0\] is set by hardware on error detection
594    #[inline(always)]
595    pub fn is_disabled(&self) -> bool {
596        *self == LECIE::Disabled
597    }
598    ///ERRI bit will be set when the error code in LEC\[2:0\] is set by hardware on error detection
599    #[inline(always)]
600    pub fn is_enabled(&self) -> bool {
601        *self == LECIE::Enabled
602    }
603}
604///Field `LECIE` writer - LECIE
605pub type LECIE_W<'a, REG> = crate::BitWriter<'a, REG, LECIE>;
606impl<'a, REG> LECIE_W<'a, REG>
607where
608    REG: crate::Writable + crate::RegisterSpec,
609{
610    ///ERRI bit will not be set when the error code in LEC\[2:0\] is set by hardware on error detection
611    #[inline(always)]
612    pub fn disabled(self) -> &'a mut crate::W<REG> {
613        self.variant(LECIE::Disabled)
614    }
615    ///ERRI bit will be set when the error code in LEC\[2:0\] is set by hardware on error detection
616    #[inline(always)]
617    pub fn enabled(self) -> &'a mut crate::W<REG> {
618        self.variant(LECIE::Enabled)
619    }
620}
621/**ERRIE
622
623Value on reset: 0*/
624#[cfg_attr(feature = "defmt", derive(defmt::Format))]
625#[derive(Clone, Copy, Debug, PartialEq, Eq)]
626pub enum ERRIE {
627    ///0: No interrupt will be generated when an error condition is pending in the CAN_ESR
628    Disabled = 0,
629    ///1: An interrupt will be generation when an error condition is pending in the CAN_ESR
630    Enabled = 1,
631}
632impl From<ERRIE> for bool {
633    #[inline(always)]
634    fn from(variant: ERRIE) -> Self {
635        variant as u8 != 0
636    }
637}
638///Field `ERRIE` reader - ERRIE
639pub type ERRIE_R = crate::BitReader<ERRIE>;
640impl ERRIE_R {
641    ///Get enumerated values variant
642    #[inline(always)]
643    pub const fn variant(&self) -> ERRIE {
644        match self.bits {
645            false => ERRIE::Disabled,
646            true => ERRIE::Enabled,
647        }
648    }
649    ///No interrupt will be generated when an error condition is pending in the CAN_ESR
650    #[inline(always)]
651    pub fn is_disabled(&self) -> bool {
652        *self == ERRIE::Disabled
653    }
654    ///An interrupt will be generation when an error condition is pending in the CAN_ESR
655    #[inline(always)]
656    pub fn is_enabled(&self) -> bool {
657        *self == ERRIE::Enabled
658    }
659}
660///Field `ERRIE` writer - ERRIE
661pub type ERRIE_W<'a, REG> = crate::BitWriter<'a, REG, ERRIE>;
662impl<'a, REG> ERRIE_W<'a, REG>
663where
664    REG: crate::Writable + crate::RegisterSpec,
665{
666    ///No interrupt will be generated when an error condition is pending in the CAN_ESR
667    #[inline(always)]
668    pub fn disabled(self) -> &'a mut crate::W<REG> {
669        self.variant(ERRIE::Disabled)
670    }
671    ///An interrupt will be generation when an error condition is pending in the CAN_ESR
672    #[inline(always)]
673    pub fn enabled(self) -> &'a mut crate::W<REG> {
674        self.variant(ERRIE::Enabled)
675    }
676}
677/**WKUIE
678
679Value on reset: 0*/
680#[cfg_attr(feature = "defmt", derive(defmt::Format))]
681#[derive(Clone, Copy, Debug, PartialEq, Eq)]
682pub enum WKUIE {
683    ///0: No interrupt when WKUI is set
684    Disabled = 0,
685    ///1: Interrupt generated when WKUI bit is set
686    Enabled = 1,
687}
688impl From<WKUIE> for bool {
689    #[inline(always)]
690    fn from(variant: WKUIE) -> Self {
691        variant as u8 != 0
692    }
693}
694///Field `WKUIE` reader - WKUIE
695pub type WKUIE_R = crate::BitReader<WKUIE>;
696impl WKUIE_R {
697    ///Get enumerated values variant
698    #[inline(always)]
699    pub const fn variant(&self) -> WKUIE {
700        match self.bits {
701            false => WKUIE::Disabled,
702            true => WKUIE::Enabled,
703        }
704    }
705    ///No interrupt when WKUI is set
706    #[inline(always)]
707    pub fn is_disabled(&self) -> bool {
708        *self == WKUIE::Disabled
709    }
710    ///Interrupt generated when WKUI bit is set
711    #[inline(always)]
712    pub fn is_enabled(&self) -> bool {
713        *self == WKUIE::Enabled
714    }
715}
716///Field `WKUIE` writer - WKUIE
717pub type WKUIE_W<'a, REG> = crate::BitWriter<'a, REG, WKUIE>;
718impl<'a, REG> WKUIE_W<'a, REG>
719where
720    REG: crate::Writable + crate::RegisterSpec,
721{
722    ///No interrupt when WKUI is set
723    #[inline(always)]
724    pub fn disabled(self) -> &'a mut crate::W<REG> {
725        self.variant(WKUIE::Disabled)
726    }
727    ///Interrupt generated when WKUI bit is set
728    #[inline(always)]
729    pub fn enabled(self) -> &'a mut crate::W<REG> {
730        self.variant(WKUIE::Enabled)
731    }
732}
733/**SLKIE
734
735Value on reset: 0*/
736#[cfg_attr(feature = "defmt", derive(defmt::Format))]
737#[derive(Clone, Copy, Debug, PartialEq, Eq)]
738pub enum SLKIE {
739    ///0: No interrupt when SLAKI bit is set
740    Disabled = 0,
741    ///1: Interrupt generated when SLAKI bit is set
742    Enabled = 1,
743}
744impl From<SLKIE> for bool {
745    #[inline(always)]
746    fn from(variant: SLKIE) -> Self {
747        variant as u8 != 0
748    }
749}
750///Field `SLKIE` reader - SLKIE
751pub type SLKIE_R = crate::BitReader<SLKIE>;
752impl SLKIE_R {
753    ///Get enumerated values variant
754    #[inline(always)]
755    pub const fn variant(&self) -> SLKIE {
756        match self.bits {
757            false => SLKIE::Disabled,
758            true => SLKIE::Enabled,
759        }
760    }
761    ///No interrupt when SLAKI bit is set
762    #[inline(always)]
763    pub fn is_disabled(&self) -> bool {
764        *self == SLKIE::Disabled
765    }
766    ///Interrupt generated when SLAKI bit is set
767    #[inline(always)]
768    pub fn is_enabled(&self) -> bool {
769        *self == SLKIE::Enabled
770    }
771}
772///Field `SLKIE` writer - SLKIE
773pub type SLKIE_W<'a, REG> = crate::BitWriter<'a, REG, SLKIE>;
774impl<'a, REG> SLKIE_W<'a, REG>
775where
776    REG: crate::Writable + crate::RegisterSpec,
777{
778    ///No interrupt when SLAKI bit is set
779    #[inline(always)]
780    pub fn disabled(self) -> &'a mut crate::W<REG> {
781        self.variant(SLKIE::Disabled)
782    }
783    ///Interrupt generated when SLAKI bit is set
784    #[inline(always)]
785    pub fn enabled(self) -> &'a mut crate::W<REG> {
786        self.variant(SLKIE::Enabled)
787    }
788}
789impl R {
790    ///Bit 0 - TMEIE
791    #[inline(always)]
792    pub fn tmeie(&self) -> TMEIE_R {
793        TMEIE_R::new((self.bits & 1) != 0)
794    }
795    ///Bit 1 - FMPIE0
796    #[inline(always)]
797    pub fn fmpie0(&self) -> FMPIE0_R {
798        FMPIE0_R::new(((self.bits >> 1) & 1) != 0)
799    }
800    ///Bit 2 - FFIE0
801    #[inline(always)]
802    pub fn ffie0(&self) -> FFIE0_R {
803        FFIE0_R::new(((self.bits >> 2) & 1) != 0)
804    }
805    ///Bit 3 - FOVIE0
806    #[inline(always)]
807    pub fn fovie0(&self) -> FOVIE0_R {
808        FOVIE0_R::new(((self.bits >> 3) & 1) != 0)
809    }
810    ///Bit 4 - FMPIE1
811    #[inline(always)]
812    pub fn fmpie1(&self) -> FMPIE1_R {
813        FMPIE1_R::new(((self.bits >> 4) & 1) != 0)
814    }
815    ///Bit 5 - FFIE1
816    #[inline(always)]
817    pub fn ffie1(&self) -> FFIE1_R {
818        FFIE1_R::new(((self.bits >> 5) & 1) != 0)
819    }
820    ///Bit 6 - FOVIE1
821    #[inline(always)]
822    pub fn fovie1(&self) -> FOVIE1_R {
823        FOVIE1_R::new(((self.bits >> 6) & 1) != 0)
824    }
825    ///Bit 8 - EWGIE
826    #[inline(always)]
827    pub fn ewgie(&self) -> EWGIE_R {
828        EWGIE_R::new(((self.bits >> 8) & 1) != 0)
829    }
830    ///Bit 9 - EPVIE
831    #[inline(always)]
832    pub fn epvie(&self) -> EPVIE_R {
833        EPVIE_R::new(((self.bits >> 9) & 1) != 0)
834    }
835    ///Bit 10 - BOFIE
836    #[inline(always)]
837    pub fn bofie(&self) -> BOFIE_R {
838        BOFIE_R::new(((self.bits >> 10) & 1) != 0)
839    }
840    ///Bit 11 - LECIE
841    #[inline(always)]
842    pub fn lecie(&self) -> LECIE_R {
843        LECIE_R::new(((self.bits >> 11) & 1) != 0)
844    }
845    ///Bit 15 - ERRIE
846    #[inline(always)]
847    pub fn errie(&self) -> ERRIE_R {
848        ERRIE_R::new(((self.bits >> 15) & 1) != 0)
849    }
850    ///Bit 16 - WKUIE
851    #[inline(always)]
852    pub fn wkuie(&self) -> WKUIE_R {
853        WKUIE_R::new(((self.bits >> 16) & 1) != 0)
854    }
855    ///Bit 17 - SLKIE
856    #[inline(always)]
857    pub fn slkie(&self) -> SLKIE_R {
858        SLKIE_R::new(((self.bits >> 17) & 1) != 0)
859    }
860}
861impl core::fmt::Debug for R {
862    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
863        f.debug_struct("IER")
864            .field("slkie", &self.slkie())
865            .field("wkuie", &self.wkuie())
866            .field("errie", &self.errie())
867            .field("lecie", &self.lecie())
868            .field("bofie", &self.bofie())
869            .field("epvie", &self.epvie())
870            .field("ewgie", &self.ewgie())
871            .field("fovie1", &self.fovie1())
872            .field("ffie1", &self.ffie1())
873            .field("fmpie1", &self.fmpie1())
874            .field("fovie0", &self.fovie0())
875            .field("ffie0", &self.ffie0())
876            .field("fmpie0", &self.fmpie0())
877            .field("tmeie", &self.tmeie())
878            .finish()
879    }
880}
881impl W {
882    ///Bit 0 - TMEIE
883    #[inline(always)]
884    pub fn tmeie(&mut self) -> TMEIE_W<IERrs> {
885        TMEIE_W::new(self, 0)
886    }
887    ///Bit 1 - FMPIE0
888    #[inline(always)]
889    pub fn fmpie0(&mut self) -> FMPIE0_W<IERrs> {
890        FMPIE0_W::new(self, 1)
891    }
892    ///Bit 2 - FFIE0
893    #[inline(always)]
894    pub fn ffie0(&mut self) -> FFIE0_W<IERrs> {
895        FFIE0_W::new(self, 2)
896    }
897    ///Bit 3 - FOVIE0
898    #[inline(always)]
899    pub fn fovie0(&mut self) -> FOVIE0_W<IERrs> {
900        FOVIE0_W::new(self, 3)
901    }
902    ///Bit 4 - FMPIE1
903    #[inline(always)]
904    pub fn fmpie1(&mut self) -> FMPIE1_W<IERrs> {
905        FMPIE1_W::new(self, 4)
906    }
907    ///Bit 5 - FFIE1
908    #[inline(always)]
909    pub fn ffie1(&mut self) -> FFIE1_W<IERrs> {
910        FFIE1_W::new(self, 5)
911    }
912    ///Bit 6 - FOVIE1
913    #[inline(always)]
914    pub fn fovie1(&mut self) -> FOVIE1_W<IERrs> {
915        FOVIE1_W::new(self, 6)
916    }
917    ///Bit 8 - EWGIE
918    #[inline(always)]
919    pub fn ewgie(&mut self) -> EWGIE_W<IERrs> {
920        EWGIE_W::new(self, 8)
921    }
922    ///Bit 9 - EPVIE
923    #[inline(always)]
924    pub fn epvie(&mut self) -> EPVIE_W<IERrs> {
925        EPVIE_W::new(self, 9)
926    }
927    ///Bit 10 - BOFIE
928    #[inline(always)]
929    pub fn bofie(&mut self) -> BOFIE_W<IERrs> {
930        BOFIE_W::new(self, 10)
931    }
932    ///Bit 11 - LECIE
933    #[inline(always)]
934    pub fn lecie(&mut self) -> LECIE_W<IERrs> {
935        LECIE_W::new(self, 11)
936    }
937    ///Bit 15 - ERRIE
938    #[inline(always)]
939    pub fn errie(&mut self) -> ERRIE_W<IERrs> {
940        ERRIE_W::new(self, 15)
941    }
942    ///Bit 16 - WKUIE
943    #[inline(always)]
944    pub fn wkuie(&mut self) -> WKUIE_W<IERrs> {
945        WKUIE_W::new(self, 16)
946    }
947    ///Bit 17 - SLKIE
948    #[inline(always)]
949    pub fn slkie(&mut self) -> SLKIE_W<IERrs> {
950        SLKIE_W::new(self, 17)
951    }
952}
953/**CAN_IER
954
955You can [`read`](crate::Reg::read) this register and get [`ier::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ier::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
956
957See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F103.html#CAN:IER)*/
958pub struct IERrs;
959impl crate::RegisterSpec for IERrs {
960    type Ux = u32;
961}
962///`read()` method returns [`ier::R`](R) reader structure
963impl crate::Readable for IERrs {}
964///`write(|w| ..)` method takes [`ier::W`](W) writer structure
965impl crate::Writable for IERrs {
966    type Safety = crate::Unsafe;
967}
968///`reset()` method sets IER to value 0
969impl crate::Resettable for IERrs {}