n32g4/n32g455/tim1/
ctrl1.rs1pub type R = crate::R<Ctrl1Spec>;
3pub type W = crate::W<Ctrl1Spec>;
5pub type CntenR = crate::BitReader;
7pub type CntenW<'a, REG> = crate::BitWriter<'a, REG>;
9pub type UpdisR = crate::BitReader;
11pub type UpdisW<'a, REG> = crate::BitWriter<'a, REG>;
13pub type UprsR = crate::BitReader;
15pub type UprsW<'a, REG> = crate::BitWriter<'a, REG>;
17pub type OnepmR = crate::BitReader;
19pub type OnepmW<'a, REG> = crate::BitWriter<'a, REG>;
21pub type DirR = crate::BitReader;
23pub type DirW<'a, REG> = crate::BitWriter<'a, REG>;
25pub type CamselR = crate::FieldReader;
27pub type CamselW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29pub type ArpenR = crate::BitReader;
31pub type ArpenW<'a, REG> = crate::BitWriter<'a, REG>;
33pub type ClkdR = crate::FieldReader;
35pub type ClkdW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
37pub type IombkpenR = crate::BitReader;
39pub type IombkpenW<'a, REG> = crate::BitWriter<'a, REG>;
41pub type C1selR = crate::BitReader;
43pub type C1selW<'a, REG> = crate::BitWriter<'a, REG>;
45pub type C2selR = crate::BitReader;
47pub type C2selW<'a, REG> = crate::BitWriter<'a, REG>;
49pub type C3selR = crate::BitReader;
51pub type C3selW<'a, REG> = crate::BitWriter<'a, REG>;
53pub type C4selR = crate::BitReader;
55pub type C4selW<'a, REG> = crate::BitWriter<'a, REG>;
57pub type ClrselR = crate::BitReader;
59pub type ClrselW<'a, REG> = crate::BitWriter<'a, REG>;
61pub type LockupenR = crate::BitReader;
63pub type LockupenW<'a, REG> = crate::BitWriter<'a, REG>;
65pub type PbkpenR = crate::BitReader;
67pub type PbkpenW<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70 #[inline(always)]
72 pub fn cnten(&self) -> CntenR {
73 CntenR::new((self.bits & 1) != 0)
74 }
75 #[inline(always)]
77 pub fn updis(&self) -> UpdisR {
78 UpdisR::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[inline(always)]
82 pub fn uprs(&self) -> UprsR {
83 UprsR::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[inline(always)]
87 pub fn onepm(&self) -> OnepmR {
88 OnepmR::new(((self.bits >> 3) & 1) != 0)
89 }
90 #[inline(always)]
92 pub fn dir(&self) -> DirR {
93 DirR::new(((self.bits >> 4) & 1) != 0)
94 }
95 #[inline(always)]
97 pub fn camsel(&self) -> CamselR {
98 CamselR::new(((self.bits >> 5) & 3) as u8)
99 }
100 #[inline(always)]
102 pub fn arpen(&self) -> ArpenR {
103 ArpenR::new(((self.bits >> 7) & 1) != 0)
104 }
105 #[inline(always)]
107 pub fn clkd(&self) -> ClkdR {
108 ClkdR::new(((self.bits >> 8) & 3) as u8)
109 }
110 #[inline(always)]
112 pub fn iombkpen(&self) -> IombkpenR {
113 IombkpenR::new(((self.bits >> 10) & 1) != 0)
114 }
115 #[inline(always)]
117 pub fn c1sel(&self) -> C1selR {
118 C1selR::new(((self.bits >> 11) & 1) != 0)
119 }
120 #[inline(always)]
122 pub fn c2sel(&self) -> C2selR {
123 C2selR::new(((self.bits >> 12) & 1) != 0)
124 }
125 #[inline(always)]
127 pub fn c3sel(&self) -> C3selR {
128 C3selR::new(((self.bits >> 13) & 1) != 0)
129 }
130 #[inline(always)]
132 pub fn c4sel(&self) -> C4selR {
133 C4selR::new(((self.bits >> 14) & 1) != 0)
134 }
135 #[inline(always)]
137 pub fn clrsel(&self) -> ClrselR {
138 ClrselR::new(((self.bits >> 15) & 1) != 0)
139 }
140 #[inline(always)]
142 pub fn lockupen(&self) -> LockupenR {
143 LockupenR::new(((self.bits >> 16) & 1) != 0)
144 }
145 #[inline(always)]
147 pub fn pbkpen(&self) -> PbkpenR {
148 PbkpenR::new(((self.bits >> 17) & 1) != 0)
149 }
150}
151impl W {
152 #[inline(always)]
154 #[must_use]
155 pub fn cnten(&mut self) -> CntenW<Ctrl1Spec> {
156 CntenW::new(self, 0)
157 }
158 #[inline(always)]
160 #[must_use]
161 pub fn updis(&mut self) -> UpdisW<Ctrl1Spec> {
162 UpdisW::new(self, 1)
163 }
164 #[inline(always)]
166 #[must_use]
167 pub fn uprs(&mut self) -> UprsW<Ctrl1Spec> {
168 UprsW::new(self, 2)
169 }
170 #[inline(always)]
172 #[must_use]
173 pub fn onepm(&mut self) -> OnepmW<Ctrl1Spec> {
174 OnepmW::new(self, 3)
175 }
176 #[inline(always)]
178 #[must_use]
179 pub fn dir(&mut self) -> DirW<Ctrl1Spec> {
180 DirW::new(self, 4)
181 }
182 #[inline(always)]
184 #[must_use]
185 pub fn camsel(&mut self) -> CamselW<Ctrl1Spec> {
186 CamselW::new(self, 5)
187 }
188 #[inline(always)]
190 #[must_use]
191 pub fn arpen(&mut self) -> ArpenW<Ctrl1Spec> {
192 ArpenW::new(self, 7)
193 }
194 #[inline(always)]
196 #[must_use]
197 pub fn clkd(&mut self) -> ClkdW<Ctrl1Spec> {
198 ClkdW::new(self, 8)
199 }
200 #[inline(always)]
202 #[must_use]
203 pub fn iombkpen(&mut self) -> IombkpenW<Ctrl1Spec> {
204 IombkpenW::new(self, 10)
205 }
206 #[inline(always)]
208 #[must_use]
209 pub fn c1sel(&mut self) -> C1selW<Ctrl1Spec> {
210 C1selW::new(self, 11)
211 }
212 #[inline(always)]
214 #[must_use]
215 pub fn c2sel(&mut self) -> C2selW<Ctrl1Spec> {
216 C2selW::new(self, 12)
217 }
218 #[inline(always)]
220 #[must_use]
221 pub fn c3sel(&mut self) -> C3selW<Ctrl1Spec> {
222 C3selW::new(self, 13)
223 }
224 #[inline(always)]
226 #[must_use]
227 pub fn c4sel(&mut self) -> C4selW<Ctrl1Spec> {
228 C4selW::new(self, 14)
229 }
230 #[inline(always)]
232 #[must_use]
233 pub fn clrsel(&mut self) -> ClrselW<Ctrl1Spec> {
234 ClrselW::new(self, 15)
235 }
236 #[inline(always)]
238 #[must_use]
239 pub fn lockupen(&mut self) -> LockupenW<Ctrl1Spec> {
240 LockupenW::new(self, 16)
241 }
242 #[inline(always)]
244 #[must_use]
245 pub fn pbkpen(&mut self) -> PbkpenW<Ctrl1Spec> {
246 PbkpenW::new(self, 17)
247 }
248}
249pub struct Ctrl1Spec;
253impl crate::RegisterSpec for Ctrl1Spec {
254 type Ux = u32;
255}
256impl crate::Readable for Ctrl1Spec {}
258impl crate::Writable for Ctrl1Spec {
260 type Safety = crate::Unsafe;
261 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
262 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
263}
264impl crate::Resettable for Ctrl1Spec {
266 const RESET_VALUE: u32 = 0;
267}