avr_device/devices/atmega32u4/usb_device/
ueienx.rs1#[doc = "Register `UEIENX` reader"]
2pub struct R(crate::R<UEIENX_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<UEIENX_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<UEIENX_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<UEIENX_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `UEIENX` writer"]
17pub struct W(crate::W<UEIENX_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<UEIENX_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<UEIENX_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<UEIENX_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `TXINE` reader - No Description."]
38pub type TXINE_R = crate::BitReader<bool>;
39#[doc = "Field `TXINE` writer - No Description."]
40pub type TXINE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
41#[doc = "Field `STALLEDE` reader - No Description."]
42pub type STALLEDE_R = crate::BitReader<bool>;
43#[doc = "Field `STALLEDE` writer - No Description."]
44pub type STALLEDE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
45#[doc = "Field `RXOUTE` reader - No Description."]
46pub type RXOUTE_R = crate::BitReader<bool>;
47#[doc = "Field `RXOUTE` writer - No Description."]
48pub type RXOUTE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
49#[doc = "Field `RXSTPE` reader - No Description."]
50pub type RXSTPE_R = crate::BitReader<bool>;
51#[doc = "Field `RXSTPE` writer - No Description."]
52pub type RXSTPE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
53#[doc = "Field `NAKOUTE` reader - No Description."]
54pub type NAKOUTE_R = crate::BitReader<bool>;
55#[doc = "Field `NAKOUTE` writer - No Description."]
56pub type NAKOUTE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
57#[doc = "Field `NAKINE` reader - No Description."]
58pub type NAKINE_R = crate::BitReader<bool>;
59#[doc = "Field `NAKINE` writer - No Description."]
60pub type NAKINE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
61#[doc = "Field `FLERRE` reader - No Description."]
62pub type FLERRE_R = crate::BitReader<bool>;
63#[doc = "Field `FLERRE` writer - No Description."]
64pub type FLERRE_W<'a, const O: u8> = crate::BitWriter<'a, u8, UEIENX_SPEC, bool, O>;
65impl R {
66 #[doc = "Bit 0 - No Description."]
67 #[inline(always)]
68 pub fn txine(&self) -> TXINE_R {
69 TXINE_R::new((self.bits & 1) != 0)
70 }
71 #[doc = "Bit 1 - No Description."]
72 #[inline(always)]
73 pub fn stallede(&self) -> STALLEDE_R {
74 STALLEDE_R::new(((self.bits >> 1) & 1) != 0)
75 }
76 #[doc = "Bit 2 - No Description."]
77 #[inline(always)]
78 pub fn rxoute(&self) -> RXOUTE_R {
79 RXOUTE_R::new(((self.bits >> 2) & 1) != 0)
80 }
81 #[doc = "Bit 3 - No Description."]
82 #[inline(always)]
83 pub fn rxstpe(&self) -> RXSTPE_R {
84 RXSTPE_R::new(((self.bits >> 3) & 1) != 0)
85 }
86 #[doc = "Bit 4 - No Description."]
87 #[inline(always)]
88 pub fn nakoute(&self) -> NAKOUTE_R {
89 NAKOUTE_R::new(((self.bits >> 4) & 1) != 0)
90 }
91 #[doc = "Bit 6 - No Description."]
92 #[inline(always)]
93 pub fn nakine(&self) -> NAKINE_R {
94 NAKINE_R::new(((self.bits >> 6) & 1) != 0)
95 }
96 #[doc = "Bit 7 - No Description."]
97 #[inline(always)]
98 pub fn flerre(&self) -> FLERRE_R {
99 FLERRE_R::new(((self.bits >> 7) & 1) != 0)
100 }
101}
102impl W {
103 #[doc = "Bit 0 - No Description."]
104 #[inline(always)]
105 #[must_use]
106 pub fn txine(&mut self) -> TXINE_W<0> {
107 TXINE_W::new(self)
108 }
109 #[doc = "Bit 1 - No Description."]
110 #[inline(always)]
111 #[must_use]
112 pub fn stallede(&mut self) -> STALLEDE_W<1> {
113 STALLEDE_W::new(self)
114 }
115 #[doc = "Bit 2 - No Description."]
116 #[inline(always)]
117 #[must_use]
118 pub fn rxoute(&mut self) -> RXOUTE_W<2> {
119 RXOUTE_W::new(self)
120 }
121 #[doc = "Bit 3 - No Description."]
122 #[inline(always)]
123 #[must_use]
124 pub fn rxstpe(&mut self) -> RXSTPE_W<3> {
125 RXSTPE_W::new(self)
126 }
127 #[doc = "Bit 4 - No Description."]
128 #[inline(always)]
129 #[must_use]
130 pub fn nakoute(&mut self) -> NAKOUTE_W<4> {
131 NAKOUTE_W::new(self)
132 }
133 #[doc = "Bit 6 - No Description."]
134 #[inline(always)]
135 #[must_use]
136 pub fn nakine(&mut self) -> NAKINE_W<6> {
137 NAKINE_W::new(self)
138 }
139 #[doc = "Bit 7 - No Description."]
140 #[inline(always)]
141 #[must_use]
142 pub fn flerre(&mut self) -> FLERRE_W<7> {
143 FLERRE_W::new(self)
144 }
145 #[doc = "Writes raw bits to the register."]
146 #[inline(always)]
147 pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
148 self.0.bits(bits);
149 self
150 }
151}
152#[doc = "No Description.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ueienx](index.html) module"]
153pub struct UEIENX_SPEC;
154impl crate::RegisterSpec for UEIENX_SPEC {
155 type Ux = u8;
156}
157#[doc = "`read()` method returns [ueienx::R](R) reader structure"]
158impl crate::Readable for UEIENX_SPEC {
159 type Reader = R;
160}
161#[doc = "`write(|w| ..)` method takes [ueienx::W](W) writer structure"]
162impl crate::Writable for UEIENX_SPEC {
163 type Writer = W;
164 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
165 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
166}
167#[doc = "`reset()` method sets UEIENX to value 0"]
168impl crate::Resettable for UEIENX_SPEC {
169 const RESET_VALUE: Self::Ux = 0;
170}