1#[doc = r"Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5#[doc = r"Value to write to the register"]
6pub struct W {
7 bits: u32,
8}
9impl super::HB8CFG {
10 #[doc = r"Modifies the contents of the register"]
11 #[inline(always)]
12 pub fn modify<F>(&self, f: F)
13 where
14 for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15 {
16 let bits = self.register.get();
17 self.register.set(f(&R { bits }, &mut W { bits }).bits);
18 }
19 #[doc = r"Reads the contents of the register"]
20 #[inline(always)]
21 pub fn read(&self) -> R {
22 R {
23 bits: self.register.get(),
24 }
25 }
26 #[doc = r"Writes to the register"]
27 #[inline(always)]
28 pub fn write<F>(&self, f: F)
29 where
30 F: FnOnce(&mut W) -> &mut W,
31 {
32 self.register.set(
33 f(&mut W {
34 bits: Self::reset_value(),
35 })
36 .bits,
37 );
38 }
39 #[doc = r"Reset value of the register"]
40 #[inline(always)]
41 pub const fn reset_value() -> u32 {
42 0
43 }
44 #[doc = r"Writes the reset value to the register"]
45 #[inline(always)]
46 pub fn reset(&self) {
47 self.register.set(Self::reset_value())
48 }
49}
50#[doc = "Possible values of the field `EPI_HB8CFG_MODE`"]
51#[derive(Clone, Copy, Debug, PartialEq)]
52pub enum EPI_HB8CFG_MODER {
53 #[doc = "ADMUX - AD\\[7:0\\]"]
54 EPI_HB8CFG_MODE_MUX,
55 #[doc = "ADNONMUX - D\\[7:0\\]"]
56 EPI_HB8CFG_MODE_NMUX,
57 #[doc = "Continuous Read - D\\[7:0\\]"]
58 EPI_HB8CFG_MODE_SRAM,
59 #[doc = "XFIFO - D\\[7:0\\]"]
60 EPI_HB8CFG_MODE_FIFO,
61}
62impl EPI_HB8CFG_MODER {
63 #[doc = r"Value of the field as raw bits"]
64 #[inline(always)]
65 pub fn bits(&self) -> u8 {
66 match *self {
67 EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_MUX => 0,
68 EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_NMUX => 1,
69 EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_SRAM => 2,
70 EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_FIFO => 3,
71 }
72 }
73 #[allow(missing_docs)]
74 #[doc(hidden)]
75 #[inline(always)]
76 pub fn _from(value: u8) -> EPI_HB8CFG_MODER {
77 match value {
78 0 => EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_MUX,
79 1 => EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_NMUX,
80 2 => EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_SRAM,
81 3 => EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_FIFO,
82 _ => unreachable!(),
83 }
84 }
85 #[doc = "Checks if the value of the field is `EPI_HB8CFG_MODE_MUX`"]
86 #[inline(always)]
87 pub fn is_epi_hb8cfg_mode_mux(&self) -> bool {
88 *self == EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_MUX
89 }
90 #[doc = "Checks if the value of the field is `EPI_HB8CFG_MODE_NMUX`"]
91 #[inline(always)]
92 pub fn is_epi_hb8cfg_mode_nmux(&self) -> bool {
93 *self == EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_NMUX
94 }
95 #[doc = "Checks if the value of the field is `EPI_HB8CFG_MODE_SRAM`"]
96 #[inline(always)]
97 pub fn is_epi_hb8cfg_mode_sram(&self) -> bool {
98 *self == EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_SRAM
99 }
100 #[doc = "Checks if the value of the field is `EPI_HB8CFG_MODE_FIFO`"]
101 #[inline(always)]
102 pub fn is_epi_hb8cfg_mode_fifo(&self) -> bool {
103 *self == EPI_HB8CFG_MODER::EPI_HB8CFG_MODE_FIFO
104 }
105}
106#[doc = "Values that can be written to the field `EPI_HB8CFG_MODE`"]
107#[derive(Clone, Copy, Debug, PartialEq)]
108pub enum EPI_HB8CFG_MODEW {
109 #[doc = "ADMUX - AD\\[7:0\\]"]
110 EPI_HB8CFG_MODE_MUX,
111 #[doc = "ADNONMUX - D\\[7:0\\]"]
112 EPI_HB8CFG_MODE_NMUX,
113 #[doc = "Continuous Read - D\\[7:0\\]"]
114 EPI_HB8CFG_MODE_SRAM,
115 #[doc = "XFIFO - D\\[7:0\\]"]
116 EPI_HB8CFG_MODE_FIFO,
117}
118impl EPI_HB8CFG_MODEW {
119 #[allow(missing_docs)]
120 #[doc(hidden)]
121 #[inline(always)]
122 pub fn _bits(&self) -> u8 {
123 match *self {
124 EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_MUX => 0,
125 EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_NMUX => 1,
126 EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_SRAM => 2,
127 EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_FIFO => 3,
128 }
129 }
130}
131#[doc = r"Proxy"]
132pub struct _EPI_HB8CFG_MODEW<'a> {
133 w: &'a mut W,
134}
135impl<'a> _EPI_HB8CFG_MODEW<'a> {
136 #[doc = r"Writes `variant` to the field"]
137 #[inline(always)]
138 pub fn variant(self, variant: EPI_HB8CFG_MODEW) -> &'a mut W {
139 {
140 self.bits(variant._bits())
141 }
142 }
143 #[doc = "ADMUX - AD\\[7:0\\]"]
144 #[inline(always)]
145 pub fn epi_hb8cfg_mode_mux(self) -> &'a mut W {
146 self.variant(EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_MUX)
147 }
148 #[doc = "ADNONMUX - D\\[7:0\\]"]
149 #[inline(always)]
150 pub fn epi_hb8cfg_mode_nmux(self) -> &'a mut W {
151 self.variant(EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_NMUX)
152 }
153 #[doc = "Continuous Read - D\\[7:0\\]"]
154 #[inline(always)]
155 pub fn epi_hb8cfg_mode_sram(self) -> &'a mut W {
156 self.variant(EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_SRAM)
157 }
158 #[doc = "XFIFO - D\\[7:0\\]"]
159 #[inline(always)]
160 pub fn epi_hb8cfg_mode_fifo(self) -> &'a mut W {
161 self.variant(EPI_HB8CFG_MODEW::EPI_HB8CFG_MODE_FIFO)
162 }
163 #[doc = r"Writes raw bits to the field"]
164 #[inline(always)]
165 pub fn bits(self, value: u8) -> &'a mut W {
166 self.w.bits &= !(3 << 0);
167 self.w.bits |= ((value as u32) & 3) << 0;
168 self.w
169 }
170}
171#[doc = "Possible values of the field `EPI_HB8CFG_RDWS`"]
172#[derive(Clone, Copy, Debug, PartialEq)]
173pub enum EPI_HB8CFG_RDWSR {
174 #[doc = "Active RDn is 2 EPI clocks"]
175 EPI_HB8CFG_RDWS_2,
176 #[doc = "Active RDn is 4 EPI clocks"]
177 EPI_HB8CFG_RDWS_4,
178 #[doc = "Active RDn is 6 EPI clocks"]
179 EPI_HB8CFG_RDWS_6,
180 #[doc = "Active RDn is 8 EPI clocks"]
181 EPI_HB8CFG_RDWS_8,
182}
183impl EPI_HB8CFG_RDWSR {
184 #[doc = r"Value of the field as raw bits"]
185 #[inline(always)]
186 pub fn bits(&self) -> u8 {
187 match *self {
188 EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_2 => 0,
189 EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_4 => 1,
190 EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_6 => 2,
191 EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_8 => 3,
192 }
193 }
194 #[allow(missing_docs)]
195 #[doc(hidden)]
196 #[inline(always)]
197 pub fn _from(value: u8) -> EPI_HB8CFG_RDWSR {
198 match value {
199 0 => EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_2,
200 1 => EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_4,
201 2 => EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_6,
202 3 => EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_8,
203 _ => unreachable!(),
204 }
205 }
206 #[doc = "Checks if the value of the field is `EPI_HB8CFG_RDWS_2`"]
207 #[inline(always)]
208 pub fn is_epi_hb8cfg_rdws_2(&self) -> bool {
209 *self == EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_2
210 }
211 #[doc = "Checks if the value of the field is `EPI_HB8CFG_RDWS_4`"]
212 #[inline(always)]
213 pub fn is_epi_hb8cfg_rdws_4(&self) -> bool {
214 *self == EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_4
215 }
216 #[doc = "Checks if the value of the field is `EPI_HB8CFG_RDWS_6`"]
217 #[inline(always)]
218 pub fn is_epi_hb8cfg_rdws_6(&self) -> bool {
219 *self == EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_6
220 }
221 #[doc = "Checks if the value of the field is `EPI_HB8CFG_RDWS_8`"]
222 #[inline(always)]
223 pub fn is_epi_hb8cfg_rdws_8(&self) -> bool {
224 *self == EPI_HB8CFG_RDWSR::EPI_HB8CFG_RDWS_8
225 }
226}
227#[doc = "Values that can be written to the field `EPI_HB8CFG_RDWS`"]
228#[derive(Clone, Copy, Debug, PartialEq)]
229pub enum EPI_HB8CFG_RDWSW {
230 #[doc = "Active RDn is 2 EPI clocks"]
231 EPI_HB8CFG_RDWS_2,
232 #[doc = "Active RDn is 4 EPI clocks"]
233 EPI_HB8CFG_RDWS_4,
234 #[doc = "Active RDn is 6 EPI clocks"]
235 EPI_HB8CFG_RDWS_6,
236 #[doc = "Active RDn is 8 EPI clocks"]
237 EPI_HB8CFG_RDWS_8,
238}
239impl EPI_HB8CFG_RDWSW {
240 #[allow(missing_docs)]
241 #[doc(hidden)]
242 #[inline(always)]
243 pub fn _bits(&self) -> u8 {
244 match *self {
245 EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_2 => 0,
246 EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_4 => 1,
247 EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_6 => 2,
248 EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_8 => 3,
249 }
250 }
251}
252#[doc = r"Proxy"]
253pub struct _EPI_HB8CFG_RDWSW<'a> {
254 w: &'a mut W,
255}
256impl<'a> _EPI_HB8CFG_RDWSW<'a> {
257 #[doc = r"Writes `variant` to the field"]
258 #[inline(always)]
259 pub fn variant(self, variant: EPI_HB8CFG_RDWSW) -> &'a mut W {
260 {
261 self.bits(variant._bits())
262 }
263 }
264 #[doc = "Active RDn is 2 EPI clocks"]
265 #[inline(always)]
266 pub fn epi_hb8cfg_rdws_2(self) -> &'a mut W {
267 self.variant(EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_2)
268 }
269 #[doc = "Active RDn is 4 EPI clocks"]
270 #[inline(always)]
271 pub fn epi_hb8cfg_rdws_4(self) -> &'a mut W {
272 self.variant(EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_4)
273 }
274 #[doc = "Active RDn is 6 EPI clocks"]
275 #[inline(always)]
276 pub fn epi_hb8cfg_rdws_6(self) -> &'a mut W {
277 self.variant(EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_6)
278 }
279 #[doc = "Active RDn is 8 EPI clocks"]
280 #[inline(always)]
281 pub fn epi_hb8cfg_rdws_8(self) -> &'a mut W {
282 self.variant(EPI_HB8CFG_RDWSW::EPI_HB8CFG_RDWS_8)
283 }
284 #[doc = r"Writes raw bits to the field"]
285 #[inline(always)]
286 pub fn bits(self, value: u8) -> &'a mut W {
287 self.w.bits &= !(3 << 4);
288 self.w.bits |= ((value as u32) & 3) << 4;
289 self.w
290 }
291}
292#[doc = "Possible values of the field `EPI_HB8CFG_WRWS`"]
293#[derive(Clone, Copy, Debug, PartialEq)]
294pub enum EPI_HB8CFG_WRWSR {
295 #[doc = "Active WRn is 2 EPI clocks"]
296 EPI_HB8CFG_WRWS_2,
297 #[doc = "Active WRn is 4 EPI clocks"]
298 EPI_HB8CFG_WRWS_4,
299 #[doc = "Active WRn is 6 EPI clocks"]
300 EPI_HB8CFG_WRWS_6,
301 #[doc = "Active WRn is 8 EPI clocks"]
302 EPI_HB8CFG_WRWS_8,
303}
304impl EPI_HB8CFG_WRWSR {
305 #[doc = r"Value of the field as raw bits"]
306 #[inline(always)]
307 pub fn bits(&self) -> u8 {
308 match *self {
309 EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_2 => 0,
310 EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_4 => 1,
311 EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_6 => 2,
312 EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_8 => 3,
313 }
314 }
315 #[allow(missing_docs)]
316 #[doc(hidden)]
317 #[inline(always)]
318 pub fn _from(value: u8) -> EPI_HB8CFG_WRWSR {
319 match value {
320 0 => EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_2,
321 1 => EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_4,
322 2 => EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_6,
323 3 => EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_8,
324 _ => unreachable!(),
325 }
326 }
327 #[doc = "Checks if the value of the field is `EPI_HB8CFG_WRWS_2`"]
328 #[inline(always)]
329 pub fn is_epi_hb8cfg_wrws_2(&self) -> bool {
330 *self == EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_2
331 }
332 #[doc = "Checks if the value of the field is `EPI_HB8CFG_WRWS_4`"]
333 #[inline(always)]
334 pub fn is_epi_hb8cfg_wrws_4(&self) -> bool {
335 *self == EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_4
336 }
337 #[doc = "Checks if the value of the field is `EPI_HB8CFG_WRWS_6`"]
338 #[inline(always)]
339 pub fn is_epi_hb8cfg_wrws_6(&self) -> bool {
340 *self == EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_6
341 }
342 #[doc = "Checks if the value of the field is `EPI_HB8CFG_WRWS_8`"]
343 #[inline(always)]
344 pub fn is_epi_hb8cfg_wrws_8(&self) -> bool {
345 *self == EPI_HB8CFG_WRWSR::EPI_HB8CFG_WRWS_8
346 }
347}
348#[doc = "Values that can be written to the field `EPI_HB8CFG_WRWS`"]
349#[derive(Clone, Copy, Debug, PartialEq)]
350pub enum EPI_HB8CFG_WRWSW {
351 #[doc = "Active WRn is 2 EPI clocks"]
352 EPI_HB8CFG_WRWS_2,
353 #[doc = "Active WRn is 4 EPI clocks"]
354 EPI_HB8CFG_WRWS_4,
355 #[doc = "Active WRn is 6 EPI clocks"]
356 EPI_HB8CFG_WRWS_6,
357 #[doc = "Active WRn is 8 EPI clocks"]
358 EPI_HB8CFG_WRWS_8,
359}
360impl EPI_HB8CFG_WRWSW {
361 #[allow(missing_docs)]
362 #[doc(hidden)]
363 #[inline(always)]
364 pub fn _bits(&self) -> u8 {
365 match *self {
366 EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_2 => 0,
367 EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_4 => 1,
368 EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_6 => 2,
369 EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_8 => 3,
370 }
371 }
372}
373#[doc = r"Proxy"]
374pub struct _EPI_HB8CFG_WRWSW<'a> {
375 w: &'a mut W,
376}
377impl<'a> _EPI_HB8CFG_WRWSW<'a> {
378 #[doc = r"Writes `variant` to the field"]
379 #[inline(always)]
380 pub fn variant(self, variant: EPI_HB8CFG_WRWSW) -> &'a mut W {
381 {
382 self.bits(variant._bits())
383 }
384 }
385 #[doc = "Active WRn is 2 EPI clocks"]
386 #[inline(always)]
387 pub fn epi_hb8cfg_wrws_2(self) -> &'a mut W {
388 self.variant(EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_2)
389 }
390 #[doc = "Active WRn is 4 EPI clocks"]
391 #[inline(always)]
392 pub fn epi_hb8cfg_wrws_4(self) -> &'a mut W {
393 self.variant(EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_4)
394 }
395 #[doc = "Active WRn is 6 EPI clocks"]
396 #[inline(always)]
397 pub fn epi_hb8cfg_wrws_6(self) -> &'a mut W {
398 self.variant(EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_6)
399 }
400 #[doc = "Active WRn is 8 EPI clocks"]
401 #[inline(always)]
402 pub fn epi_hb8cfg_wrws_8(self) -> &'a mut W {
403 self.variant(EPI_HB8CFG_WRWSW::EPI_HB8CFG_WRWS_8)
404 }
405 #[doc = r"Writes raw bits to the field"]
406 #[inline(always)]
407 pub fn bits(self, value: u8) -> &'a mut W {
408 self.w.bits &= !(3 << 6);
409 self.w.bits |= ((value as u32) & 3) << 6;
410 self.w
411 }
412}
413#[doc = r"Value of the field"]
414pub struct EPI_HB8CFG_MAXWAITR {
415 bits: u8,
416}
417impl EPI_HB8CFG_MAXWAITR {
418 #[doc = r"Value of the field as raw bits"]
419 #[inline(always)]
420 pub fn bits(&self) -> u8 {
421 self.bits
422 }
423}
424#[doc = r"Proxy"]
425pub struct _EPI_HB8CFG_MAXWAITW<'a> {
426 w: &'a mut W,
427}
428impl<'a> _EPI_HB8CFG_MAXWAITW<'a> {
429 #[doc = r"Writes raw bits to the field"]
430 #[inline(always)]
431 pub unsafe fn bits(self, value: u8) -> &'a mut W {
432 self.w.bits &= !(255 << 8);
433 self.w.bits |= ((value as u32) & 255) << 8;
434 self.w
435 }
436}
437#[doc = r"Value of the field"]
438pub struct EPI_HB8CFG_ALEHIGHR {
439 bits: bool,
440}
441impl EPI_HB8CFG_ALEHIGHR {
442 #[doc = r"Value of the field as raw bits"]
443 #[inline(always)]
444 pub fn bit(&self) -> bool {
445 self.bits
446 }
447 #[doc = r"Returns `true` if the bit is clear (0)"]
448 #[inline(always)]
449 pub fn bit_is_clear(&self) -> bool {
450 !self.bit()
451 }
452 #[doc = r"Returns `true` if the bit is set (1)"]
453 #[inline(always)]
454 pub fn bit_is_set(&self) -> bool {
455 self.bit()
456 }
457}
458#[doc = r"Proxy"]
459pub struct _EPI_HB8CFG_ALEHIGHW<'a> {
460 w: &'a mut W,
461}
462impl<'a> _EPI_HB8CFG_ALEHIGHW<'a> {
463 #[doc = r"Sets the field bit"]
464 #[inline(always)]
465 pub fn set_bit(self) -> &'a mut W {
466 self.bit(true)
467 }
468 #[doc = r"Clears the field bit"]
469 #[inline(always)]
470 pub fn clear_bit(self) -> &'a mut W {
471 self.bit(false)
472 }
473 #[doc = r"Writes raw bits to the field"]
474 #[inline(always)]
475 pub fn bit(self, value: bool) -> &'a mut W {
476 self.w.bits &= !(1 << 19);
477 self.w.bits |= ((value as u32) & 1) << 19;
478 self.w
479 }
480}
481#[doc = r"Value of the field"]
482pub struct EPI_HB8CFG_RDHIGHR {
483 bits: bool,
484}
485impl EPI_HB8CFG_RDHIGHR {
486 #[doc = r"Value of the field as raw bits"]
487 #[inline(always)]
488 pub fn bit(&self) -> bool {
489 self.bits
490 }
491 #[doc = r"Returns `true` if the bit is clear (0)"]
492 #[inline(always)]
493 pub fn bit_is_clear(&self) -> bool {
494 !self.bit()
495 }
496 #[doc = r"Returns `true` if the bit is set (1)"]
497 #[inline(always)]
498 pub fn bit_is_set(&self) -> bool {
499 self.bit()
500 }
501}
502#[doc = r"Proxy"]
503pub struct _EPI_HB8CFG_RDHIGHW<'a> {
504 w: &'a mut W,
505}
506impl<'a> _EPI_HB8CFG_RDHIGHW<'a> {
507 #[doc = r"Sets the field bit"]
508 #[inline(always)]
509 pub fn set_bit(self) -> &'a mut W {
510 self.bit(true)
511 }
512 #[doc = r"Clears the field bit"]
513 #[inline(always)]
514 pub fn clear_bit(self) -> &'a mut W {
515 self.bit(false)
516 }
517 #[doc = r"Writes raw bits to the field"]
518 #[inline(always)]
519 pub fn bit(self, value: bool) -> &'a mut W {
520 self.w.bits &= !(1 << 20);
521 self.w.bits |= ((value as u32) & 1) << 20;
522 self.w
523 }
524}
525#[doc = r"Value of the field"]
526pub struct EPI_HB8CFG_WRHIGHR {
527 bits: bool,
528}
529impl EPI_HB8CFG_WRHIGHR {
530 #[doc = r"Value of the field as raw bits"]
531 #[inline(always)]
532 pub fn bit(&self) -> bool {
533 self.bits
534 }
535 #[doc = r"Returns `true` if the bit is clear (0)"]
536 #[inline(always)]
537 pub fn bit_is_clear(&self) -> bool {
538 !self.bit()
539 }
540 #[doc = r"Returns `true` if the bit is set (1)"]
541 #[inline(always)]
542 pub fn bit_is_set(&self) -> bool {
543 self.bit()
544 }
545}
546#[doc = r"Proxy"]
547pub struct _EPI_HB8CFG_WRHIGHW<'a> {
548 w: &'a mut W,
549}
550impl<'a> _EPI_HB8CFG_WRHIGHW<'a> {
551 #[doc = r"Sets the field bit"]
552 #[inline(always)]
553 pub fn set_bit(self) -> &'a mut W {
554 self.bit(true)
555 }
556 #[doc = r"Clears the field bit"]
557 #[inline(always)]
558 pub fn clear_bit(self) -> &'a mut W {
559 self.bit(false)
560 }
561 #[doc = r"Writes raw bits to the field"]
562 #[inline(always)]
563 pub fn bit(self, value: bool) -> &'a mut W {
564 self.w.bits &= !(1 << 21);
565 self.w.bits |= ((value as u32) & 1) << 21;
566 self.w
567 }
568}
569#[doc = r"Value of the field"]
570pub struct EPI_HB8CFG_XFEENR {
571 bits: bool,
572}
573impl EPI_HB8CFG_XFEENR {
574 #[doc = r"Value of the field as raw bits"]
575 #[inline(always)]
576 pub fn bit(&self) -> bool {
577 self.bits
578 }
579 #[doc = r"Returns `true` if the bit is clear (0)"]
580 #[inline(always)]
581 pub fn bit_is_clear(&self) -> bool {
582 !self.bit()
583 }
584 #[doc = r"Returns `true` if the bit is set (1)"]
585 #[inline(always)]
586 pub fn bit_is_set(&self) -> bool {
587 self.bit()
588 }
589}
590#[doc = r"Proxy"]
591pub struct _EPI_HB8CFG_XFEENW<'a> {
592 w: &'a mut W,
593}
594impl<'a> _EPI_HB8CFG_XFEENW<'a> {
595 #[doc = r"Sets the field bit"]
596 #[inline(always)]
597 pub fn set_bit(self) -> &'a mut W {
598 self.bit(true)
599 }
600 #[doc = r"Clears the field bit"]
601 #[inline(always)]
602 pub fn clear_bit(self) -> &'a mut W {
603 self.bit(false)
604 }
605 #[doc = r"Writes raw bits to the field"]
606 #[inline(always)]
607 pub fn bit(self, value: bool) -> &'a mut W {
608 self.w.bits &= !(1 << 22);
609 self.w.bits |= ((value as u32) & 1) << 22;
610 self.w
611 }
612}
613#[doc = r"Value of the field"]
614pub struct EPI_HB8CFG_XFFENR {
615 bits: bool,
616}
617impl EPI_HB8CFG_XFFENR {
618 #[doc = r"Value of the field as raw bits"]
619 #[inline(always)]
620 pub fn bit(&self) -> bool {
621 self.bits
622 }
623 #[doc = r"Returns `true` if the bit is clear (0)"]
624 #[inline(always)]
625 pub fn bit_is_clear(&self) -> bool {
626 !self.bit()
627 }
628 #[doc = r"Returns `true` if the bit is set (1)"]
629 #[inline(always)]
630 pub fn bit_is_set(&self) -> bool {
631 self.bit()
632 }
633}
634#[doc = r"Proxy"]
635pub struct _EPI_HB8CFG_XFFENW<'a> {
636 w: &'a mut W,
637}
638impl<'a> _EPI_HB8CFG_XFFENW<'a> {
639 #[doc = r"Sets the field bit"]
640 #[inline(always)]
641 pub fn set_bit(self) -> &'a mut W {
642 self.bit(true)
643 }
644 #[doc = r"Clears the field bit"]
645 #[inline(always)]
646 pub fn clear_bit(self) -> &'a mut W {
647 self.bit(false)
648 }
649 #[doc = r"Writes raw bits to the field"]
650 #[inline(always)]
651 pub fn bit(self, value: bool) -> &'a mut W {
652 self.w.bits &= !(1 << 23);
653 self.w.bits |= ((value as u32) & 1) << 23;
654 self.w
655 }
656}
657#[doc = r"Value of the field"]
658pub struct EPI_HB8CFG_IRDYINVR {
659 bits: bool,
660}
661impl EPI_HB8CFG_IRDYINVR {
662 #[doc = r"Value of the field as raw bits"]
663 #[inline(always)]
664 pub fn bit(&self) -> bool {
665 self.bits
666 }
667 #[doc = r"Returns `true` if the bit is clear (0)"]
668 #[inline(always)]
669 pub fn bit_is_clear(&self) -> bool {
670 !self.bit()
671 }
672 #[doc = r"Returns `true` if the bit is set (1)"]
673 #[inline(always)]
674 pub fn bit_is_set(&self) -> bool {
675 self.bit()
676 }
677}
678#[doc = r"Proxy"]
679pub struct _EPI_HB8CFG_IRDYINVW<'a> {
680 w: &'a mut W,
681}
682impl<'a> _EPI_HB8CFG_IRDYINVW<'a> {
683 #[doc = r"Sets the field bit"]
684 #[inline(always)]
685 pub fn set_bit(self) -> &'a mut W {
686 self.bit(true)
687 }
688 #[doc = r"Clears the field bit"]
689 #[inline(always)]
690 pub fn clear_bit(self) -> &'a mut W {
691 self.bit(false)
692 }
693 #[doc = r"Writes raw bits to the field"]
694 #[inline(always)]
695 pub fn bit(self, value: bool) -> &'a mut W {
696 self.w.bits &= !(1 << 27);
697 self.w.bits |= ((value as u32) & 1) << 27;
698 self.w
699 }
700}
701#[doc = r"Value of the field"]
702pub struct EPI_HB8CFG_RDYENR {
703 bits: bool,
704}
705impl EPI_HB8CFG_RDYENR {
706 #[doc = r"Value of the field as raw bits"]
707 #[inline(always)]
708 pub fn bit(&self) -> bool {
709 self.bits
710 }
711 #[doc = r"Returns `true` if the bit is clear (0)"]
712 #[inline(always)]
713 pub fn bit_is_clear(&self) -> bool {
714 !self.bit()
715 }
716 #[doc = r"Returns `true` if the bit is set (1)"]
717 #[inline(always)]
718 pub fn bit_is_set(&self) -> bool {
719 self.bit()
720 }
721}
722#[doc = r"Proxy"]
723pub struct _EPI_HB8CFG_RDYENW<'a> {
724 w: &'a mut W,
725}
726impl<'a> _EPI_HB8CFG_RDYENW<'a> {
727 #[doc = r"Sets the field bit"]
728 #[inline(always)]
729 pub fn set_bit(self) -> &'a mut W {
730 self.bit(true)
731 }
732 #[doc = r"Clears the field bit"]
733 #[inline(always)]
734 pub fn clear_bit(self) -> &'a mut W {
735 self.bit(false)
736 }
737 #[doc = r"Writes raw bits to the field"]
738 #[inline(always)]
739 pub fn bit(self, value: bool) -> &'a mut W {
740 self.w.bits &= !(1 << 28);
741 self.w.bits |= ((value as u32) & 1) << 28;
742 self.w
743 }
744}
745#[doc = r"Value of the field"]
746pub struct EPI_HB8CFG_CLKINVR {
747 bits: bool,
748}
749impl EPI_HB8CFG_CLKINVR {
750 #[doc = r"Value of the field as raw bits"]
751 #[inline(always)]
752 pub fn bit(&self) -> bool {
753 self.bits
754 }
755 #[doc = r"Returns `true` if the bit is clear (0)"]
756 #[inline(always)]
757 pub fn bit_is_clear(&self) -> bool {
758 !self.bit()
759 }
760 #[doc = r"Returns `true` if the bit is set (1)"]
761 #[inline(always)]
762 pub fn bit_is_set(&self) -> bool {
763 self.bit()
764 }
765}
766#[doc = r"Proxy"]
767pub struct _EPI_HB8CFG_CLKINVW<'a> {
768 w: &'a mut W,
769}
770impl<'a> _EPI_HB8CFG_CLKINVW<'a> {
771 #[doc = r"Sets the field bit"]
772 #[inline(always)]
773 pub fn set_bit(self) -> &'a mut W {
774 self.bit(true)
775 }
776 #[doc = r"Clears the field bit"]
777 #[inline(always)]
778 pub fn clear_bit(self) -> &'a mut W {
779 self.bit(false)
780 }
781 #[doc = r"Writes raw bits to the field"]
782 #[inline(always)]
783 pub fn bit(self, value: bool) -> &'a mut W {
784 self.w.bits &= !(1 << 29);
785 self.w.bits |= ((value as u32) & 1) << 29;
786 self.w
787 }
788}
789#[doc = r"Value of the field"]
790pub struct EPI_HB8CFG_CLKGATEIR {
791 bits: bool,
792}
793impl EPI_HB8CFG_CLKGATEIR {
794 #[doc = r"Value of the field as raw bits"]
795 #[inline(always)]
796 pub fn bit(&self) -> bool {
797 self.bits
798 }
799 #[doc = r"Returns `true` if the bit is clear (0)"]
800 #[inline(always)]
801 pub fn bit_is_clear(&self) -> bool {
802 !self.bit()
803 }
804 #[doc = r"Returns `true` if the bit is set (1)"]
805 #[inline(always)]
806 pub fn bit_is_set(&self) -> bool {
807 self.bit()
808 }
809}
810#[doc = r"Proxy"]
811pub struct _EPI_HB8CFG_CLKGATEIW<'a> {
812 w: &'a mut W,
813}
814impl<'a> _EPI_HB8CFG_CLKGATEIW<'a> {
815 #[doc = r"Sets the field bit"]
816 #[inline(always)]
817 pub fn set_bit(self) -> &'a mut W {
818 self.bit(true)
819 }
820 #[doc = r"Clears the field bit"]
821 #[inline(always)]
822 pub fn clear_bit(self) -> &'a mut W {
823 self.bit(false)
824 }
825 #[doc = r"Writes raw bits to the field"]
826 #[inline(always)]
827 pub fn bit(self, value: bool) -> &'a mut W {
828 self.w.bits &= !(1 << 30);
829 self.w.bits |= ((value as u32) & 1) << 30;
830 self.w
831 }
832}
833#[doc = r"Value of the field"]
834pub struct EPI_HB8CFG_CLKGATER {
835 bits: bool,
836}
837impl EPI_HB8CFG_CLKGATER {
838 #[doc = r"Value of the field as raw bits"]
839 #[inline(always)]
840 pub fn bit(&self) -> bool {
841 self.bits
842 }
843 #[doc = r"Returns `true` if the bit is clear (0)"]
844 #[inline(always)]
845 pub fn bit_is_clear(&self) -> bool {
846 !self.bit()
847 }
848 #[doc = r"Returns `true` if the bit is set (1)"]
849 #[inline(always)]
850 pub fn bit_is_set(&self) -> bool {
851 self.bit()
852 }
853}
854#[doc = r"Proxy"]
855pub struct _EPI_HB8CFG_CLKGATEW<'a> {
856 w: &'a mut W,
857}
858impl<'a> _EPI_HB8CFG_CLKGATEW<'a> {
859 #[doc = r"Sets the field bit"]
860 #[inline(always)]
861 pub fn set_bit(self) -> &'a mut W {
862 self.bit(true)
863 }
864 #[doc = r"Clears the field bit"]
865 #[inline(always)]
866 pub fn clear_bit(self) -> &'a mut W {
867 self.bit(false)
868 }
869 #[doc = r"Writes raw bits to the field"]
870 #[inline(always)]
871 pub fn bit(self, value: bool) -> &'a mut W {
872 self.w.bits &= !(1 << 31);
873 self.w.bits |= ((value as u32) & 1) << 31;
874 self.w
875 }
876}
877impl R {
878 #[doc = r"Value of the register as raw bits"]
879 #[inline(always)]
880 pub fn bits(&self) -> u32 {
881 self.bits
882 }
883 #[doc = "Bits 0:1 - Host Bus Sub-Mode"]
884 #[inline(always)]
885 pub fn epi_hb8cfg_mode(&self) -> EPI_HB8CFG_MODER {
886 EPI_HB8CFG_MODER::_from(((self.bits >> 0) & 3) as u8)
887 }
888 #[doc = "Bits 4:5 - Read Wait States"]
889 #[inline(always)]
890 pub fn epi_hb8cfg_rdws(&self) -> EPI_HB8CFG_RDWSR {
891 EPI_HB8CFG_RDWSR::_from(((self.bits >> 4) & 3) as u8)
892 }
893 #[doc = "Bits 6:7 - Write Wait States"]
894 #[inline(always)]
895 pub fn epi_hb8cfg_wrws(&self) -> EPI_HB8CFG_WRWSR {
896 EPI_HB8CFG_WRWSR::_from(((self.bits >> 6) & 3) as u8)
897 }
898 #[doc = "Bits 8:15 - Maximum Wait"]
899 #[inline(always)]
900 pub fn epi_hb8cfg_maxwait(&self) -> EPI_HB8CFG_MAXWAITR {
901 let bits = ((self.bits >> 8) & 255) as u8;
902 EPI_HB8CFG_MAXWAITR { bits }
903 }
904 #[doc = "Bit 19 - ALE Strobe Polarity"]
905 #[inline(always)]
906 pub fn epi_hb8cfg_alehigh(&self) -> EPI_HB8CFG_ALEHIGHR {
907 let bits = ((self.bits >> 19) & 1) != 0;
908 EPI_HB8CFG_ALEHIGHR { bits }
909 }
910 #[doc = "Bit 20 - READ Strobe Polarity"]
911 #[inline(always)]
912 pub fn epi_hb8cfg_rdhigh(&self) -> EPI_HB8CFG_RDHIGHR {
913 let bits = ((self.bits >> 20) & 1) != 0;
914 EPI_HB8CFG_RDHIGHR { bits }
915 }
916 #[doc = "Bit 21 - WRITE Strobe Polarity"]
917 #[inline(always)]
918 pub fn epi_hb8cfg_wrhigh(&self) -> EPI_HB8CFG_WRHIGHR {
919 let bits = ((self.bits >> 21) & 1) != 0;
920 EPI_HB8CFG_WRHIGHR { bits }
921 }
922 #[doc = "Bit 22 - External FIFO EMPTY Enable"]
923 #[inline(always)]
924 pub fn epi_hb8cfg_xfeen(&self) -> EPI_HB8CFG_XFEENR {
925 let bits = ((self.bits >> 22) & 1) != 0;
926 EPI_HB8CFG_XFEENR { bits }
927 }
928 #[doc = "Bit 23 - External FIFO FULL Enable"]
929 #[inline(always)]
930 pub fn epi_hb8cfg_xffen(&self) -> EPI_HB8CFG_XFFENR {
931 let bits = ((self.bits >> 23) & 1) != 0;
932 EPI_HB8CFG_XFFENR { bits }
933 }
934 #[doc = "Bit 27 - Input Ready Invert"]
935 #[inline(always)]
936 pub fn epi_hb8cfg_irdyinv(&self) -> EPI_HB8CFG_IRDYINVR {
937 let bits = ((self.bits >> 27) & 1) != 0;
938 EPI_HB8CFG_IRDYINVR { bits }
939 }
940 #[doc = "Bit 28 - Input Ready Enable"]
941 #[inline(always)]
942 pub fn epi_hb8cfg_rdyen(&self) -> EPI_HB8CFG_RDYENR {
943 let bits = ((self.bits >> 28) & 1) != 0;
944 EPI_HB8CFG_RDYENR { bits }
945 }
946 #[doc = "Bit 29 - Invert Output Clock Enable"]
947 #[inline(always)]
948 pub fn epi_hb8cfg_clkinv(&self) -> EPI_HB8CFG_CLKINVR {
949 let bits = ((self.bits >> 29) & 1) != 0;
950 EPI_HB8CFG_CLKINVR { bits }
951 }
952 #[doc = "Bit 30 - Clock Gated when Idle"]
953 #[inline(always)]
954 pub fn epi_hb8cfg_clkgatei(&self) -> EPI_HB8CFG_CLKGATEIR {
955 let bits = ((self.bits >> 30) & 1) != 0;
956 EPI_HB8CFG_CLKGATEIR { bits }
957 }
958 #[doc = "Bit 31 - Clock Gated"]
959 #[inline(always)]
960 pub fn epi_hb8cfg_clkgate(&self) -> EPI_HB8CFG_CLKGATER {
961 let bits = ((self.bits >> 31) & 1) != 0;
962 EPI_HB8CFG_CLKGATER { bits }
963 }
964}
965impl W {
966 #[doc = r"Writes raw bits to the register"]
967 #[inline(always)]
968 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
969 self.bits = bits;
970 self
971 }
972 #[doc = "Bits 0:1 - Host Bus Sub-Mode"]
973 #[inline(always)]
974 pub fn epi_hb8cfg_mode(&mut self) -> _EPI_HB8CFG_MODEW {
975 _EPI_HB8CFG_MODEW { w: self }
976 }
977 #[doc = "Bits 4:5 - Read Wait States"]
978 #[inline(always)]
979 pub fn epi_hb8cfg_rdws(&mut self) -> _EPI_HB8CFG_RDWSW {
980 _EPI_HB8CFG_RDWSW { w: self }
981 }
982 #[doc = "Bits 6:7 - Write Wait States"]
983 #[inline(always)]
984 pub fn epi_hb8cfg_wrws(&mut self) -> _EPI_HB8CFG_WRWSW {
985 _EPI_HB8CFG_WRWSW { w: self }
986 }
987 #[doc = "Bits 8:15 - Maximum Wait"]
988 #[inline(always)]
989 pub fn epi_hb8cfg_maxwait(&mut self) -> _EPI_HB8CFG_MAXWAITW {
990 _EPI_HB8CFG_MAXWAITW { w: self }
991 }
992 #[doc = "Bit 19 - ALE Strobe Polarity"]
993 #[inline(always)]
994 pub fn epi_hb8cfg_alehigh(&mut self) -> _EPI_HB8CFG_ALEHIGHW {
995 _EPI_HB8CFG_ALEHIGHW { w: self }
996 }
997 #[doc = "Bit 20 - READ Strobe Polarity"]
998 #[inline(always)]
999 pub fn epi_hb8cfg_rdhigh(&mut self) -> _EPI_HB8CFG_RDHIGHW {
1000 _EPI_HB8CFG_RDHIGHW { w: self }
1001 }
1002 #[doc = "Bit 21 - WRITE Strobe Polarity"]
1003 #[inline(always)]
1004 pub fn epi_hb8cfg_wrhigh(&mut self) -> _EPI_HB8CFG_WRHIGHW {
1005 _EPI_HB8CFG_WRHIGHW { w: self }
1006 }
1007 #[doc = "Bit 22 - External FIFO EMPTY Enable"]
1008 #[inline(always)]
1009 pub fn epi_hb8cfg_xfeen(&mut self) -> _EPI_HB8CFG_XFEENW {
1010 _EPI_HB8CFG_XFEENW { w: self }
1011 }
1012 #[doc = "Bit 23 - External FIFO FULL Enable"]
1013 #[inline(always)]
1014 pub fn epi_hb8cfg_xffen(&mut self) -> _EPI_HB8CFG_XFFENW {
1015 _EPI_HB8CFG_XFFENW { w: self }
1016 }
1017 #[doc = "Bit 27 - Input Ready Invert"]
1018 #[inline(always)]
1019 pub fn epi_hb8cfg_irdyinv(&mut self) -> _EPI_HB8CFG_IRDYINVW {
1020 _EPI_HB8CFG_IRDYINVW { w: self }
1021 }
1022 #[doc = "Bit 28 - Input Ready Enable"]
1023 #[inline(always)]
1024 pub fn epi_hb8cfg_rdyen(&mut self) -> _EPI_HB8CFG_RDYENW {
1025 _EPI_HB8CFG_RDYENW { w: self }
1026 }
1027 #[doc = "Bit 29 - Invert Output Clock Enable"]
1028 #[inline(always)]
1029 pub fn epi_hb8cfg_clkinv(&mut self) -> _EPI_HB8CFG_CLKINVW {
1030 _EPI_HB8CFG_CLKINVW { w: self }
1031 }
1032 #[doc = "Bit 30 - Clock Gated when Idle"]
1033 #[inline(always)]
1034 pub fn epi_hb8cfg_clkgatei(&mut self) -> _EPI_HB8CFG_CLKGATEIW {
1035 _EPI_HB8CFG_CLKGATEIW { w: self }
1036 }
1037 #[doc = "Bit 31 - Clock Gated"]
1038 #[inline(always)]
1039 pub fn epi_hb8cfg_clkgate(&mut self) -> _EPI_HB8CFG_CLKGATEW {
1040 _EPI_HB8CFG_CLKGATEW { w: self }
1041 }
1042}