xmc4300/can_mo/mo/
mofcr.rs

1#[doc = "Register `MOFCR` reader"]
2pub type R = crate::R<MOFCR_SPEC>;
3#[doc = "Register `MOFCR` writer"]
4pub type W = crate::W<MOFCR_SPEC>;
5#[doc = "Message Mode Control\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum MMC_A {
9    #[doc = "0: Standard Message Object"]
10    VALUE1 = 0,
11    #[doc = "1: Receive FIFO Base Object"]
12    VALUE2 = 1,
13    #[doc = "2: Transmit FIFO Base Object"]
14    VALUE3 = 2,
15    #[doc = "3: Transmit FIFO Slave Object"]
16    VALUE4 = 3,
17    #[doc = "4: Gateway Source Object"]
18    VALUE5 = 4,
19}
20impl From<MMC_A> for u8 {
21    #[inline(always)]
22    fn from(variant: MMC_A) -> Self {
23        variant as _
24    }
25}
26impl crate::FieldSpec for MMC_A {
27    type Ux = u8;
28}
29impl crate::IsEnum for MMC_A {}
30#[doc = "Field `MMC` reader - Message Mode Control"]
31pub type MMC_R = crate::FieldReader<MMC_A>;
32impl MMC_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub const fn variant(&self) -> Option<MMC_A> {
36        match self.bits {
37            0 => Some(MMC_A::VALUE1),
38            1 => Some(MMC_A::VALUE2),
39            2 => Some(MMC_A::VALUE3),
40            3 => Some(MMC_A::VALUE4),
41            4 => Some(MMC_A::VALUE5),
42            _ => None,
43        }
44    }
45    #[doc = "Standard Message Object"]
46    #[inline(always)]
47    pub fn is_value1(&self) -> bool {
48        *self == MMC_A::VALUE1
49    }
50    #[doc = "Receive FIFO Base Object"]
51    #[inline(always)]
52    pub fn is_value2(&self) -> bool {
53        *self == MMC_A::VALUE2
54    }
55    #[doc = "Transmit FIFO Base Object"]
56    #[inline(always)]
57    pub fn is_value3(&self) -> bool {
58        *self == MMC_A::VALUE3
59    }
60    #[doc = "Transmit FIFO Slave Object"]
61    #[inline(always)]
62    pub fn is_value4(&self) -> bool {
63        *self == MMC_A::VALUE4
64    }
65    #[doc = "Gateway Source Object"]
66    #[inline(always)]
67    pub fn is_value5(&self) -> bool {
68        *self == MMC_A::VALUE5
69    }
70}
71#[doc = "Field `MMC` writer - Message Mode Control"]
72pub type MMC_W<'a, REG> = crate::FieldWriter<'a, REG, 4, MMC_A>;
73impl<'a, REG> MMC_W<'a, REG>
74where
75    REG: crate::Writable + crate::RegisterSpec,
76    REG::Ux: From<u8>,
77{
78    #[doc = "Standard Message Object"]
79    #[inline(always)]
80    pub fn value1(self) -> &'a mut crate::W<REG> {
81        self.variant(MMC_A::VALUE1)
82    }
83    #[doc = "Receive FIFO Base Object"]
84    #[inline(always)]
85    pub fn value2(self) -> &'a mut crate::W<REG> {
86        self.variant(MMC_A::VALUE2)
87    }
88    #[doc = "Transmit FIFO Base Object"]
89    #[inline(always)]
90    pub fn value3(self) -> &'a mut crate::W<REG> {
91        self.variant(MMC_A::VALUE3)
92    }
93    #[doc = "Transmit FIFO Slave Object"]
94    #[inline(always)]
95    pub fn value4(self) -> &'a mut crate::W<REG> {
96        self.variant(MMC_A::VALUE4)
97    }
98    #[doc = "Gateway Source Object"]
99    #[inline(always)]
100    pub fn value5(self) -> &'a mut crate::W<REG> {
101        self.variant(MMC_A::VALUE5)
102    }
103}
104#[doc = "Receive Time-Out Enable\n\nValue on reset: 0"]
105#[derive(Clone, Copy, Debug, PartialEq, Eq)]
106pub enum RXTOE_A {
107    #[doc = "0: Message does not take part in receive time-out check"]
108    VALUE1 = 0,
109    #[doc = "1: Message takes part in receive time-out check"]
110    VALUE2 = 1,
111}
112impl From<RXTOE_A> for bool {
113    #[inline(always)]
114    fn from(variant: RXTOE_A) -> Self {
115        variant as u8 != 0
116    }
117}
118#[doc = "Field `RXTOE` reader - Receive Time-Out Enable"]
119pub type RXTOE_R = crate::BitReader<RXTOE_A>;
120impl RXTOE_R {
121    #[doc = "Get enumerated values variant"]
122    #[inline(always)]
123    pub const fn variant(&self) -> RXTOE_A {
124        match self.bits {
125            false => RXTOE_A::VALUE1,
126            true => RXTOE_A::VALUE2,
127        }
128    }
129    #[doc = "Message does not take part in receive time-out check"]
130    #[inline(always)]
131    pub fn is_value1(&self) -> bool {
132        *self == RXTOE_A::VALUE1
133    }
134    #[doc = "Message takes part in receive time-out check"]
135    #[inline(always)]
136    pub fn is_value2(&self) -> bool {
137        *self == RXTOE_A::VALUE2
138    }
139}
140#[doc = "Field `RXTOE` writer - Receive Time-Out Enable"]
141pub type RXTOE_W<'a, REG> = crate::BitWriter<'a, REG, RXTOE_A>;
142impl<'a, REG> RXTOE_W<'a, REG>
143where
144    REG: crate::Writable + crate::RegisterSpec,
145{
146    #[doc = "Message does not take part in receive time-out check"]
147    #[inline(always)]
148    pub fn value1(self) -> &'a mut crate::W<REG> {
149        self.variant(RXTOE_A::VALUE1)
150    }
151    #[doc = "Message takes part in receive time-out check"]
152    #[inline(always)]
153    pub fn value2(self) -> &'a mut crate::W<REG> {
154        self.variant(RXTOE_A::VALUE2)
155    }
156}
157#[doc = "Gateway Data Frame Send\n\nValue on reset: 0"]
158#[derive(Clone, Copy, Debug, PartialEq, Eq)]
159pub enum GDFS_A {
160    #[doc = "0: TXRQ is unchanged in the destination object."]
161    VALUE1 = 0,
162    #[doc = "1: TXRQ is set in the gateway destination object after the internal transfer from the gateway source to the gateway destination object."]
163    VALUE2 = 1,
164}
165impl From<GDFS_A> for bool {
166    #[inline(always)]
167    fn from(variant: GDFS_A) -> Self {
168        variant as u8 != 0
169    }
170}
171#[doc = "Field `GDFS` reader - Gateway Data Frame Send"]
172pub type GDFS_R = crate::BitReader<GDFS_A>;
173impl GDFS_R {
174    #[doc = "Get enumerated values variant"]
175    #[inline(always)]
176    pub const fn variant(&self) -> GDFS_A {
177        match self.bits {
178            false => GDFS_A::VALUE1,
179            true => GDFS_A::VALUE2,
180        }
181    }
182    #[doc = "TXRQ is unchanged in the destination object."]
183    #[inline(always)]
184    pub fn is_value1(&self) -> bool {
185        *self == GDFS_A::VALUE1
186    }
187    #[doc = "TXRQ is set in the gateway destination object after the internal transfer from the gateway source to the gateway destination object."]
188    #[inline(always)]
189    pub fn is_value2(&self) -> bool {
190        *self == GDFS_A::VALUE2
191    }
192}
193#[doc = "Field `GDFS` writer - Gateway Data Frame Send"]
194pub type GDFS_W<'a, REG> = crate::BitWriter<'a, REG, GDFS_A>;
195impl<'a, REG> GDFS_W<'a, REG>
196where
197    REG: crate::Writable + crate::RegisterSpec,
198{
199    #[doc = "TXRQ is unchanged in the destination object."]
200    #[inline(always)]
201    pub fn value1(self) -> &'a mut crate::W<REG> {
202        self.variant(GDFS_A::VALUE1)
203    }
204    #[doc = "TXRQ is set in the gateway destination object after the internal transfer from the gateway source to the gateway destination object."]
205    #[inline(always)]
206    pub fn value2(self) -> &'a mut crate::W<REG> {
207        self.variant(GDFS_A::VALUE2)
208    }
209}
210#[doc = "Identifier Copy\n\nValue on reset: 0"]
211#[derive(Clone, Copy, Debug, PartialEq, Eq)]
212pub enum IDC_A {
213    #[doc = "0: The identifier of the gateway source object is not copied."]
214    VALUE1 = 0,
215    #[doc = "1: The identifier of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
216    VALUE2 = 1,
217}
218impl From<IDC_A> for bool {
219    #[inline(always)]
220    fn from(variant: IDC_A) -> Self {
221        variant as u8 != 0
222    }
223}
224#[doc = "Field `IDC` reader - Identifier Copy"]
225pub type IDC_R = crate::BitReader<IDC_A>;
226impl IDC_R {
227    #[doc = "Get enumerated values variant"]
228    #[inline(always)]
229    pub const fn variant(&self) -> IDC_A {
230        match self.bits {
231            false => IDC_A::VALUE1,
232            true => IDC_A::VALUE2,
233        }
234    }
235    #[doc = "The identifier of the gateway source object is not copied."]
236    #[inline(always)]
237    pub fn is_value1(&self) -> bool {
238        *self == IDC_A::VALUE1
239    }
240    #[doc = "The identifier of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
241    #[inline(always)]
242    pub fn is_value2(&self) -> bool {
243        *self == IDC_A::VALUE2
244    }
245}
246#[doc = "Field `IDC` writer - Identifier Copy"]
247pub type IDC_W<'a, REG> = crate::BitWriter<'a, REG, IDC_A>;
248impl<'a, REG> IDC_W<'a, REG>
249where
250    REG: crate::Writable + crate::RegisterSpec,
251{
252    #[doc = "The identifier of the gateway source object is not copied."]
253    #[inline(always)]
254    pub fn value1(self) -> &'a mut crate::W<REG> {
255        self.variant(IDC_A::VALUE1)
256    }
257    #[doc = "The identifier of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
258    #[inline(always)]
259    pub fn value2(self) -> &'a mut crate::W<REG> {
260        self.variant(IDC_A::VALUE2)
261    }
262}
263#[doc = "Data Length Code Copy\n\nValue on reset: 0"]
264#[derive(Clone, Copy, Debug, PartialEq, Eq)]
265pub enum DLCC_A {
266    #[doc = "0: Data length code is not copied."]
267    VALUE1 = 0,
268    #[doc = "1: Data length code of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
269    VALUE2 = 1,
270}
271impl From<DLCC_A> for bool {
272    #[inline(always)]
273    fn from(variant: DLCC_A) -> Self {
274        variant as u8 != 0
275    }
276}
277#[doc = "Field `DLCC` reader - Data Length Code Copy"]
278pub type DLCC_R = crate::BitReader<DLCC_A>;
279impl DLCC_R {
280    #[doc = "Get enumerated values variant"]
281    #[inline(always)]
282    pub const fn variant(&self) -> DLCC_A {
283        match self.bits {
284            false => DLCC_A::VALUE1,
285            true => DLCC_A::VALUE2,
286        }
287    }
288    #[doc = "Data length code is not copied."]
289    #[inline(always)]
290    pub fn is_value1(&self) -> bool {
291        *self == DLCC_A::VALUE1
292    }
293    #[doc = "Data length code of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
294    #[inline(always)]
295    pub fn is_value2(&self) -> bool {
296        *self == DLCC_A::VALUE2
297    }
298}
299#[doc = "Field `DLCC` writer - Data Length Code Copy"]
300pub type DLCC_W<'a, REG> = crate::BitWriter<'a, REG, DLCC_A>;
301impl<'a, REG> DLCC_W<'a, REG>
302where
303    REG: crate::Writable + crate::RegisterSpec,
304{
305    #[doc = "Data length code is not copied."]
306    #[inline(always)]
307    pub fn value1(self) -> &'a mut crate::W<REG> {
308        self.variant(DLCC_A::VALUE1)
309    }
310    #[doc = "Data length code of the gateway source object (after storing the received frame in the source) is copied to the gateway destination object."]
311    #[inline(always)]
312    pub fn value2(self) -> &'a mut crate::W<REG> {
313        self.variant(DLCC_A::VALUE2)
314    }
315}
316#[doc = "Data Copy\n\nValue on reset: 0"]
317#[derive(Clone, Copy, Debug, PartialEq, Eq)]
318pub enum DATC_A {
319    #[doc = "0: Data fields are not copied."]
320    VALUE1 = 0,
321    #[doc = "1: Data fields in registers MODATALn and MODATAHn of the gateway source object (after storing the received frame in the source) are copied to the gateway destination."]
322    VALUE2 = 1,
323}
324impl From<DATC_A> for bool {
325    #[inline(always)]
326    fn from(variant: DATC_A) -> Self {
327        variant as u8 != 0
328    }
329}
330#[doc = "Field `DATC` reader - Data Copy"]
331pub type DATC_R = crate::BitReader<DATC_A>;
332impl DATC_R {
333    #[doc = "Get enumerated values variant"]
334    #[inline(always)]
335    pub const fn variant(&self) -> DATC_A {
336        match self.bits {
337            false => DATC_A::VALUE1,
338            true => DATC_A::VALUE2,
339        }
340    }
341    #[doc = "Data fields are not copied."]
342    #[inline(always)]
343    pub fn is_value1(&self) -> bool {
344        *self == DATC_A::VALUE1
345    }
346    #[doc = "Data fields in registers MODATALn and MODATAHn of the gateway source object (after storing the received frame in the source) are copied to the gateway destination."]
347    #[inline(always)]
348    pub fn is_value2(&self) -> bool {
349        *self == DATC_A::VALUE2
350    }
351}
352#[doc = "Field `DATC` writer - Data Copy"]
353pub type DATC_W<'a, REG> = crate::BitWriter<'a, REG, DATC_A>;
354impl<'a, REG> DATC_W<'a, REG>
355where
356    REG: crate::Writable + crate::RegisterSpec,
357{
358    #[doc = "Data fields are not copied."]
359    #[inline(always)]
360    pub fn value1(self) -> &'a mut crate::W<REG> {
361        self.variant(DATC_A::VALUE1)
362    }
363    #[doc = "Data fields in registers MODATALn and MODATAHn of the gateway source object (after storing the received frame in the source) are copied to the gateway destination."]
364    #[inline(always)]
365    pub fn value2(self) -> &'a mut crate::W<REG> {
366        self.variant(DATC_A::VALUE2)
367    }
368}
369#[doc = "Receive Interrupt Enable\n\nValue on reset: 0"]
370#[derive(Clone, Copy, Debug, PartialEq, Eq)]
371pub enum RXIE_A {
372    #[doc = "0: Message receive interrupt is disabled."]
373    VALUE1 = 0,
374    #[doc = "1: Message receive interrupt is enabled."]
375    VALUE2 = 1,
376}
377impl From<RXIE_A> for bool {
378    #[inline(always)]
379    fn from(variant: RXIE_A) -> Self {
380        variant as u8 != 0
381    }
382}
383#[doc = "Field `RXIE` reader - Receive Interrupt Enable"]
384pub type RXIE_R = crate::BitReader<RXIE_A>;
385impl RXIE_R {
386    #[doc = "Get enumerated values variant"]
387    #[inline(always)]
388    pub const fn variant(&self) -> RXIE_A {
389        match self.bits {
390            false => RXIE_A::VALUE1,
391            true => RXIE_A::VALUE2,
392        }
393    }
394    #[doc = "Message receive interrupt is disabled."]
395    #[inline(always)]
396    pub fn is_value1(&self) -> bool {
397        *self == RXIE_A::VALUE1
398    }
399    #[doc = "Message receive interrupt is enabled."]
400    #[inline(always)]
401    pub fn is_value2(&self) -> bool {
402        *self == RXIE_A::VALUE2
403    }
404}
405#[doc = "Field `RXIE` writer - Receive Interrupt Enable"]
406pub type RXIE_W<'a, REG> = crate::BitWriter<'a, REG, RXIE_A>;
407impl<'a, REG> RXIE_W<'a, REG>
408where
409    REG: crate::Writable + crate::RegisterSpec,
410{
411    #[doc = "Message receive interrupt is disabled."]
412    #[inline(always)]
413    pub fn value1(self) -> &'a mut crate::W<REG> {
414        self.variant(RXIE_A::VALUE1)
415    }
416    #[doc = "Message receive interrupt is enabled."]
417    #[inline(always)]
418    pub fn value2(self) -> &'a mut crate::W<REG> {
419        self.variant(RXIE_A::VALUE2)
420    }
421}
422#[doc = "Transmit Interrupt Enable\n\nValue on reset: 0"]
423#[derive(Clone, Copy, Debug, PartialEq, Eq)]
424pub enum TXIE_A {
425    #[doc = "0: Message transmit interrupt is disabled."]
426    VALUE1 = 0,
427    #[doc = "1: Message transmit interrupt is enabled."]
428    VALUE2 = 1,
429}
430impl From<TXIE_A> for bool {
431    #[inline(always)]
432    fn from(variant: TXIE_A) -> Self {
433        variant as u8 != 0
434    }
435}
436#[doc = "Field `TXIE` reader - Transmit Interrupt Enable"]
437pub type TXIE_R = crate::BitReader<TXIE_A>;
438impl TXIE_R {
439    #[doc = "Get enumerated values variant"]
440    #[inline(always)]
441    pub const fn variant(&self) -> TXIE_A {
442        match self.bits {
443            false => TXIE_A::VALUE1,
444            true => TXIE_A::VALUE2,
445        }
446    }
447    #[doc = "Message transmit interrupt is disabled."]
448    #[inline(always)]
449    pub fn is_value1(&self) -> bool {
450        *self == TXIE_A::VALUE1
451    }
452    #[doc = "Message transmit interrupt is enabled."]
453    #[inline(always)]
454    pub fn is_value2(&self) -> bool {
455        *self == TXIE_A::VALUE2
456    }
457}
458#[doc = "Field `TXIE` writer - Transmit Interrupt Enable"]
459pub type TXIE_W<'a, REG> = crate::BitWriter<'a, REG, TXIE_A>;
460impl<'a, REG> TXIE_W<'a, REG>
461where
462    REG: crate::Writable + crate::RegisterSpec,
463{
464    #[doc = "Message transmit interrupt is disabled."]
465    #[inline(always)]
466    pub fn value1(self) -> &'a mut crate::W<REG> {
467        self.variant(TXIE_A::VALUE1)
468    }
469    #[doc = "Message transmit interrupt is enabled."]
470    #[inline(always)]
471    pub fn value2(self) -> &'a mut crate::W<REG> {
472        self.variant(TXIE_A::VALUE2)
473    }
474}
475#[doc = "Overflow Interrupt Enable\n\nValue on reset: 0"]
476#[derive(Clone, Copy, Debug, PartialEq, Eq)]
477pub enum OVIE_A {
478    #[doc = "0: FIFO full interrupt is disabled."]
479    VALUE1 = 0,
480    #[doc = "1: FIFO full interrupt is enabled."]
481    VALUE2 = 1,
482}
483impl From<OVIE_A> for bool {
484    #[inline(always)]
485    fn from(variant: OVIE_A) -> Self {
486        variant as u8 != 0
487    }
488}
489#[doc = "Field `OVIE` reader - Overflow Interrupt Enable"]
490pub type OVIE_R = crate::BitReader<OVIE_A>;
491impl OVIE_R {
492    #[doc = "Get enumerated values variant"]
493    #[inline(always)]
494    pub const fn variant(&self) -> OVIE_A {
495        match self.bits {
496            false => OVIE_A::VALUE1,
497            true => OVIE_A::VALUE2,
498        }
499    }
500    #[doc = "FIFO full interrupt is disabled."]
501    #[inline(always)]
502    pub fn is_value1(&self) -> bool {
503        *self == OVIE_A::VALUE1
504    }
505    #[doc = "FIFO full interrupt is enabled."]
506    #[inline(always)]
507    pub fn is_value2(&self) -> bool {
508        *self == OVIE_A::VALUE2
509    }
510}
511#[doc = "Field `OVIE` writer - Overflow Interrupt Enable"]
512pub type OVIE_W<'a, REG> = crate::BitWriter<'a, REG, OVIE_A>;
513impl<'a, REG> OVIE_W<'a, REG>
514where
515    REG: crate::Writable + crate::RegisterSpec,
516{
517    #[doc = "FIFO full interrupt is disabled."]
518    #[inline(always)]
519    pub fn value1(self) -> &'a mut crate::W<REG> {
520        self.variant(OVIE_A::VALUE1)
521    }
522    #[doc = "FIFO full interrupt is enabled."]
523    #[inline(always)]
524    pub fn value2(self) -> &'a mut crate::W<REG> {
525        self.variant(OVIE_A::VALUE2)
526    }
527}
528#[doc = "Foreign Remote Request Enable\n\nValue on reset: 0"]
529#[derive(Clone, Copy, Debug, PartialEq, Eq)]
530pub enum FRREN_A {
531    #[doc = "0: TXRQ of message object n is set on reception of a matching Remote Frame."]
532    VALUE1 = 0,
533    #[doc = "1: TXRQ of the message object referenced by the pointer CUR is set on reception of a matching Remote Frame."]
534    VALUE2 = 1,
535}
536impl From<FRREN_A> for bool {
537    #[inline(always)]
538    fn from(variant: FRREN_A) -> Self {
539        variant as u8 != 0
540    }
541}
542#[doc = "Field `FRREN` reader - Foreign Remote Request Enable"]
543pub type FRREN_R = crate::BitReader<FRREN_A>;
544impl FRREN_R {
545    #[doc = "Get enumerated values variant"]
546    #[inline(always)]
547    pub const fn variant(&self) -> FRREN_A {
548        match self.bits {
549            false => FRREN_A::VALUE1,
550            true => FRREN_A::VALUE2,
551        }
552    }
553    #[doc = "TXRQ of message object n is set on reception of a matching Remote Frame."]
554    #[inline(always)]
555    pub fn is_value1(&self) -> bool {
556        *self == FRREN_A::VALUE1
557    }
558    #[doc = "TXRQ of the message object referenced by the pointer CUR is set on reception of a matching Remote Frame."]
559    #[inline(always)]
560    pub fn is_value2(&self) -> bool {
561        *self == FRREN_A::VALUE2
562    }
563}
564#[doc = "Field `FRREN` writer - Foreign Remote Request Enable"]
565pub type FRREN_W<'a, REG> = crate::BitWriter<'a, REG, FRREN_A>;
566impl<'a, REG> FRREN_W<'a, REG>
567where
568    REG: crate::Writable + crate::RegisterSpec,
569{
570    #[doc = "TXRQ of message object n is set on reception of a matching Remote Frame."]
571    #[inline(always)]
572    pub fn value1(self) -> &'a mut crate::W<REG> {
573        self.variant(FRREN_A::VALUE1)
574    }
575    #[doc = "TXRQ of the message object referenced by the pointer CUR is set on reception of a matching Remote Frame."]
576    #[inline(always)]
577    pub fn value2(self) -> &'a mut crate::W<REG> {
578        self.variant(FRREN_A::VALUE2)
579    }
580}
581#[doc = "Transmit Object Remote Monitoring\n\nValue on reset: 0"]
582#[derive(Clone, Copy, Debug, PartialEq, Eq)]
583pub enum RMM_A {
584    #[doc = "0: Remote monitoring is disabled: Identifier, IDE bit, and DLC of message object n remain unchanged upon the reception of a matching Remote Frame."]
585    VALUE1 = 0,
586    #[doc = "1: Remote monitoring is enabled: Identifier, IDE bit, and DLC of a matching Remote Frame are copied to transmit object n in order to monitor incoming Remote Frames."]
587    VALUE2 = 1,
588}
589impl From<RMM_A> for bool {
590    #[inline(always)]
591    fn from(variant: RMM_A) -> Self {
592        variant as u8 != 0
593    }
594}
595#[doc = "Field `RMM` reader - Transmit Object Remote Monitoring"]
596pub type RMM_R = crate::BitReader<RMM_A>;
597impl RMM_R {
598    #[doc = "Get enumerated values variant"]
599    #[inline(always)]
600    pub const fn variant(&self) -> RMM_A {
601        match self.bits {
602            false => RMM_A::VALUE1,
603            true => RMM_A::VALUE2,
604        }
605    }
606    #[doc = "Remote monitoring is disabled: Identifier, IDE bit, and DLC of message object n remain unchanged upon the reception of a matching Remote Frame."]
607    #[inline(always)]
608    pub fn is_value1(&self) -> bool {
609        *self == RMM_A::VALUE1
610    }
611    #[doc = "Remote monitoring is enabled: Identifier, IDE bit, and DLC of a matching Remote Frame are copied to transmit object n in order to monitor incoming Remote Frames."]
612    #[inline(always)]
613    pub fn is_value2(&self) -> bool {
614        *self == RMM_A::VALUE2
615    }
616}
617#[doc = "Field `RMM` writer - Transmit Object Remote Monitoring"]
618pub type RMM_W<'a, REG> = crate::BitWriter<'a, REG, RMM_A>;
619impl<'a, REG> RMM_W<'a, REG>
620where
621    REG: crate::Writable + crate::RegisterSpec,
622{
623    #[doc = "Remote monitoring is disabled: Identifier, IDE bit, and DLC of message object n remain unchanged upon the reception of a matching Remote Frame."]
624    #[inline(always)]
625    pub fn value1(self) -> &'a mut crate::W<REG> {
626        self.variant(RMM_A::VALUE1)
627    }
628    #[doc = "Remote monitoring is enabled: Identifier, IDE bit, and DLC of a matching Remote Frame are copied to transmit object n in order to monitor incoming Remote Frames."]
629    #[inline(always)]
630    pub fn value2(self) -> &'a mut crate::W<REG> {
631        self.variant(RMM_A::VALUE2)
632    }
633}
634#[doc = "Field `SDT` reader - Single Data Transfer"]
635pub type SDT_R = crate::BitReader;
636#[doc = "Field `SDT` writer - Single Data Transfer"]
637pub type SDT_W<'a, REG> = crate::BitWriter<'a, REG>;
638#[doc = "Field `STT` reader - Single Transmit Trial"]
639pub type STT_R = crate::BitReader;
640#[doc = "Field `STT` writer - Single Transmit Trial"]
641pub type STT_W<'a, REG> = crate::BitWriter<'a, REG>;
642#[doc = "Field `DLC` reader - Data Length Code"]
643pub type DLC_R = crate::FieldReader;
644#[doc = "Field `DLC` writer - Data Length Code"]
645pub type DLC_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
646impl R {
647    #[doc = "Bits 0:3 - Message Mode Control"]
648    #[inline(always)]
649    pub fn mmc(&self) -> MMC_R {
650        MMC_R::new((self.bits & 0x0f) as u8)
651    }
652    #[doc = "Bit 4 - Receive Time-Out Enable"]
653    #[inline(always)]
654    pub fn rxtoe(&self) -> RXTOE_R {
655        RXTOE_R::new(((self.bits >> 4) & 1) != 0)
656    }
657    #[doc = "Bit 8 - Gateway Data Frame Send"]
658    #[inline(always)]
659    pub fn gdfs(&self) -> GDFS_R {
660        GDFS_R::new(((self.bits >> 8) & 1) != 0)
661    }
662    #[doc = "Bit 9 - Identifier Copy"]
663    #[inline(always)]
664    pub fn idc(&self) -> IDC_R {
665        IDC_R::new(((self.bits >> 9) & 1) != 0)
666    }
667    #[doc = "Bit 10 - Data Length Code Copy"]
668    #[inline(always)]
669    pub fn dlcc(&self) -> DLCC_R {
670        DLCC_R::new(((self.bits >> 10) & 1) != 0)
671    }
672    #[doc = "Bit 11 - Data Copy"]
673    #[inline(always)]
674    pub fn datc(&self) -> DATC_R {
675        DATC_R::new(((self.bits >> 11) & 1) != 0)
676    }
677    #[doc = "Bit 16 - Receive Interrupt Enable"]
678    #[inline(always)]
679    pub fn rxie(&self) -> RXIE_R {
680        RXIE_R::new(((self.bits >> 16) & 1) != 0)
681    }
682    #[doc = "Bit 17 - Transmit Interrupt Enable"]
683    #[inline(always)]
684    pub fn txie(&self) -> TXIE_R {
685        TXIE_R::new(((self.bits >> 17) & 1) != 0)
686    }
687    #[doc = "Bit 18 - Overflow Interrupt Enable"]
688    #[inline(always)]
689    pub fn ovie(&self) -> OVIE_R {
690        OVIE_R::new(((self.bits >> 18) & 1) != 0)
691    }
692    #[doc = "Bit 20 - Foreign Remote Request Enable"]
693    #[inline(always)]
694    pub fn frren(&self) -> FRREN_R {
695        FRREN_R::new(((self.bits >> 20) & 1) != 0)
696    }
697    #[doc = "Bit 21 - Transmit Object Remote Monitoring"]
698    #[inline(always)]
699    pub fn rmm(&self) -> RMM_R {
700        RMM_R::new(((self.bits >> 21) & 1) != 0)
701    }
702    #[doc = "Bit 22 - Single Data Transfer"]
703    #[inline(always)]
704    pub fn sdt(&self) -> SDT_R {
705        SDT_R::new(((self.bits >> 22) & 1) != 0)
706    }
707    #[doc = "Bit 23 - Single Transmit Trial"]
708    #[inline(always)]
709    pub fn stt(&self) -> STT_R {
710        STT_R::new(((self.bits >> 23) & 1) != 0)
711    }
712    #[doc = "Bits 24:27 - Data Length Code"]
713    #[inline(always)]
714    pub fn dlc(&self) -> DLC_R {
715        DLC_R::new(((self.bits >> 24) & 0x0f) as u8)
716    }
717}
718impl W {
719    #[doc = "Bits 0:3 - Message Mode Control"]
720    #[inline(always)]
721    pub fn mmc(&mut self) -> MMC_W<MOFCR_SPEC> {
722        MMC_W::new(self, 0)
723    }
724    #[doc = "Bit 4 - Receive Time-Out Enable"]
725    #[inline(always)]
726    pub fn rxtoe(&mut self) -> RXTOE_W<MOFCR_SPEC> {
727        RXTOE_W::new(self, 4)
728    }
729    #[doc = "Bit 8 - Gateway Data Frame Send"]
730    #[inline(always)]
731    pub fn gdfs(&mut self) -> GDFS_W<MOFCR_SPEC> {
732        GDFS_W::new(self, 8)
733    }
734    #[doc = "Bit 9 - Identifier Copy"]
735    #[inline(always)]
736    pub fn idc(&mut self) -> IDC_W<MOFCR_SPEC> {
737        IDC_W::new(self, 9)
738    }
739    #[doc = "Bit 10 - Data Length Code Copy"]
740    #[inline(always)]
741    pub fn dlcc(&mut self) -> DLCC_W<MOFCR_SPEC> {
742        DLCC_W::new(self, 10)
743    }
744    #[doc = "Bit 11 - Data Copy"]
745    #[inline(always)]
746    pub fn datc(&mut self) -> DATC_W<MOFCR_SPEC> {
747        DATC_W::new(self, 11)
748    }
749    #[doc = "Bit 16 - Receive Interrupt Enable"]
750    #[inline(always)]
751    pub fn rxie(&mut self) -> RXIE_W<MOFCR_SPEC> {
752        RXIE_W::new(self, 16)
753    }
754    #[doc = "Bit 17 - Transmit Interrupt Enable"]
755    #[inline(always)]
756    pub fn txie(&mut self) -> TXIE_W<MOFCR_SPEC> {
757        TXIE_W::new(self, 17)
758    }
759    #[doc = "Bit 18 - Overflow Interrupt Enable"]
760    #[inline(always)]
761    pub fn ovie(&mut self) -> OVIE_W<MOFCR_SPEC> {
762        OVIE_W::new(self, 18)
763    }
764    #[doc = "Bit 20 - Foreign Remote Request Enable"]
765    #[inline(always)]
766    pub fn frren(&mut self) -> FRREN_W<MOFCR_SPEC> {
767        FRREN_W::new(self, 20)
768    }
769    #[doc = "Bit 21 - Transmit Object Remote Monitoring"]
770    #[inline(always)]
771    pub fn rmm(&mut self) -> RMM_W<MOFCR_SPEC> {
772        RMM_W::new(self, 21)
773    }
774    #[doc = "Bit 22 - Single Data Transfer"]
775    #[inline(always)]
776    pub fn sdt(&mut self) -> SDT_W<MOFCR_SPEC> {
777        SDT_W::new(self, 22)
778    }
779    #[doc = "Bit 23 - Single Transmit Trial"]
780    #[inline(always)]
781    pub fn stt(&mut self) -> STT_W<MOFCR_SPEC> {
782        STT_W::new(self, 23)
783    }
784    #[doc = "Bits 24:27 - Data Length Code"]
785    #[inline(always)]
786    pub fn dlc(&mut self) -> DLC_W<MOFCR_SPEC> {
787        DLC_W::new(self, 24)
788    }
789}
790#[doc = "Message Object Function Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`mofcr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mofcr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
791pub struct MOFCR_SPEC;
792impl crate::RegisterSpec for MOFCR_SPEC {
793    type Ux = u32;
794}
795#[doc = "`read()` method returns [`mofcr::R`](R) reader structure"]
796impl crate::Readable for MOFCR_SPEC {}
797#[doc = "`write(|w| ..)` method takes [`mofcr::W`](W) writer structure"]
798impl crate::Writable for MOFCR_SPEC {
799    type Safety = crate::Unsafe;
800    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
801    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
802}
803#[doc = "`reset()` method sets MOFCR to value 0"]
804impl crate::Resettable for MOFCR_SPEC {
805    const RESET_VALUE: u32 = 0;
806}