1#[doc = "Register `STALL_IL_DIS` reader"]
2pub type R = crate::R<StallIlDisSpec>;
3#[doc = "Register `STALL_IL_DIS` writer"]
4pub type W = crate::W<StallIlDisSpec>;
5#[doc = "Disable Endpoint 0 IN Direction\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum StallIDis0 {
9 #[doc = "0: Enable"]
10 EnEp0InStall = 0,
11 #[doc = "1: Disable"]
12 DisEp0InStall = 1,
13}
14impl From<StallIDis0> for bool {
15 #[inline(always)]
16 fn from(variant: StallIDis0) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `STALL_I_DIS0` reader - Disable Endpoint 0 IN Direction"]
21pub type StallIDis0R = crate::BitReader<StallIDis0>;
22impl StallIDis0R {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> StallIDis0 {
26 match self.bits {
27 false => StallIDis0::EnEp0InStall,
28 true => StallIDis0::DisEp0InStall,
29 }
30 }
31 #[doc = "Enable"]
32 #[inline(always)]
33 pub fn is_en_ep0_in_stall(&self) -> bool {
34 *self == StallIDis0::EnEp0InStall
35 }
36 #[doc = "Disable"]
37 #[inline(always)]
38 pub fn is_dis_ep0_in_stall(&self) -> bool {
39 *self == StallIDis0::DisEp0InStall
40 }
41}
42#[doc = "Field `STALL_I_DIS0` writer - Disable Endpoint 0 IN Direction"]
43pub type StallIDis0W<'a, REG> = crate::BitWriter<'a, REG, StallIDis0>;
44impl<'a, REG> StallIDis0W<'a, REG>
45where
46 REG: crate::Writable + crate::RegisterSpec,
47{
48 #[doc = "Enable"]
49 #[inline(always)]
50 pub fn en_ep0_in_stall(self) -> &'a mut crate::W<REG> {
51 self.variant(StallIDis0::EnEp0InStall)
52 }
53 #[doc = "Disable"]
54 #[inline(always)]
55 pub fn dis_ep0_in_stall(self) -> &'a mut crate::W<REG> {
56 self.variant(StallIDis0::DisEp0InStall)
57 }
58}
59#[doc = "Disable Endpoint 1 IN Direction\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum StallIDis1 {
63 #[doc = "0: Enable"]
64 EnEp1InStall = 0,
65 #[doc = "1: Disable"]
66 DisEp1InStall = 1,
67}
68impl From<StallIDis1> for bool {
69 #[inline(always)]
70 fn from(variant: StallIDis1) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `STALL_I_DIS1` reader - Disable Endpoint 1 IN Direction"]
75pub type StallIDis1R = crate::BitReader<StallIDis1>;
76impl StallIDis1R {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> StallIDis1 {
80 match self.bits {
81 false => StallIDis1::EnEp1InStall,
82 true => StallIDis1::DisEp1InStall,
83 }
84 }
85 #[doc = "Enable"]
86 #[inline(always)]
87 pub fn is_en_ep1_in_stall(&self) -> bool {
88 *self == StallIDis1::EnEp1InStall
89 }
90 #[doc = "Disable"]
91 #[inline(always)]
92 pub fn is_dis_ep1_in_stall(&self) -> bool {
93 *self == StallIDis1::DisEp1InStall
94 }
95}
96#[doc = "Field `STALL_I_DIS1` writer - Disable Endpoint 1 IN Direction"]
97pub type StallIDis1W<'a, REG> = crate::BitWriter<'a, REG, StallIDis1>;
98impl<'a, REG> StallIDis1W<'a, REG>
99where
100 REG: crate::Writable + crate::RegisterSpec,
101{
102 #[doc = "Enable"]
103 #[inline(always)]
104 pub fn en_ep1_in_stall(self) -> &'a mut crate::W<REG> {
105 self.variant(StallIDis1::EnEp1InStall)
106 }
107 #[doc = "Disable"]
108 #[inline(always)]
109 pub fn dis_ep1_in_stall(self) -> &'a mut crate::W<REG> {
110 self.variant(StallIDis1::DisEp1InStall)
111 }
112}
113#[doc = "Disable Endpoint 2 IN Direction\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum StallIDis2 {
117 #[doc = "0: Enable"]
118 EnEp2InStall = 0,
119 #[doc = "1: Disable"]
120 DisEp2InStall = 1,
121}
122impl From<StallIDis2> for bool {
123 #[inline(always)]
124 fn from(variant: StallIDis2) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `STALL_I_DIS2` reader - Disable Endpoint 2 IN Direction"]
129pub type StallIDis2R = crate::BitReader<StallIDis2>;
130impl StallIDis2R {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> StallIDis2 {
134 match self.bits {
135 false => StallIDis2::EnEp2InStall,
136 true => StallIDis2::DisEp2InStall,
137 }
138 }
139 #[doc = "Enable"]
140 #[inline(always)]
141 pub fn is_en_ep2_in_stall(&self) -> bool {
142 *self == StallIDis2::EnEp2InStall
143 }
144 #[doc = "Disable"]
145 #[inline(always)]
146 pub fn is_dis_ep2_in_stall(&self) -> bool {
147 *self == StallIDis2::DisEp2InStall
148 }
149}
150#[doc = "Field `STALL_I_DIS2` writer - Disable Endpoint 2 IN Direction"]
151pub type StallIDis2W<'a, REG> = crate::BitWriter<'a, REG, StallIDis2>;
152impl<'a, REG> StallIDis2W<'a, REG>
153where
154 REG: crate::Writable + crate::RegisterSpec,
155{
156 #[doc = "Enable"]
157 #[inline(always)]
158 pub fn en_ep2_in_stall(self) -> &'a mut crate::W<REG> {
159 self.variant(StallIDis2::EnEp2InStall)
160 }
161 #[doc = "Disable"]
162 #[inline(always)]
163 pub fn dis_ep2_in_stall(self) -> &'a mut crate::W<REG> {
164 self.variant(StallIDis2::DisEp2InStall)
165 }
166}
167#[doc = "Disable Endpoint 3 IN Direction\n\nValue on reset: 0"]
168#[cfg_attr(feature = "defmt", derive(defmt::Format))]
169#[derive(Clone, Copy, Debug, PartialEq, Eq)]
170pub enum StallIDis3 {
171 #[doc = "0: Enable"]
172 EnEp3InStall = 0,
173 #[doc = "1: Disable"]
174 DisEp3InStall = 1,
175}
176impl From<StallIDis3> for bool {
177 #[inline(always)]
178 fn from(variant: StallIDis3) -> Self {
179 variant as u8 != 0
180 }
181}
182#[doc = "Field `STALL_I_DIS3` reader - Disable Endpoint 3 IN Direction"]
183pub type StallIDis3R = crate::BitReader<StallIDis3>;
184impl StallIDis3R {
185 #[doc = "Get enumerated values variant"]
186 #[inline(always)]
187 pub const fn variant(&self) -> StallIDis3 {
188 match self.bits {
189 false => StallIDis3::EnEp3InStall,
190 true => StallIDis3::DisEp3InStall,
191 }
192 }
193 #[doc = "Enable"]
194 #[inline(always)]
195 pub fn is_en_ep3_in_stall(&self) -> bool {
196 *self == StallIDis3::EnEp3InStall
197 }
198 #[doc = "Disable"]
199 #[inline(always)]
200 pub fn is_dis_ep3_in_stall(&self) -> bool {
201 *self == StallIDis3::DisEp3InStall
202 }
203}
204#[doc = "Field `STALL_I_DIS3` writer - Disable Endpoint 3 IN Direction"]
205pub type StallIDis3W<'a, REG> = crate::BitWriter<'a, REG, StallIDis3>;
206impl<'a, REG> StallIDis3W<'a, REG>
207where
208 REG: crate::Writable + crate::RegisterSpec,
209{
210 #[doc = "Enable"]
211 #[inline(always)]
212 pub fn en_ep3_in_stall(self) -> &'a mut crate::W<REG> {
213 self.variant(StallIDis3::EnEp3InStall)
214 }
215 #[doc = "Disable"]
216 #[inline(always)]
217 pub fn dis_ep3_in_stall(self) -> &'a mut crate::W<REG> {
218 self.variant(StallIDis3::DisEp3InStall)
219 }
220}
221#[doc = "Disable Endpoint 4 IN Direction\n\nValue on reset: 0"]
222#[cfg_attr(feature = "defmt", derive(defmt::Format))]
223#[derive(Clone, Copy, Debug, PartialEq, Eq)]
224pub enum StallIDis4 {
225 #[doc = "0: Enable"]
226 EnEp4InStall = 0,
227 #[doc = "1: Disable"]
228 DisEp4InStall = 1,
229}
230impl From<StallIDis4> for bool {
231 #[inline(always)]
232 fn from(variant: StallIDis4) -> Self {
233 variant as u8 != 0
234 }
235}
236#[doc = "Field `STALL_I_DIS4` reader - Disable Endpoint 4 IN Direction"]
237pub type StallIDis4R = crate::BitReader<StallIDis4>;
238impl StallIDis4R {
239 #[doc = "Get enumerated values variant"]
240 #[inline(always)]
241 pub const fn variant(&self) -> StallIDis4 {
242 match self.bits {
243 false => StallIDis4::EnEp4InStall,
244 true => StallIDis4::DisEp4InStall,
245 }
246 }
247 #[doc = "Enable"]
248 #[inline(always)]
249 pub fn is_en_ep4_in_stall(&self) -> bool {
250 *self == StallIDis4::EnEp4InStall
251 }
252 #[doc = "Disable"]
253 #[inline(always)]
254 pub fn is_dis_ep4_in_stall(&self) -> bool {
255 *self == StallIDis4::DisEp4InStall
256 }
257}
258#[doc = "Field `STALL_I_DIS4` writer - Disable Endpoint 4 IN Direction"]
259pub type StallIDis4W<'a, REG> = crate::BitWriter<'a, REG, StallIDis4>;
260impl<'a, REG> StallIDis4W<'a, REG>
261where
262 REG: crate::Writable + crate::RegisterSpec,
263{
264 #[doc = "Enable"]
265 #[inline(always)]
266 pub fn en_ep4_in_stall(self) -> &'a mut crate::W<REG> {
267 self.variant(StallIDis4::EnEp4InStall)
268 }
269 #[doc = "Disable"]
270 #[inline(always)]
271 pub fn dis_ep4_in_stall(self) -> &'a mut crate::W<REG> {
272 self.variant(StallIDis4::DisEp4InStall)
273 }
274}
275#[doc = "Disable Endpoint 5 IN Direction\n\nValue on reset: 0"]
276#[cfg_attr(feature = "defmt", derive(defmt::Format))]
277#[derive(Clone, Copy, Debug, PartialEq, Eq)]
278pub enum StallIDis5 {
279 #[doc = "0: Enable"]
280 EnEp5InStall = 0,
281 #[doc = "1: Disable"]
282 DisEp5InStall = 1,
283}
284impl From<StallIDis5> for bool {
285 #[inline(always)]
286 fn from(variant: StallIDis5) -> Self {
287 variant as u8 != 0
288 }
289}
290#[doc = "Field `STALL_I_DIS5` reader - Disable Endpoint 5 IN Direction"]
291pub type StallIDis5R = crate::BitReader<StallIDis5>;
292impl StallIDis5R {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub const fn variant(&self) -> StallIDis5 {
296 match self.bits {
297 false => StallIDis5::EnEp5InStall,
298 true => StallIDis5::DisEp5InStall,
299 }
300 }
301 #[doc = "Enable"]
302 #[inline(always)]
303 pub fn is_en_ep5_in_stall(&self) -> bool {
304 *self == StallIDis5::EnEp5InStall
305 }
306 #[doc = "Disable"]
307 #[inline(always)]
308 pub fn is_dis_ep5_in_stall(&self) -> bool {
309 *self == StallIDis5::DisEp5InStall
310 }
311}
312#[doc = "Field `STALL_I_DIS5` writer - Disable Endpoint 5 IN Direction"]
313pub type StallIDis5W<'a, REG> = crate::BitWriter<'a, REG, StallIDis5>;
314impl<'a, REG> StallIDis5W<'a, REG>
315where
316 REG: crate::Writable + crate::RegisterSpec,
317{
318 #[doc = "Enable"]
319 #[inline(always)]
320 pub fn en_ep5_in_stall(self) -> &'a mut crate::W<REG> {
321 self.variant(StallIDis5::EnEp5InStall)
322 }
323 #[doc = "Disable"]
324 #[inline(always)]
325 pub fn dis_ep5_in_stall(self) -> &'a mut crate::W<REG> {
326 self.variant(StallIDis5::DisEp5InStall)
327 }
328}
329#[doc = "Disable Endpoint 6 IN Direction\n\nValue on reset: 0"]
330#[cfg_attr(feature = "defmt", derive(defmt::Format))]
331#[derive(Clone, Copy, Debug, PartialEq, Eq)]
332pub enum StallIDis6 {
333 #[doc = "0: Enable"]
334 EnEp6InStall = 0,
335 #[doc = "1: Disable"]
336 DisEp6InStall = 1,
337}
338impl From<StallIDis6> for bool {
339 #[inline(always)]
340 fn from(variant: StallIDis6) -> Self {
341 variant as u8 != 0
342 }
343}
344#[doc = "Field `STALL_I_DIS6` reader - Disable Endpoint 6 IN Direction"]
345pub type StallIDis6R = crate::BitReader<StallIDis6>;
346impl StallIDis6R {
347 #[doc = "Get enumerated values variant"]
348 #[inline(always)]
349 pub const fn variant(&self) -> StallIDis6 {
350 match self.bits {
351 false => StallIDis6::EnEp6InStall,
352 true => StallIDis6::DisEp6InStall,
353 }
354 }
355 #[doc = "Enable"]
356 #[inline(always)]
357 pub fn is_en_ep6_in_stall(&self) -> bool {
358 *self == StallIDis6::EnEp6InStall
359 }
360 #[doc = "Disable"]
361 #[inline(always)]
362 pub fn is_dis_ep6_in_stall(&self) -> bool {
363 *self == StallIDis6::DisEp6InStall
364 }
365}
366#[doc = "Field `STALL_I_DIS6` writer - Disable Endpoint 6 IN Direction"]
367pub type StallIDis6W<'a, REG> = crate::BitWriter<'a, REG, StallIDis6>;
368impl<'a, REG> StallIDis6W<'a, REG>
369where
370 REG: crate::Writable + crate::RegisterSpec,
371{
372 #[doc = "Enable"]
373 #[inline(always)]
374 pub fn en_ep6_in_stall(self) -> &'a mut crate::W<REG> {
375 self.variant(StallIDis6::EnEp6InStall)
376 }
377 #[doc = "Disable"]
378 #[inline(always)]
379 pub fn dis_ep6_in_stall(self) -> &'a mut crate::W<REG> {
380 self.variant(StallIDis6::DisEp6InStall)
381 }
382}
383#[doc = "Disable Endpoint 7 IN Direction\n\nValue on reset: 0"]
384#[cfg_attr(feature = "defmt", derive(defmt::Format))]
385#[derive(Clone, Copy, Debug, PartialEq, Eq)]
386pub enum StallIDis7 {
387 #[doc = "0: Enable"]
388 EnEp7InStall = 0,
389 #[doc = "1: Disable"]
390 DisEp7InStall = 1,
391}
392impl From<StallIDis7> for bool {
393 #[inline(always)]
394 fn from(variant: StallIDis7) -> Self {
395 variant as u8 != 0
396 }
397}
398#[doc = "Field `STALL_I_DIS7` reader - Disable Endpoint 7 IN Direction"]
399pub type StallIDis7R = crate::BitReader<StallIDis7>;
400impl StallIDis7R {
401 #[doc = "Get enumerated values variant"]
402 #[inline(always)]
403 pub const fn variant(&self) -> StallIDis7 {
404 match self.bits {
405 false => StallIDis7::EnEp7InStall,
406 true => StallIDis7::DisEp7InStall,
407 }
408 }
409 #[doc = "Enable"]
410 #[inline(always)]
411 pub fn is_en_ep7_in_stall(&self) -> bool {
412 *self == StallIDis7::EnEp7InStall
413 }
414 #[doc = "Disable"]
415 #[inline(always)]
416 pub fn is_dis_ep7_in_stall(&self) -> bool {
417 *self == StallIDis7::DisEp7InStall
418 }
419}
420#[doc = "Field `STALL_I_DIS7` writer - Disable Endpoint 7 IN Direction"]
421pub type StallIDis7W<'a, REG> = crate::BitWriter<'a, REG, StallIDis7>;
422impl<'a, REG> StallIDis7W<'a, REG>
423where
424 REG: crate::Writable + crate::RegisterSpec,
425{
426 #[doc = "Enable"]
427 #[inline(always)]
428 pub fn en_ep7_in_stall(self) -> &'a mut crate::W<REG> {
429 self.variant(StallIDis7::EnEp7InStall)
430 }
431 #[doc = "Disable"]
432 #[inline(always)]
433 pub fn dis_ep7_in_stall(self) -> &'a mut crate::W<REG> {
434 self.variant(StallIDis7::DisEp7InStall)
435 }
436}
437impl R {
438 #[doc = "Bit 0 - Disable Endpoint 0 IN Direction"]
439 #[inline(always)]
440 pub fn stall_i_dis0(&self) -> StallIDis0R {
441 StallIDis0R::new((self.bits & 1) != 0)
442 }
443 #[doc = "Bit 1 - Disable Endpoint 1 IN Direction"]
444 #[inline(always)]
445 pub fn stall_i_dis1(&self) -> StallIDis1R {
446 StallIDis1R::new(((self.bits >> 1) & 1) != 0)
447 }
448 #[doc = "Bit 2 - Disable Endpoint 2 IN Direction"]
449 #[inline(always)]
450 pub fn stall_i_dis2(&self) -> StallIDis2R {
451 StallIDis2R::new(((self.bits >> 2) & 1) != 0)
452 }
453 #[doc = "Bit 3 - Disable Endpoint 3 IN Direction"]
454 #[inline(always)]
455 pub fn stall_i_dis3(&self) -> StallIDis3R {
456 StallIDis3R::new(((self.bits >> 3) & 1) != 0)
457 }
458 #[doc = "Bit 4 - Disable Endpoint 4 IN Direction"]
459 #[inline(always)]
460 pub fn stall_i_dis4(&self) -> StallIDis4R {
461 StallIDis4R::new(((self.bits >> 4) & 1) != 0)
462 }
463 #[doc = "Bit 5 - Disable Endpoint 5 IN Direction"]
464 #[inline(always)]
465 pub fn stall_i_dis5(&self) -> StallIDis5R {
466 StallIDis5R::new(((self.bits >> 5) & 1) != 0)
467 }
468 #[doc = "Bit 6 - Disable Endpoint 6 IN Direction"]
469 #[inline(always)]
470 pub fn stall_i_dis6(&self) -> StallIDis6R {
471 StallIDis6R::new(((self.bits >> 6) & 1) != 0)
472 }
473 #[doc = "Bit 7 - Disable Endpoint 7 IN Direction"]
474 #[inline(always)]
475 pub fn stall_i_dis7(&self) -> StallIDis7R {
476 StallIDis7R::new(((self.bits >> 7) & 1) != 0)
477 }
478}
479#[cfg(feature = "debug")]
480impl core::fmt::Debug for R {
481 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
482 f.debug_struct("STALL_IL_DIS")
483 .field("stall_i_dis0", &self.stall_i_dis0())
484 .field("stall_i_dis1", &self.stall_i_dis1())
485 .field("stall_i_dis2", &self.stall_i_dis2())
486 .field("stall_i_dis3", &self.stall_i_dis3())
487 .field("stall_i_dis4", &self.stall_i_dis4())
488 .field("stall_i_dis5", &self.stall_i_dis5())
489 .field("stall_i_dis6", &self.stall_i_dis6())
490 .field("stall_i_dis7", &self.stall_i_dis7())
491 .finish()
492 }
493}
494impl W {
495 #[doc = "Bit 0 - Disable Endpoint 0 IN Direction"]
496 #[inline(always)]
497 pub fn stall_i_dis0(&mut self) -> StallIDis0W<'_, StallIlDisSpec> {
498 StallIDis0W::new(self, 0)
499 }
500 #[doc = "Bit 1 - Disable Endpoint 1 IN Direction"]
501 #[inline(always)]
502 pub fn stall_i_dis1(&mut self) -> StallIDis1W<'_, StallIlDisSpec> {
503 StallIDis1W::new(self, 1)
504 }
505 #[doc = "Bit 2 - Disable Endpoint 2 IN Direction"]
506 #[inline(always)]
507 pub fn stall_i_dis2(&mut self) -> StallIDis2W<'_, StallIlDisSpec> {
508 StallIDis2W::new(self, 2)
509 }
510 #[doc = "Bit 3 - Disable Endpoint 3 IN Direction"]
511 #[inline(always)]
512 pub fn stall_i_dis3(&mut self) -> StallIDis3W<'_, StallIlDisSpec> {
513 StallIDis3W::new(self, 3)
514 }
515 #[doc = "Bit 4 - Disable Endpoint 4 IN Direction"]
516 #[inline(always)]
517 pub fn stall_i_dis4(&mut self) -> StallIDis4W<'_, StallIlDisSpec> {
518 StallIDis4W::new(self, 4)
519 }
520 #[doc = "Bit 5 - Disable Endpoint 5 IN Direction"]
521 #[inline(always)]
522 pub fn stall_i_dis5(&mut self) -> StallIDis5W<'_, StallIlDisSpec> {
523 StallIDis5W::new(self, 5)
524 }
525 #[doc = "Bit 6 - Disable Endpoint 6 IN Direction"]
526 #[inline(always)]
527 pub fn stall_i_dis6(&mut self) -> StallIDis6W<'_, StallIlDisSpec> {
528 StallIDis6W::new(self, 6)
529 }
530 #[doc = "Bit 7 - Disable Endpoint 7 IN Direction"]
531 #[inline(always)]
532 pub fn stall_i_dis7(&mut self) -> StallIDis7W<'_, StallIlDisSpec> {
533 StallIDis7W::new(self, 7)
534 }
535}
536#[doc = "Peripheral Mode Stall Disable for Endpoints 7 to 0 in IN Direction\n\nYou can [`read`](crate::Reg::read) this register and get [`stall_il_dis::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`stall_il_dis::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
537pub struct StallIlDisSpec;
538impl crate::RegisterSpec for StallIlDisSpec {
539 type Ux = u8;
540}
541#[doc = "`read()` method returns [`stall_il_dis::R`](R) reader structure"]
542impl crate::Readable for StallIlDisSpec {}
543#[doc = "`write(|w| ..)` method takes [`stall_il_dis::W`](W) writer structure"]
544impl crate::Writable for StallIlDisSpec {
545 type Safety = crate::Unsafe;
546}
547#[doc = "`reset()` method sets STALL_IL_DIS to value 0"]
548impl crate::Resettable for StallIlDisSpec {}