atsamd21e18a/usb/device/
epstatusset.rs1#[doc = "Writer for register EPSTATUSSET%s"]
2pub type W = crate::W<u8, super::EPSTATUSSET>;
3#[doc = "Register EPSTATUSSET%s `reset()`'s with value 0"]
4impl crate::ResetValue for super::EPSTATUSSET {
5 type Type = u8;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Write proxy for field `DTGLOUT`"]
12pub struct DTGLOUT_W<'a> {
13 w: &'a mut W,
14}
15impl<'a> DTGLOUT_W<'a> {
16 #[doc = r"Sets the field bit"]
17 #[inline(always)]
18 pub fn set_bit(self) -> &'a mut W {
19 self.bit(true)
20 }
21 #[doc = r"Clears the field bit"]
22 #[inline(always)]
23 pub fn clear_bit(self) -> &'a mut W {
24 self.bit(false)
25 }
26 #[doc = r"Writes raw bits to the field"]
27 #[inline(always)]
28 pub fn bit(self, value: bool) -> &'a mut W {
29 self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01);
30 self.w
31 }
32}
33#[doc = "Write proxy for field `DTGLIN`"]
34pub struct DTGLIN_W<'a> {
35 w: &'a mut W,
36}
37impl<'a> DTGLIN_W<'a> {
38 #[doc = r"Sets the field bit"]
39 #[inline(always)]
40 pub fn set_bit(self) -> &'a mut W {
41 self.bit(true)
42 }
43 #[doc = r"Clears the field bit"]
44 #[inline(always)]
45 pub fn clear_bit(self) -> &'a mut W {
46 self.bit(false)
47 }
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub fn bit(self, value: bool) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u8) & 0x01) << 1);
52 self.w
53 }
54}
55#[doc = "Write proxy for field `CURBK`"]
56pub struct CURBK_W<'a> {
57 w: &'a mut W,
58}
59impl<'a> CURBK_W<'a> {
60 #[doc = r"Sets the field bit"]
61 #[inline(always)]
62 pub fn set_bit(self) -> &'a mut W {
63 self.bit(true)
64 }
65 #[doc = r"Clears the field bit"]
66 #[inline(always)]
67 pub fn clear_bit(self) -> &'a mut W {
68 self.bit(false)
69 }
70 #[doc = r"Writes raw bits to the field"]
71 #[inline(always)]
72 pub fn bit(self, value: bool) -> &'a mut W {
73 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u8) & 0x01) << 2);
74 self.w
75 }
76}
77#[doc = "Write proxy for field `STALLRQ0`"]
78pub struct STALLRQ0_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> STALLRQ0_W<'a> {
82 #[doc = r"Sets the field bit"]
83 #[inline(always)]
84 pub fn set_bit(self) -> &'a mut W {
85 self.bit(true)
86 }
87 #[doc = r"Clears the field bit"]
88 #[inline(always)]
89 pub fn clear_bit(self) -> &'a mut W {
90 self.bit(false)
91 }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u8) & 0x01) << 4);
96 self.w
97 }
98}
99#[doc = "Write proxy for field `STALLRQ1`"]
100pub struct STALLRQ1_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> STALLRQ1_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W {
107 self.bit(true)
108 }
109 #[doc = r"Clears the field bit"]
110 #[inline(always)]
111 pub fn clear_bit(self) -> &'a mut W {
112 self.bit(false)
113 }
114 #[doc = r"Writes raw bits to the field"]
115 #[inline(always)]
116 pub fn bit(self, value: bool) -> &'a mut W {
117 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u8) & 0x01) << 5);
118 self.w
119 }
120}
121#[doc = "Write proxy for field `BK0RDY`"]
122pub struct BK0RDY_W<'a> {
123 w: &'a mut W,
124}
125impl<'a> BK0RDY_W<'a> {
126 #[doc = r"Sets the field bit"]
127 #[inline(always)]
128 pub fn set_bit(self) -> &'a mut W {
129 self.bit(true)
130 }
131 #[doc = r"Clears the field bit"]
132 #[inline(always)]
133 pub fn clear_bit(self) -> &'a mut W {
134 self.bit(false)
135 }
136 #[doc = r"Writes raw bits to the field"]
137 #[inline(always)]
138 pub fn bit(self, value: bool) -> &'a mut W {
139 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u8) & 0x01) << 6);
140 self.w
141 }
142}
143#[doc = "Write proxy for field `BK1RDY`"]
144pub struct BK1RDY_W<'a> {
145 w: &'a mut W,
146}
147impl<'a> BK1RDY_W<'a> {
148 #[doc = r"Sets the field bit"]
149 #[inline(always)]
150 pub fn set_bit(self) -> &'a mut W {
151 self.bit(true)
152 }
153 #[doc = r"Clears the field bit"]
154 #[inline(always)]
155 pub fn clear_bit(self) -> &'a mut W {
156 self.bit(false)
157 }
158 #[doc = r"Writes raw bits to the field"]
159 #[inline(always)]
160 pub fn bit(self, value: bool) -> &'a mut W {
161 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u8) & 0x01) << 7);
162 self.w
163 }
164}
165impl W {
166 #[doc = "Bit 0 - Data Toggle OUT Set"]
167 #[inline(always)]
168 pub fn dtglout(&mut self) -> DTGLOUT_W {
169 DTGLOUT_W { w: self }
170 }
171 #[doc = "Bit 1 - Data Toggle IN Set"]
172 #[inline(always)]
173 pub fn dtglin(&mut self) -> DTGLIN_W {
174 DTGLIN_W { w: self }
175 }
176 #[doc = "Bit 2 - Current Bank Set"]
177 #[inline(always)]
178 pub fn curbk(&mut self) -> CURBK_W {
179 CURBK_W { w: self }
180 }
181 #[doc = "Bit 4 - Stall 0 Request Set"]
182 #[inline(always)]
183 pub fn stallrq0(&mut self) -> STALLRQ0_W {
184 STALLRQ0_W { w: self }
185 }
186 #[doc = "Bit 5 - Stall 1 Request Set"]
187 #[inline(always)]
188 pub fn stallrq1(&mut self) -> STALLRQ1_W {
189 STALLRQ1_W { w: self }
190 }
191 #[doc = "Bit 6 - Bank 0 Ready Set"]
192 #[inline(always)]
193 pub fn bk0rdy(&mut self) -> BK0RDY_W {
194 BK0RDY_W { w: self }
195 }
196 #[doc = "Bit 7 - Bank 1 Ready Set"]
197 #[inline(always)]
198 pub fn bk1rdy(&mut self) -> BK1RDY_W {
199 BK1RDY_W { w: self }
200 }
201}