1#[doc = "Register `MODE` reader"]
2pub struct R(crate::R<MODE_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<MODE_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<MODE_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<MODE_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `MODE` writer"]
17pub struct W(crate::W<MODE_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<MODE_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<MODE_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<MODE_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `RXEN` reader - "]
38pub type RXEN_R = crate::BitReader<bool>;
39#[doc = "Field `RXEN` writer - "]
40pub type RXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
41#[doc = "Field `TXEN` reader - "]
42pub type TXEN_R = crate::BitReader<bool>;
43#[doc = "Field `TXEN` writer - "]
44pub type TXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
45#[doc = "Field `NOPRE` reader - "]
46pub type NOPRE_R = crate::BitReader<bool>;
47#[doc = "Field `NOPRE` writer - "]
48pub type NOPRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
49#[doc = "Field `BRO` reader - "]
50pub type BRO_R = crate::BitReader<bool>;
51#[doc = "Field `BRO` writer - "]
52pub type BRO_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
53#[doc = "Field `rsvd_4` reader - "]
54pub type RSVD_4_R = crate::BitReader<bool>;
55#[doc = "Field `rsvd_4` writer - "]
56pub type RSVD_4_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
57#[doc = "Field `PRO` reader - "]
58pub type PRO_R = crate::BitReader<bool>;
59#[doc = "Field `PRO` writer - "]
60pub type PRO_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
61#[doc = "Field `IFG` reader - "]
62pub type IFG_R = crate::BitReader<bool>;
63#[doc = "Field `IFG` writer - "]
64pub type IFG_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
65#[doc = "Field `rsvd_9_7` reader - "]
66pub type RSVD_9_7_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `rsvd_9_7` writer - "]
68pub type RSVD_9_7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, u8, 3, O>;
69#[doc = "Field `FULLD` reader - "]
70pub type FULLD_R = crate::BitReader<bool>;
71#[doc = "Field `FULLD` writer - "]
72pub type FULLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
73#[doc = "Field `rsvd_12_11` reader - "]
74pub type RSVD_12_11_R = crate::FieldReader<u8, u8>;
75#[doc = "Field `rsvd_12_11` writer - "]
76pub type RSVD_12_11_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, u8, 2, O>;
77#[doc = "Field `CRCEN` reader - "]
78pub type CRCEN_R = crate::BitReader<bool>;
79#[doc = "Field `CRCEN` writer - "]
80pub type CRCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
81#[doc = "Field `HUGEN` reader - "]
82pub type HUGEN_R = crate::BitReader<bool>;
83#[doc = "Field `HUGEN` writer - "]
84pub type HUGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
85#[doc = "Field `PAD` reader - "]
86pub type PAD_R = crate::BitReader<bool>;
87#[doc = "Field `PAD` writer - "]
88pub type PAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
89#[doc = "Field `RECSMALL` reader - "]
90pub type RECSMALL_R = crate::BitReader<bool>;
91#[doc = "Field `RECSMALL` writer - "]
92pub type RECSMALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
93#[doc = "Field `RMII_EN` reader - "]
94pub type RMII_EN_R = crate::BitReader<bool>;
95#[doc = "Field `RMII_EN` writer - "]
96pub type RMII_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODE_SPEC, bool, O>;
97#[doc = "Field `rsvd_23_18` reader - "]
98pub type RSVD_23_18_R = crate::FieldReader<u8, u8>;
99#[doc = "Field `rsvd_23_18` writer - "]
100pub type RSVD_23_18_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, u8, 6, O>;
101impl R {
102 #[doc = "Bit 0"]
103 #[inline(always)]
104 pub fn rxen(&self) -> RXEN_R {
105 RXEN_R::new((self.bits & 1) != 0)
106 }
107 #[doc = "Bit 1"]
108 #[inline(always)]
109 pub fn txen(&self) -> TXEN_R {
110 TXEN_R::new(((self.bits >> 1) & 1) != 0)
111 }
112 #[doc = "Bit 2"]
113 #[inline(always)]
114 pub fn nopre(&self) -> NOPRE_R {
115 NOPRE_R::new(((self.bits >> 2) & 1) != 0)
116 }
117 #[doc = "Bit 3"]
118 #[inline(always)]
119 pub fn bro(&self) -> BRO_R {
120 BRO_R::new(((self.bits >> 3) & 1) != 0)
121 }
122 #[doc = "Bit 4"]
123 #[inline(always)]
124 pub fn rsvd_4(&self) -> RSVD_4_R {
125 RSVD_4_R::new(((self.bits >> 4) & 1) != 0)
126 }
127 #[doc = "Bit 5"]
128 #[inline(always)]
129 pub fn pro(&self) -> PRO_R {
130 PRO_R::new(((self.bits >> 5) & 1) != 0)
131 }
132 #[doc = "Bit 6"]
133 #[inline(always)]
134 pub fn ifg(&self) -> IFG_R {
135 IFG_R::new(((self.bits >> 6) & 1) != 0)
136 }
137 #[doc = "Bits 7:9"]
138 #[inline(always)]
139 pub fn rsvd_9_7(&self) -> RSVD_9_7_R {
140 RSVD_9_7_R::new(((self.bits >> 7) & 7) as u8)
141 }
142 #[doc = "Bit 10"]
143 #[inline(always)]
144 pub fn fulld(&self) -> FULLD_R {
145 FULLD_R::new(((self.bits >> 10) & 1) != 0)
146 }
147 #[doc = "Bits 11:12"]
148 #[inline(always)]
149 pub fn rsvd_12_11(&self) -> RSVD_12_11_R {
150 RSVD_12_11_R::new(((self.bits >> 11) & 3) as u8)
151 }
152 #[doc = "Bit 13"]
153 #[inline(always)]
154 pub fn crcen(&self) -> CRCEN_R {
155 CRCEN_R::new(((self.bits >> 13) & 1) != 0)
156 }
157 #[doc = "Bit 14"]
158 #[inline(always)]
159 pub fn hugen(&self) -> HUGEN_R {
160 HUGEN_R::new(((self.bits >> 14) & 1) != 0)
161 }
162 #[doc = "Bit 15"]
163 #[inline(always)]
164 pub fn pad(&self) -> PAD_R {
165 PAD_R::new(((self.bits >> 15) & 1) != 0)
166 }
167 #[doc = "Bit 16"]
168 #[inline(always)]
169 pub fn recsmall(&self) -> RECSMALL_R {
170 RECSMALL_R::new(((self.bits >> 16) & 1) != 0)
171 }
172 #[doc = "Bit 17"]
173 #[inline(always)]
174 pub fn rmii_en(&self) -> RMII_EN_R {
175 RMII_EN_R::new(((self.bits >> 17) & 1) != 0)
176 }
177 #[doc = "Bits 18:23"]
178 #[inline(always)]
179 pub fn rsvd_23_18(&self) -> RSVD_23_18_R {
180 RSVD_23_18_R::new(((self.bits >> 18) & 0x3f) as u8)
181 }
182}
183impl W {
184 #[doc = "Bit 0"]
185 #[inline(always)]
186 #[must_use]
187 pub fn rxen(&mut self) -> RXEN_W<0> {
188 RXEN_W::new(self)
189 }
190 #[doc = "Bit 1"]
191 #[inline(always)]
192 #[must_use]
193 pub fn txen(&mut self) -> TXEN_W<1> {
194 TXEN_W::new(self)
195 }
196 #[doc = "Bit 2"]
197 #[inline(always)]
198 #[must_use]
199 pub fn nopre(&mut self) -> NOPRE_W<2> {
200 NOPRE_W::new(self)
201 }
202 #[doc = "Bit 3"]
203 #[inline(always)]
204 #[must_use]
205 pub fn bro(&mut self) -> BRO_W<3> {
206 BRO_W::new(self)
207 }
208 #[doc = "Bit 4"]
209 #[inline(always)]
210 #[must_use]
211 pub fn rsvd_4(&mut self) -> RSVD_4_W<4> {
212 RSVD_4_W::new(self)
213 }
214 #[doc = "Bit 5"]
215 #[inline(always)]
216 #[must_use]
217 pub fn pro(&mut self) -> PRO_W<5> {
218 PRO_W::new(self)
219 }
220 #[doc = "Bit 6"]
221 #[inline(always)]
222 #[must_use]
223 pub fn ifg(&mut self) -> IFG_W<6> {
224 IFG_W::new(self)
225 }
226 #[doc = "Bits 7:9"]
227 #[inline(always)]
228 #[must_use]
229 pub fn rsvd_9_7(&mut self) -> RSVD_9_7_W<7> {
230 RSVD_9_7_W::new(self)
231 }
232 #[doc = "Bit 10"]
233 #[inline(always)]
234 #[must_use]
235 pub fn fulld(&mut self) -> FULLD_W<10> {
236 FULLD_W::new(self)
237 }
238 #[doc = "Bits 11:12"]
239 #[inline(always)]
240 #[must_use]
241 pub fn rsvd_12_11(&mut self) -> RSVD_12_11_W<11> {
242 RSVD_12_11_W::new(self)
243 }
244 #[doc = "Bit 13"]
245 #[inline(always)]
246 #[must_use]
247 pub fn crcen(&mut self) -> CRCEN_W<13> {
248 CRCEN_W::new(self)
249 }
250 #[doc = "Bit 14"]
251 #[inline(always)]
252 #[must_use]
253 pub fn hugen(&mut self) -> HUGEN_W<14> {
254 HUGEN_W::new(self)
255 }
256 #[doc = "Bit 15"]
257 #[inline(always)]
258 #[must_use]
259 pub fn pad(&mut self) -> PAD_W<15> {
260 PAD_W::new(self)
261 }
262 #[doc = "Bit 16"]
263 #[inline(always)]
264 #[must_use]
265 pub fn recsmall(&mut self) -> RECSMALL_W<16> {
266 RECSMALL_W::new(self)
267 }
268 #[doc = "Bit 17"]
269 #[inline(always)]
270 #[must_use]
271 pub fn rmii_en(&mut self) -> RMII_EN_W<17> {
272 RMII_EN_W::new(self)
273 }
274 #[doc = "Bits 18:23"]
275 #[inline(always)]
276 #[must_use]
277 pub fn rsvd_23_18(&mut self) -> RSVD_23_18_W<18> {
278 RSVD_23_18_W::new(self)
279 }
280 #[doc = "Writes raw bits to the register."]
281 #[inline(always)]
282 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
283 self.0.bits(bits);
284 self
285 }
286}
287#[doc = "MODE.\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 [mode](index.html) module"]
288pub struct MODE_SPEC;
289impl crate::RegisterSpec for MODE_SPEC {
290 type Ux = u32;
291}
292#[doc = "`read()` method returns [mode::R](R) reader structure"]
293impl crate::Readable for MODE_SPEC {
294 type Reader = R;
295}
296#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"]
297impl crate::Writable for MODE_SPEC {
298 type Writer = W;
299 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
300 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
301}
302#[doc = "`reset()` method sets MODE to value 0"]
303impl crate::Resettable for MODE_SPEC {
304 const RESET_VALUE: Self::Ux = 0;
305}