xmc4700/can_mo/mo/
moctr.rs

1#[doc = "Register `MOCTR` writer"]
2pub type W = crate::W<MOCTR_SPEC>;
3#[doc = "Field `RESRXPND` writer - Reset/Set Receive Pending"]
4pub type RESRXPND_W<'a, REG> = crate::BitWriter<'a, REG>;
5#[doc = "Field `RESTXPND` writer - Reset/Set Transmit Pending"]
6pub type RESTXPND_W<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `RESRXUPD` writer - Reset/Set Receive Updating"]
8pub type RESRXUPD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RESNEWDAT` writer - Reset/Set New Data"]
10pub type RESNEWDAT_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `RESMSGLST` writer - Reset/Set Message Lost"]
12pub type RESMSGLST_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RESMSGVAL` writer - Reset/Set Message Valid"]
14pub type RESMSGVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `RESRTSEL` writer - Reset/Set Receive/Transmit Selected"]
16pub type RESRTSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `RESRXEN` writer - Reset/Set Receive Enable"]
18pub type RESRXEN_W<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `RESTXRQ` writer - Reset/Set Transmit Request"]
20pub type RESTXRQ_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RESTXEN0` writer - Reset/Set Transmit Enable 0"]
22pub type RESTXEN0_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `RESTXEN1` writer - Reset/Set Transmit Enable 1"]
24pub type RESTXEN1_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RESDIR` writer - Reset/Set Message Direction"]
26pub type RESDIR_W<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `SETRXPND` writer - Reset/Set Receive Pending"]
28pub type SETRXPND_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `SETTXPND` writer - Reset/Set Transmit Pending"]
30pub type SETTXPND_W<'a, REG> = crate::BitWriter<'a, REG>;
31#[doc = "Field `SETRXUPD` writer - Reset/Set Receive Updating"]
32pub type SETRXUPD_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SETNEWDAT` writer - Reset/Set New Data"]
34pub type SETNEWDAT_W<'a, REG> = crate::BitWriter<'a, REG>;
35#[doc = "Field `SETMSGLST` writer - Reset/Set Message Lost"]
36pub type SETMSGLST_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `SETMSGVAL` writer - Reset/Set Message Valid"]
38pub type SETMSGVAL_W<'a, REG> = crate::BitWriter<'a, REG>;
39#[doc = "Field `SETRTSEL` writer - Reset/Set Receive/Transmit Selected"]
40pub type SETRTSEL_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SETRXEN` writer - Reset/Set Receive Enable"]
42pub type SETRXEN_W<'a, REG> = crate::BitWriter<'a, REG>;
43#[doc = "Field `SETTXRQ` writer - Reset/Set Transmit Request"]
44pub type SETTXRQ_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SETTXEN0` writer - Reset/Set Transmit Enable 0"]
46pub type SETTXEN0_W<'a, REG> = crate::BitWriter<'a, REG>;
47#[doc = "Field `SETTXEN1` writer - Reset/Set Transmit Enable 1"]
48pub type SETTXEN1_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `SETDIR` writer - Reset/Set Message Direction"]
50pub type SETDIR_W<'a, REG> = crate::BitWriter<'a, REG>;
51impl W {
52    #[doc = "Bit 0 - Reset/Set Receive Pending"]
53    #[inline(always)]
54    pub fn resrxpnd(&mut self) -> RESRXPND_W<MOCTR_SPEC> {
55        RESRXPND_W::new(self, 0)
56    }
57    #[doc = "Bit 1 - Reset/Set Transmit Pending"]
58    #[inline(always)]
59    pub fn restxpnd(&mut self) -> RESTXPND_W<MOCTR_SPEC> {
60        RESTXPND_W::new(self, 1)
61    }
62    #[doc = "Bit 2 - Reset/Set Receive Updating"]
63    #[inline(always)]
64    pub fn resrxupd(&mut self) -> RESRXUPD_W<MOCTR_SPEC> {
65        RESRXUPD_W::new(self, 2)
66    }
67    #[doc = "Bit 3 - Reset/Set New Data"]
68    #[inline(always)]
69    pub fn resnewdat(&mut self) -> RESNEWDAT_W<MOCTR_SPEC> {
70        RESNEWDAT_W::new(self, 3)
71    }
72    #[doc = "Bit 4 - Reset/Set Message Lost"]
73    #[inline(always)]
74    pub fn resmsglst(&mut self) -> RESMSGLST_W<MOCTR_SPEC> {
75        RESMSGLST_W::new(self, 4)
76    }
77    #[doc = "Bit 5 - Reset/Set Message Valid"]
78    #[inline(always)]
79    pub fn resmsgval(&mut self) -> RESMSGVAL_W<MOCTR_SPEC> {
80        RESMSGVAL_W::new(self, 5)
81    }
82    #[doc = "Bit 6 - Reset/Set Receive/Transmit Selected"]
83    #[inline(always)]
84    pub fn resrtsel(&mut self) -> RESRTSEL_W<MOCTR_SPEC> {
85        RESRTSEL_W::new(self, 6)
86    }
87    #[doc = "Bit 7 - Reset/Set Receive Enable"]
88    #[inline(always)]
89    pub fn resrxen(&mut self) -> RESRXEN_W<MOCTR_SPEC> {
90        RESRXEN_W::new(self, 7)
91    }
92    #[doc = "Bit 8 - Reset/Set Transmit Request"]
93    #[inline(always)]
94    pub fn restxrq(&mut self) -> RESTXRQ_W<MOCTR_SPEC> {
95        RESTXRQ_W::new(self, 8)
96    }
97    #[doc = "Bit 9 - Reset/Set Transmit Enable 0"]
98    #[inline(always)]
99    pub fn restxen0(&mut self) -> RESTXEN0_W<MOCTR_SPEC> {
100        RESTXEN0_W::new(self, 9)
101    }
102    #[doc = "Bit 10 - Reset/Set Transmit Enable 1"]
103    #[inline(always)]
104    pub fn restxen1(&mut self) -> RESTXEN1_W<MOCTR_SPEC> {
105        RESTXEN1_W::new(self, 10)
106    }
107    #[doc = "Bit 11 - Reset/Set Message Direction"]
108    #[inline(always)]
109    pub fn resdir(&mut self) -> RESDIR_W<MOCTR_SPEC> {
110        RESDIR_W::new(self, 11)
111    }
112    #[doc = "Bit 16 - Reset/Set Receive Pending"]
113    #[inline(always)]
114    pub fn setrxpnd(&mut self) -> SETRXPND_W<MOCTR_SPEC> {
115        SETRXPND_W::new(self, 16)
116    }
117    #[doc = "Bit 17 - Reset/Set Transmit Pending"]
118    #[inline(always)]
119    pub fn settxpnd(&mut self) -> SETTXPND_W<MOCTR_SPEC> {
120        SETTXPND_W::new(self, 17)
121    }
122    #[doc = "Bit 18 - Reset/Set Receive Updating"]
123    #[inline(always)]
124    pub fn setrxupd(&mut self) -> SETRXUPD_W<MOCTR_SPEC> {
125        SETRXUPD_W::new(self, 18)
126    }
127    #[doc = "Bit 19 - Reset/Set New Data"]
128    #[inline(always)]
129    pub fn setnewdat(&mut self) -> SETNEWDAT_W<MOCTR_SPEC> {
130        SETNEWDAT_W::new(self, 19)
131    }
132    #[doc = "Bit 20 - Reset/Set Message Lost"]
133    #[inline(always)]
134    pub fn setmsglst(&mut self) -> SETMSGLST_W<MOCTR_SPEC> {
135        SETMSGLST_W::new(self, 20)
136    }
137    #[doc = "Bit 21 - Reset/Set Message Valid"]
138    #[inline(always)]
139    pub fn setmsgval(&mut self) -> SETMSGVAL_W<MOCTR_SPEC> {
140        SETMSGVAL_W::new(self, 21)
141    }
142    #[doc = "Bit 22 - Reset/Set Receive/Transmit Selected"]
143    #[inline(always)]
144    pub fn setrtsel(&mut self) -> SETRTSEL_W<MOCTR_SPEC> {
145        SETRTSEL_W::new(self, 22)
146    }
147    #[doc = "Bit 23 - Reset/Set Receive Enable"]
148    #[inline(always)]
149    pub fn setrxen(&mut self) -> SETRXEN_W<MOCTR_SPEC> {
150        SETRXEN_W::new(self, 23)
151    }
152    #[doc = "Bit 24 - Reset/Set Transmit Request"]
153    #[inline(always)]
154    pub fn settxrq(&mut self) -> SETTXRQ_W<MOCTR_SPEC> {
155        SETTXRQ_W::new(self, 24)
156    }
157    #[doc = "Bit 25 - Reset/Set Transmit Enable 0"]
158    #[inline(always)]
159    pub fn settxen0(&mut self) -> SETTXEN0_W<MOCTR_SPEC> {
160        SETTXEN0_W::new(self, 25)
161    }
162    #[doc = "Bit 26 - Reset/Set Transmit Enable 1"]
163    #[inline(always)]
164    pub fn settxen1(&mut self) -> SETTXEN1_W<MOCTR_SPEC> {
165        SETTXEN1_W::new(self, 26)
166    }
167    #[doc = "Bit 27 - Reset/Set Message Direction"]
168    #[inline(always)]
169    pub fn setdir(&mut self) -> SETDIR_W<MOCTR_SPEC> {
170        SETDIR_W::new(self, 27)
171    }
172}
173#[doc = "Message Object Control Register\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`moctr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
174pub struct MOCTR_SPEC;
175impl crate::RegisterSpec for MOCTR_SPEC {
176    type Ux = u32;
177}
178#[doc = "`write(|w| ..)` method takes [`moctr::W`](W) writer structure"]
179impl crate::Writable for MOCTR_SPEC {
180    type Safety = crate::Unsafe;
181    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
182    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
183}
184#[doc = "`reset()` method sets MOCTR to value 0"]
185impl crate::Resettable for MOCTR_SPEC {
186    const RESET_VALUE: u32 = 0;
187}