1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"UART2 registers"]
28unsafe impl ::core::marker::Send for super::Uart2 {}
29unsafe impl ::core::marker::Sync for super::Uart2 {}
30impl super::Uart2 {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Component Type Register"]
38 #[inline(always)]
39 pub const fn uart2_ctr_high_reg(
40 &self,
41 ) -> &'static crate::common::Reg<self::Uart2CtrHighReg_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Uart2CtrHighReg_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(254usize),
45 )
46 }
47 }
48
49 #[doc = "Component Type Register"]
50 #[inline(always)]
51 pub const fn uart2_ctr_reg(
52 &self,
53 ) -> &'static crate::common::Reg<self::Uart2CtrReg_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::Uart2CtrReg_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(252usize),
57 )
58 }
59 }
60
61 #[doc = "Divisor Latch Fraction Register"]
62 #[inline(always)]
63 pub const fn uart2_dlf_reg(
64 &self,
65 ) -> &'static crate::common::Reg<self::Uart2DlfReg_SPEC, crate::common::RW> {
66 unsafe {
67 crate::common::Reg::<self::Uart2DlfReg_SPEC, crate::common::RW>::from_ptr(
68 self._svd2pac_as_ptr().add(192usize),
69 )
70 }
71 }
72
73 #[doc = "DMA Software Acknowledge"]
74 #[inline(always)]
75 pub const fn uart2_dmasa_reg(
76 &self,
77 ) -> &'static crate::common::Reg<self::Uart2DmasaReg_SPEC, crate::common::RW> {
78 unsafe {
79 crate::common::Reg::<self::Uart2DmasaReg_SPEC, crate::common::RW>::from_ptr(
80 self._svd2pac_as_ptr().add(168usize),
81 )
82 }
83 }
84
85 #[doc = "FIFO Access Register"]
86 #[inline(always)]
87 pub const fn uart2_far_reg(
88 &self,
89 ) -> &'static crate::common::Reg<self::Uart2FarReg_SPEC, crate::common::RW> {
90 unsafe {
91 crate::common::Reg::<self::Uart2FarReg_SPEC, crate::common::RW>::from_ptr(
92 self._svd2pac_as_ptr().add(112usize),
93 )
94 }
95 }
96
97 #[doc = "Halt TX"]
98 #[inline(always)]
99 pub const fn uart2_htx_reg(
100 &self,
101 ) -> &'static crate::common::Reg<self::Uart2HtxReg_SPEC, crate::common::RW> {
102 unsafe {
103 crate::common::Reg::<self::Uart2HtxReg_SPEC, crate::common::RW>::from_ptr(
104 self._svd2pac_as_ptr().add(164usize),
105 )
106 }
107 }
108
109 #[doc = "Interrupt Enable Register/Divisor Latch High"]
110 #[inline(always)]
111 pub const fn uart2_ier_dlh_reg(
112 &self,
113 ) -> &'static crate::common::Reg<self::Uart2IerDlhReg_SPEC, crate::common::RW> {
114 unsafe {
115 crate::common::Reg::<self::Uart2IerDlhReg_SPEC, crate::common::RW>::from_ptr(
116 self._svd2pac_as_ptr().add(4usize),
117 )
118 }
119 }
120
121 #[doc = "Interrupt Identification Register/FIFO Control Register"]
122 #[inline(always)]
123 pub const fn uart2_iir_fcr_reg(
124 &self,
125 ) -> &'static crate::common::Reg<self::Uart2IirFcrReg_SPEC, crate::common::RW> {
126 unsafe {
127 crate::common::Reg::<self::Uart2IirFcrReg_SPEC, crate::common::RW>::from_ptr(
128 self._svd2pac_as_ptr().add(8usize),
129 )
130 }
131 }
132
133 #[doc = "Line Control Register"]
134 #[inline(always)]
135 pub const fn uart2_lcr_reg(
136 &self,
137 ) -> &'static crate::common::Reg<self::Uart2LcrReg_SPEC, crate::common::RW> {
138 unsafe {
139 crate::common::Reg::<self::Uart2LcrReg_SPEC, crate::common::RW>::from_ptr(
140 self._svd2pac_as_ptr().add(12usize),
141 )
142 }
143 }
144
145 #[doc = "Line Status Register"]
146 #[inline(always)]
147 pub const fn uart2_lsr_reg(
148 &self,
149 ) -> &'static crate::common::Reg<self::Uart2LsrReg_SPEC, crate::common::RW> {
150 unsafe {
151 crate::common::Reg::<self::Uart2LsrReg_SPEC, crate::common::RW>::from_ptr(
152 self._svd2pac_as_ptr().add(20usize),
153 )
154 }
155 }
156
157 #[doc = "Modem Control Register"]
158 #[inline(always)]
159 pub const fn uart2_mcr_reg(
160 &self,
161 ) -> &'static crate::common::Reg<self::Uart2McrReg_SPEC, crate::common::RW> {
162 unsafe {
163 crate::common::Reg::<self::Uart2McrReg_SPEC, crate::common::RW>::from_ptr(
164 self._svd2pac_as_ptr().add(16usize),
165 )
166 }
167 }
168
169 #[doc = "Receive Buffer Register/Transmit Holding Register/Divisor Latch Low"]
170 #[inline(always)]
171 pub const fn uart2_rbr_thr_dll_reg(
172 &self,
173 ) -> &'static crate::common::Reg<self::Uart2RbrThrDllReg_SPEC, crate::common::RW> {
174 unsafe {
175 crate::common::Reg::<self::Uart2RbrThrDllReg_SPEC, crate::common::RW>::from_ptr(
176 self._svd2pac_as_ptr().add(0usize),
177 )
178 }
179 }
180
181 #[doc = "Receive FIFO Level"]
182 #[inline(always)]
183 pub const fn uart2_rfl_reg(
184 &self,
185 ) -> &'static crate::common::Reg<self::Uart2RflReg_SPEC, crate::common::RW> {
186 unsafe {
187 crate::common::Reg::<self::Uart2RflReg_SPEC, crate::common::RW>::from_ptr(
188 self._svd2pac_as_ptr().add(132usize),
189 )
190 }
191 }
192
193 #[doc = "Shadow Break Control Register"]
194 #[inline(always)]
195 pub const fn uart2_sbcr_reg(
196 &self,
197 ) -> &'static crate::common::Reg<self::Uart2SbcrReg_SPEC, crate::common::RW> {
198 unsafe {
199 crate::common::Reg::<self::Uart2SbcrReg_SPEC, crate::common::RW>::from_ptr(
200 self._svd2pac_as_ptr().add(144usize),
201 )
202 }
203 }
204
205 #[doc = "Scratchpad Register"]
206 #[inline(always)]
207 pub const fn uart2_scr_reg(
208 &self,
209 ) -> &'static crate::common::Reg<self::Uart2ScrReg_SPEC, crate::common::RW> {
210 unsafe {
211 crate::common::Reg::<self::Uart2ScrReg_SPEC, crate::common::RW>::from_ptr(
212 self._svd2pac_as_ptr().add(28usize),
213 )
214 }
215 }
216
217 #[doc = "Shadow DMA Mode"]
218 #[inline(always)]
219 pub const fn uart2_sdmam_reg(
220 &self,
221 ) -> &'static crate::common::Reg<self::Uart2SdmamReg_SPEC, crate::common::RW> {
222 unsafe {
223 crate::common::Reg::<self::Uart2SdmamReg_SPEC, crate::common::RW>::from_ptr(
224 self._svd2pac_as_ptr().add(148usize),
225 )
226 }
227 }
228
229 #[doc = "Shadow FIFO Enable"]
230 #[inline(always)]
231 pub const fn uart2_sfe_reg(
232 &self,
233 ) -> &'static crate::common::Reg<self::Uart2SfeReg_SPEC, crate::common::RW> {
234 unsafe {
235 crate::common::Reg::<self::Uart2SfeReg_SPEC, crate::common::RW>::from_ptr(
236 self._svd2pac_as_ptr().add(152usize),
237 )
238 }
239 }
240
241 #[doc = "Shadow Receive/Transmit Buffer Register"]
242 #[inline(always)]
243 pub const fn uart2_srbr_sthr0_reg(
244 &self,
245 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr0Reg_SPEC, crate::common::RW> {
246 unsafe {
247 crate::common::Reg::<self::Uart2SrbrSthr0Reg_SPEC, crate::common::RW>::from_ptr(
248 self._svd2pac_as_ptr().add(48usize),
249 )
250 }
251 }
252
253 #[doc = "Shadow Receive/Transmit Buffer Register"]
254 #[inline(always)]
255 pub const fn uart2_srbr_sthr10_reg(
256 &self,
257 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr10Reg_SPEC, crate::common::RW> {
258 unsafe {
259 crate::common::Reg::<self::Uart2SrbrSthr10Reg_SPEC, crate::common::RW>::from_ptr(
260 self._svd2pac_as_ptr().add(88usize),
261 )
262 }
263 }
264
265 #[doc = "Shadow Receive/Transmit Buffer Register"]
266 #[inline(always)]
267 pub const fn uart2_srbr_sthr11_reg(
268 &self,
269 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr11Reg_SPEC, crate::common::RW> {
270 unsafe {
271 crate::common::Reg::<self::Uart2SrbrSthr11Reg_SPEC, crate::common::RW>::from_ptr(
272 self._svd2pac_as_ptr().add(92usize),
273 )
274 }
275 }
276
277 #[doc = "Shadow Receive/Transmit Buffer Register"]
278 #[inline(always)]
279 pub const fn uart2_srbr_sthr12_reg(
280 &self,
281 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr12Reg_SPEC, crate::common::RW> {
282 unsafe {
283 crate::common::Reg::<self::Uart2SrbrSthr12Reg_SPEC, crate::common::RW>::from_ptr(
284 self._svd2pac_as_ptr().add(96usize),
285 )
286 }
287 }
288
289 #[doc = "Shadow Receive/Transmit Buffer Register"]
290 #[inline(always)]
291 pub const fn uart2_srbr_sthr13_reg(
292 &self,
293 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr13Reg_SPEC, crate::common::RW> {
294 unsafe {
295 crate::common::Reg::<self::Uart2SrbrSthr13Reg_SPEC, crate::common::RW>::from_ptr(
296 self._svd2pac_as_ptr().add(100usize),
297 )
298 }
299 }
300
301 #[doc = "Shadow Receive/Transmit Buffer Register"]
302 #[inline(always)]
303 pub const fn uart2_srbr_sthr14_reg(
304 &self,
305 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr14Reg_SPEC, crate::common::RW> {
306 unsafe {
307 crate::common::Reg::<self::Uart2SrbrSthr14Reg_SPEC, crate::common::RW>::from_ptr(
308 self._svd2pac_as_ptr().add(104usize),
309 )
310 }
311 }
312
313 #[doc = "Shadow Receive/Transmit Buffer Register"]
314 #[inline(always)]
315 pub const fn uart2_srbr_sthr15_reg(
316 &self,
317 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr15Reg_SPEC, crate::common::RW> {
318 unsafe {
319 crate::common::Reg::<self::Uart2SrbrSthr15Reg_SPEC, crate::common::RW>::from_ptr(
320 self._svd2pac_as_ptr().add(108usize),
321 )
322 }
323 }
324
325 #[doc = "Shadow Receive/Transmit Buffer Register"]
326 #[inline(always)]
327 pub const fn uart2_srbr_sthr1_reg(
328 &self,
329 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr1Reg_SPEC, crate::common::RW> {
330 unsafe {
331 crate::common::Reg::<self::Uart2SrbrSthr1Reg_SPEC, crate::common::RW>::from_ptr(
332 self._svd2pac_as_ptr().add(52usize),
333 )
334 }
335 }
336
337 #[doc = "Shadow Receive/Transmit Buffer Register"]
338 #[inline(always)]
339 pub const fn uart2_srbr_sthr2_reg(
340 &self,
341 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr2Reg_SPEC, crate::common::RW> {
342 unsafe {
343 crate::common::Reg::<self::Uart2SrbrSthr2Reg_SPEC, crate::common::RW>::from_ptr(
344 self._svd2pac_as_ptr().add(56usize),
345 )
346 }
347 }
348
349 #[doc = "Shadow Receive/Transmit Buffer Register"]
350 #[inline(always)]
351 pub const fn uart2_srbr_sthr3_reg(
352 &self,
353 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr3Reg_SPEC, crate::common::RW> {
354 unsafe {
355 crate::common::Reg::<self::Uart2SrbrSthr3Reg_SPEC, crate::common::RW>::from_ptr(
356 self._svd2pac_as_ptr().add(60usize),
357 )
358 }
359 }
360
361 #[doc = "Shadow Receive/Transmit Buffer Register"]
362 #[inline(always)]
363 pub const fn uart2_srbr_sthr4_reg(
364 &self,
365 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr4Reg_SPEC, crate::common::RW> {
366 unsafe {
367 crate::common::Reg::<self::Uart2SrbrSthr4Reg_SPEC, crate::common::RW>::from_ptr(
368 self._svd2pac_as_ptr().add(64usize),
369 )
370 }
371 }
372
373 #[doc = "Shadow Receive/Transmit Buffer Register"]
374 #[inline(always)]
375 pub const fn uart2_srbr_sthr5_reg(
376 &self,
377 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr5Reg_SPEC, crate::common::RW> {
378 unsafe {
379 crate::common::Reg::<self::Uart2SrbrSthr5Reg_SPEC, crate::common::RW>::from_ptr(
380 self._svd2pac_as_ptr().add(68usize),
381 )
382 }
383 }
384
385 #[doc = "Shadow Receive/Transmit Buffer Register"]
386 #[inline(always)]
387 pub const fn uart2_srbr_sthr6_reg(
388 &self,
389 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr6Reg_SPEC, crate::common::RW> {
390 unsafe {
391 crate::common::Reg::<self::Uart2SrbrSthr6Reg_SPEC, crate::common::RW>::from_ptr(
392 self._svd2pac_as_ptr().add(72usize),
393 )
394 }
395 }
396
397 #[doc = "Shadow Receive/Transmit Buffer Register"]
398 #[inline(always)]
399 pub const fn uart2_srbr_sthr7_reg(
400 &self,
401 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr7Reg_SPEC, crate::common::RW> {
402 unsafe {
403 crate::common::Reg::<self::Uart2SrbrSthr7Reg_SPEC, crate::common::RW>::from_ptr(
404 self._svd2pac_as_ptr().add(76usize),
405 )
406 }
407 }
408
409 #[doc = "Shadow Receive/Transmit Buffer Register"]
410 #[inline(always)]
411 pub const fn uart2_srbr_sthr8_reg(
412 &self,
413 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr8Reg_SPEC, crate::common::RW> {
414 unsafe {
415 crate::common::Reg::<self::Uart2SrbrSthr8Reg_SPEC, crate::common::RW>::from_ptr(
416 self._svd2pac_as_ptr().add(80usize),
417 )
418 }
419 }
420
421 #[doc = "Shadow Receive/Transmit Buffer Register"]
422 #[inline(always)]
423 pub const fn uart2_srbr_sthr9_reg(
424 &self,
425 ) -> &'static crate::common::Reg<self::Uart2SrbrSthr9Reg_SPEC, crate::common::RW> {
426 unsafe {
427 crate::common::Reg::<self::Uart2SrbrSthr9Reg_SPEC, crate::common::RW>::from_ptr(
428 self._svd2pac_as_ptr().add(84usize),
429 )
430 }
431 }
432
433 #[doc = "Software Reset Register."]
434 #[inline(always)]
435 pub const fn uart2_srr_reg(
436 &self,
437 ) -> &'static crate::common::Reg<self::Uart2SrrReg_SPEC, crate::common::RW> {
438 unsafe {
439 crate::common::Reg::<self::Uart2SrrReg_SPEC, crate::common::RW>::from_ptr(
440 self._svd2pac_as_ptr().add(136usize),
441 )
442 }
443 }
444
445 #[doc = "Shadow RCVR Trigger"]
446 #[inline(always)]
447 pub const fn uart2_srt_reg(
448 &self,
449 ) -> &'static crate::common::Reg<self::Uart2SrtReg_SPEC, crate::common::RW> {
450 unsafe {
451 crate::common::Reg::<self::Uart2SrtReg_SPEC, crate::common::RW>::from_ptr(
452 self._svd2pac_as_ptr().add(156usize),
453 )
454 }
455 }
456
457 #[doc = "Shadow TX Empty Trigger"]
458 #[inline(always)]
459 pub const fn uart2_stet_reg(
460 &self,
461 ) -> &'static crate::common::Reg<self::Uart2StetReg_SPEC, crate::common::RW> {
462 unsafe {
463 crate::common::Reg::<self::Uart2StetReg_SPEC, crate::common::RW>::from_ptr(
464 self._svd2pac_as_ptr().add(160usize),
465 )
466 }
467 }
468
469 #[doc = "Transmit FIFO Level"]
470 #[inline(always)]
471 pub const fn uart2_tfl_reg(
472 &self,
473 ) -> &'static crate::common::Reg<self::Uart2TflReg_SPEC, crate::common::RW> {
474 unsafe {
475 crate::common::Reg::<self::Uart2TflReg_SPEC, crate::common::RW>::from_ptr(
476 self._svd2pac_as_ptr().add(128usize),
477 )
478 }
479 }
480
481 #[doc = "Component Version"]
482 #[inline(always)]
483 pub const fn uart2_ucv_high_reg(
484 &self,
485 ) -> &'static crate::common::Reg<self::Uart2UcvHighReg_SPEC, crate::common::RW> {
486 unsafe {
487 crate::common::Reg::<self::Uart2UcvHighReg_SPEC, crate::common::RW>::from_ptr(
488 self._svd2pac_as_ptr().add(250usize),
489 )
490 }
491 }
492
493 #[doc = "Component Version"]
494 #[inline(always)]
495 pub const fn uart2_ucv_reg(
496 &self,
497 ) -> &'static crate::common::Reg<self::Uart2UcvReg_SPEC, crate::common::RW> {
498 unsafe {
499 crate::common::Reg::<self::Uart2UcvReg_SPEC, crate::common::RW>::from_ptr(
500 self._svd2pac_as_ptr().add(248usize),
501 )
502 }
503 }
504
505 #[doc = "UART Status Register"]
506 #[inline(always)]
507 pub const fn uart2_usr_reg(
508 &self,
509 ) -> &'static crate::common::Reg<self::Uart2UsrReg_SPEC, crate::common::RW> {
510 unsafe {
511 crate::common::Reg::<self::Uart2UsrReg_SPEC, crate::common::RW>::from_ptr(
512 self._svd2pac_as_ptr().add(124usize),
513 )
514 }
515 }
516}
517#[doc(hidden)]
518#[derive(Copy, Clone, Eq, PartialEq)]
519pub struct Uart2CtrHighReg_SPEC;
520impl crate::sealed::RegSpec for Uart2CtrHighReg_SPEC {
521 type DataType = u16;
522}
523
524#[doc = "Component Type Register"]
525pub type Uart2CtrHighReg = crate::RegValueT<Uart2CtrHighReg_SPEC>;
526
527impl Uart2CtrHighReg {
528 #[doc = "Component Type Register"]
529 #[inline(always)]
530 pub fn ctr(
531 self,
532 ) -> crate::common::RegisterField<
533 0,
534 0xffff,
535 1,
536 0,
537 u16,
538 u16,
539 Uart2CtrHighReg_SPEC,
540 crate::common::R,
541 > {
542 crate::common::RegisterField::<
543 0,
544 0xffff,
545 1,
546 0,
547 u16,
548 u16,
549 Uart2CtrHighReg_SPEC,
550 crate::common::R,
551 >::from_register(self, 0)
552 }
553}
554impl ::core::default::Default for Uart2CtrHighReg {
555 #[inline(always)]
556 fn default() -> Uart2CtrHighReg {
557 <crate::RegValueT<Uart2CtrHighReg_SPEC> as RegisterValue<_>>::new(17495)
558 }
559}
560
561#[doc(hidden)]
562#[derive(Copy, Clone, Eq, PartialEq)]
563pub struct Uart2CtrReg_SPEC;
564impl crate::sealed::RegSpec for Uart2CtrReg_SPEC {
565 type DataType = u16;
566}
567
568#[doc = "Component Type Register"]
569pub type Uart2CtrReg = crate::RegValueT<Uart2CtrReg_SPEC>;
570
571impl Uart2CtrReg {
572 #[doc = "Component Type Register"]
573 #[inline(always)]
574 pub fn ctr(
575 self,
576 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Uart2CtrReg_SPEC, crate::common::R>
577 {
578 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Uart2CtrReg_SPEC,crate::common::R>::from_register(self,0)
579 }
580}
581impl ::core::default::Default for Uart2CtrReg {
582 #[inline(always)]
583 fn default() -> Uart2CtrReg {
584 <crate::RegValueT<Uart2CtrReg_SPEC> as RegisterValue<_>>::new(272)
585 }
586}
587
588#[doc(hidden)]
589#[derive(Copy, Clone, Eq, PartialEq)]
590pub struct Uart2DlfReg_SPEC;
591impl crate::sealed::RegSpec for Uart2DlfReg_SPEC {
592 type DataType = u16;
593}
594
595#[doc = "Divisor Latch Fraction Register"]
596pub type Uart2DlfReg = crate::RegValueT<Uart2DlfReg_SPEC>;
597
598impl Uart2DlfReg {
599 #[doc = "The fractional value is added to integer value set by DLH, DLL. Fractional value is equal UART_DLF/16"]
600 #[inline(always)]
601 pub fn uart_dlf(
602 self,
603 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Uart2DlfReg_SPEC, crate::common::RW>
604 {
605 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Uart2DlfReg_SPEC,crate::common::RW>::from_register(self,0)
606 }
607}
608impl ::core::default::Default for Uart2DlfReg {
609 #[inline(always)]
610 fn default() -> Uart2DlfReg {
611 <crate::RegValueT<Uart2DlfReg_SPEC> as RegisterValue<_>>::new(0)
612 }
613}
614
615#[doc(hidden)]
616#[derive(Copy, Clone, Eq, PartialEq)]
617pub struct Uart2DmasaReg_SPEC;
618impl crate::sealed::RegSpec for Uart2DmasaReg_SPEC {
619 type DataType = u16;
620}
621
622#[doc = "DMA Software Acknowledge"]
623pub type Uart2DmasaReg = crate::RegValueT<Uart2DmasaReg_SPEC>;
624
625impl Uart2DmasaReg {
626 #[doc = "This register is use to perform DMA software acknowledge if a transfer needs to be terminated due to an error condition. For example, if the DMA disables the channel, then the DW_apb_uart should clear its request. This will cause the TX request, TX single, RX request and RX single signals to de-assert. Note that this bit is \'self-clearing\' and it is not necessary to clear this bit."]
627 #[inline(always)]
628 pub fn dmasa(
629 self,
630 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2DmasaReg_SPEC, crate::common::W> {
631 crate::common::RegisterFieldBool::<0,1,0,Uart2DmasaReg_SPEC,crate::common::W>::from_register(self,0)
632 }
633}
634impl ::core::default::Default for Uart2DmasaReg {
635 #[inline(always)]
636 fn default() -> Uart2DmasaReg {
637 <crate::RegValueT<Uart2DmasaReg_SPEC> as RegisterValue<_>>::new(0)
638 }
639}
640
641#[doc(hidden)]
642#[derive(Copy, Clone, Eq, PartialEq)]
643pub struct Uart2FarReg_SPEC;
644impl crate::sealed::RegSpec for Uart2FarReg_SPEC {
645 type DataType = u16;
646}
647
648#[doc = "FIFO Access Register"]
649pub type Uart2FarReg = crate::RegValueT<Uart2FarReg_SPEC>;
650
651impl Uart2FarReg {
652 #[doc = "Description: Writes will have no effect when FIFO_ACCESS == No, always readable. This register is use to enable a FIFO access mode for testing, so that the receive FIFO can be written by the master and the transmit FIFO can be read by the master when FIFO\'s are implemented and enabled. When FIFO\'s are not implemented or not enabled it allows the RBR to be written by the master and the THR to be read by the master. 0 = FIFO access mode disabled 1 = FIFO access mode enabled Note, that when the FIFO access mode is enabled/disabled, the control portion of the receive FIFO and transmit FIFO is reset and the FIFO\'s are treated as empty."]
653 #[inline(always)]
654 pub fn uart_far(
655 self,
656 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2FarReg_SPEC, crate::common::R> {
657 crate::common::RegisterFieldBool::<0,1,0,Uart2FarReg_SPEC,crate::common::R>::from_register(self,0)
658 }
659}
660impl ::core::default::Default for Uart2FarReg {
661 #[inline(always)]
662 fn default() -> Uart2FarReg {
663 <crate::RegValueT<Uart2FarReg_SPEC> as RegisterValue<_>>::new(0)
664 }
665}
666
667#[doc(hidden)]
668#[derive(Copy, Clone, Eq, PartialEq)]
669pub struct Uart2HtxReg_SPEC;
670impl crate::sealed::RegSpec for Uart2HtxReg_SPEC {
671 type DataType = u16;
672}
673
674#[doc = "Halt TX"]
675pub type Uart2HtxReg = crate::RegValueT<Uart2HtxReg_SPEC>;
676
677impl Uart2HtxReg {
678 #[doc = "This register is use to halt transmissions for testing, so that the transmit FIFO can be filled by the master when FIFOs are implemented and enabled.\n0 = Halt TX disabled\n1 = Halt TX enabled\nNote, if FIFOs are implemented and not enabled, the setting of the halt TX register has no effect on operation."]
679 #[inline(always)]
680 pub fn uart_halt_tx(
681 self,
682 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2HtxReg_SPEC, crate::common::RW> {
683 crate::common::RegisterFieldBool::<0,1,0,Uart2HtxReg_SPEC,crate::common::RW>::from_register(self,0)
684 }
685}
686impl ::core::default::Default for Uart2HtxReg {
687 #[inline(always)]
688 fn default() -> Uart2HtxReg {
689 <crate::RegValueT<Uart2HtxReg_SPEC> as RegisterValue<_>>::new(0)
690 }
691}
692
693#[doc(hidden)]
694#[derive(Copy, Clone, Eq, PartialEq)]
695pub struct Uart2IerDlhReg_SPEC;
696impl crate::sealed::RegSpec for Uart2IerDlhReg_SPEC {
697 type DataType = u16;
698}
699
700#[doc = "Interrupt Enable Register/Divisor Latch High"]
701pub type Uart2IerDlhReg = crate::RegValueT<Uart2IerDlhReg_SPEC>;
702
703impl Uart2IerDlhReg {
704 #[doc = "Interrupt Enable Register: PTIME, Programmable THRE Interrupt Mode Enable. This is used to enable/disable the generation of THRE Interrupt. 0 = disabled 1 = enabled. \nDivisor Latch (High): DLH7, Bit 7 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set. See register UART_RBR_THR_DLL_REG."]
705 #[inline(always)]
706 pub fn ptime_dlh7(
707 self,
708 ) -> crate::common::RegisterFieldBool<7, 1, 0, Uart2IerDlhReg_SPEC, crate::common::RW> {
709 crate::common::RegisterFieldBool::<7,1,0,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
710 }
711
712 #[doc = "Divisor Latch (High): DLH6 to DLH4, Bits 6 to 4 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set, otherwise, this field is reserved. See register UART_RBR_THR_DLL_REG."]
713 #[inline(always)]
714 pub fn dlh6_4(
715 self,
716 ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Uart2IerDlhReg_SPEC, crate::common::RW>
717 {
718 crate::common::RegisterField::<4,0x7,1,0,u8,u8,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
719 }
720
721 #[doc = "Interrupt Enable Register: EDSSI, Enable Modem Status Interrupt. This is used to enable/disable the generation of Modem Status Interrupt. This is the fourth highest priority interrupt. 0 = disabled 1 = enabled\nDivisor Latch (High): DLH3, Bit 3 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set. See register UART_RBR_THR_DLL_REG."]
722 #[inline(always)]
723 pub fn edssi_dlh3(
724 self,
725 ) -> crate::common::RegisterFieldBool<3, 1, 0, Uart2IerDlhReg_SPEC, crate::common::RW> {
726 crate::common::RegisterFieldBool::<3,1,0,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
727 }
728
729 #[doc = "Interrupt Enable Register: ELSI, Enable Receiver Line Status Interrupt. This is used to enable/disable the generation of Receiver Line Status Interrupt. This is the highest priority interrupt. 0 = disabled 1 = enabled\nDivisor Latch (High): DLH2, Bit 2 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set. See register UART_RBR_THR_DLL_REG."]
730 #[inline(always)]
731 pub fn elsi_dhl2(
732 self,
733 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2IerDlhReg_SPEC, crate::common::RW> {
734 crate::common::RegisterFieldBool::<2,1,0,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
735 }
736
737 #[doc = "Interrupt Enable Register: ETBEI, Enable Transmit Holding Register Empty Interrupt. This is used to enable/disable the generation of Transmitter Holding Register Empty Interrupt. This is the third highest priority interrupt. 0 = disabled 1 = enabled \nDivisor Latch (High): DLH1, Bit 1 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set. See register UART_RBR_THR_DLL_REG."]
738 #[inline(always)]
739 pub fn etbei_dlh1(
740 self,
741 ) -> crate::common::RegisterFieldBool<1, 1, 0, Uart2IerDlhReg_SPEC, crate::common::RW> {
742 crate::common::RegisterFieldBool::<1,1,0,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
743 }
744
745 #[doc = "Interrupt Enable Register: ERBFI, Enable Received Data Available Interrupt. This is used to enable/disable the generation of Received Data Available Interrupt and the Character Timeout Interrupt (if in FIFO mode and FIFO\'s enabled). These are the second highest priority interrupts. 0 = disabled 1 = enabled\nDivisor Latch (High): DLH0, Bit 0 of the upper part of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may be accessed only when the DLAB bit (LCR\\[7\\]) is set. See register UART_RBR_THR_DLL_REG."]
746 #[inline(always)]
747 pub fn erbfi_dlh0(
748 self,
749 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2IerDlhReg_SPEC, crate::common::RW> {
750 crate::common::RegisterFieldBool::<0,1,0,Uart2IerDlhReg_SPEC,crate::common::RW>::from_register(self,0)
751 }
752}
753impl ::core::default::Default for Uart2IerDlhReg {
754 #[inline(always)]
755 fn default() -> Uart2IerDlhReg {
756 <crate::RegValueT<Uart2IerDlhReg_SPEC> as RegisterValue<_>>::new(0)
757 }
758}
759
760#[doc(hidden)]
761#[derive(Copy, Clone, Eq, PartialEq)]
762pub struct Uart2IirFcrReg_SPEC;
763impl crate::sealed::RegSpec for Uart2IirFcrReg_SPEC {
764 type DataType = u16;
765}
766
767#[doc = "Interrupt Identification Register/FIFO Control Register"]
768pub type Uart2IirFcrReg = crate::RegValueT<Uart2IirFcrReg_SPEC>;
769
770impl Uart2IirFcrReg {
771 #[doc = "On read\nFIFO\'s Enabled (or FIFOSE): This is used to indicate whether the FIFO\'s are enabled or disabled. 00 = disabled. 11 = enabled.\nOn write\nRCVR Trigger (or RT):. This is used to select the trigger level in the receiver FIFO at which the Received Data Available Interrupt will be generated. In auto flow control mode it is used to determine when the rts_n signal will be de-asserted. It also determines when the dma_rx_req_n signal will be asserted when in certain modes of operation. The following trigger levels are supported: 00 = 1 character in the FIFO 01 = FIFO 1/4 full 10 = FIFO 1/2 full 11 = FIFO 2 less than full"]
772 #[inline(always)]
773 pub fn uart_fifose_rt(
774 self,
775 ) -> crate::common::RegisterField<6, 0x3, 1, 0, u8, u8, Uart2IirFcrReg_SPEC, crate::common::RW>
776 {
777 crate::common::RegisterField::<6,0x3,1,0,u8,u8,Uart2IirFcrReg_SPEC,crate::common::RW>::from_register(self,0)
778 }
779
780 #[doc = "On read\nreserved\nOn Write\nTX Empty Trigger (or TET): This is used to select the empty threshold level at which the THRE Interrupts will be generated when the mode is active. It also determines when the dma_tx_req_n signal will be asserted when in certain modes of operation. The following trigger levels are supported: 00 = FIFO empty 01 = 2 characters in the FIFO 10 = FIFO 1/4 full 11 = FIFO 1/2 full"]
781 #[inline(always)]
782 pub fn uart_tet(
783 self,
784 ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Uart2IirFcrReg_SPEC, crate::common::W>
785 {
786 crate::common::RegisterField::<4,0x3,1,0,u8,u8,Uart2IirFcrReg_SPEC,crate::common::W>::from_register(self,0)
787 }
788
789 #[doc = "On Read (Bit3)\nInterrupt ID (or IID): This indicates the highest priority pending interrupt which can be one of the following types:\n0001 = no interrupt pending.\n0010 = THR empty.\n0100 = received data available.\n0110 = receiver line status.\n0111 = busy detect.\n1100 = character timeout.\nOn Write\nDMA Mode (or DMAM): This determines the DMA signalling mode used for the dma_tx_req_n and dma_rx_req_n output signals. 0 = mode 0 1 = mode 1"]
790 #[inline(always)]
791 pub fn uart_iid3_dmam(
792 self,
793 ) -> crate::common::RegisterFieldBool<3, 1, 0, Uart2IirFcrReg_SPEC, crate::common::RW> {
794 crate::common::RegisterFieldBool::<3,1,0,Uart2IirFcrReg_SPEC,crate::common::RW>::from_register(self,0)
795 }
796
797 #[doc = "On Read (Bit2)\nInterrupt ID (or IID): This indicates the highest priority pending interrupt which can be one of the following types:\n0001 = no interrupt pending.\n0010 = THR empty.\n0100 = received data available.\n0110 = receiver line status.\n0111 = busy detect.\n1100 = character timeout.\nOn Write\nXMIT FIFO Reset (or XFIFOR): This resets the control portion of the transmit FIFO and treats the FIFO as empty. Note that this bit is \'self-clearing\' and it is not necessary to clear this bit."]
798 #[inline(always)]
799 pub fn uart_iid2_xfifor(
800 self,
801 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2IirFcrReg_SPEC, crate::common::RW> {
802 crate::common::RegisterFieldBool::<2,1,0,Uart2IirFcrReg_SPEC,crate::common::RW>::from_register(self,0)
803 }
804
805 #[doc = "On Read (Bit1)\nInterrupt ID (or IID): This indicates the highest priority pending interrupt which can be one of the following types:\n0001 = no interrupt pending.\n0010 = THR empty.\n0100 = received data available.\n0110 = receiver line status.\n0111 = busy detect.\n1100 = character timeout.\nOn Write\nRCVR FIFO Reset (or RFIFOR): This resets the control portion of the receive FIFO and treats the FIFO as empty. Note that this bit is \'self-clearing\' and it is not necessary to clear this bit."]
806 #[inline(always)]
807 pub fn uart_iid1_rfifoe(
808 self,
809 ) -> crate::common::RegisterFieldBool<1, 1, 0, Uart2IirFcrReg_SPEC, crate::common::RW> {
810 crate::common::RegisterFieldBool::<1,1,0,Uart2IirFcrReg_SPEC,crate::common::RW>::from_register(self,0)
811 }
812
813 #[doc = "On Read (Bit0)\nInterrupt ID (or IID): This indicates the highest priority pending interrupt which can be one of the following types:\n0001 = no interrupt pending.\n0010 = THR empty.\n0100 = received data available.\n0110 = receiver line status.\n0111 = busy detect.\n1100 = character timeout.\nOn Write\nFIFO Enable (or FIFOE): This enables/disables the transmit (XMIT) and receive (RCVR) FIFO\'s. Whenever the value of this bit is changed both the XMIT and RCVR controller portion of FIFO\'s will be reset"]
814 #[inline(always)]
815 pub fn uart_iid0_fifoe(
816 self,
817 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2IirFcrReg_SPEC, crate::common::RW> {
818 crate::common::RegisterFieldBool::<0,1,0,Uart2IirFcrReg_SPEC,crate::common::RW>::from_register(self,0)
819 }
820}
821impl ::core::default::Default for Uart2IirFcrReg {
822 #[inline(always)]
823 fn default() -> Uart2IirFcrReg {
824 <crate::RegValueT<Uart2IirFcrReg_SPEC> as RegisterValue<_>>::new(1)
825 }
826}
827
828#[doc(hidden)]
829#[derive(Copy, Clone, Eq, PartialEq)]
830pub struct Uart2LcrReg_SPEC;
831impl crate::sealed::RegSpec for Uart2LcrReg_SPEC {
832 type DataType = u16;
833}
834
835#[doc = "Line Control Register"]
836pub type Uart2LcrReg = crate::RegValueT<Uart2LcrReg_SPEC>;
837
838impl Uart2LcrReg {
839 #[doc = "Divisor Latch Access Bit.Writeable only when UART is not busy (USR\\[0\\] is zero).\nThis bit is used to enable reading and writing of the Divisor Latch register (DLL and DLH) to set the baud rate of the UART.\nThis bit must be cleared after initial baud rate setup in order to access other registers."]
840 #[inline(always)]
841 pub fn uart_dlab(
842 self,
843 ) -> crate::common::RegisterFieldBool<7, 1, 0, Uart2LcrReg_SPEC, crate::common::RW> {
844 crate::common::RegisterFieldBool::<7,1,0,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
845 }
846
847 #[doc = "Break Control Bit.\nThis is used to cause a break condition to be transmitted to the receiving device. If set to one the serial output is forced to the spacing (logic 0) state. When not in Loopback Mode, as determined by MCR\\[4\\], the sout line is forced low until the Break bit is cleared. If active (MCR\\[6\\] set to one) the sir_out_n line is continuously pulsed. When in Loopback Mode, the break condition is internally looped back to the receiver and the sir_out_n line is forced low."]
848 #[inline(always)]
849 pub fn uart_bc(
850 self,
851 ) -> crate::common::RegisterFieldBool<6, 1, 0, Uart2LcrReg_SPEC, crate::common::RW> {
852 crate::common::RegisterFieldBool::<6,1,0,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
853 }
854
855 #[doc = "Even Parity Select. Writeable only when UART is not busy (USR\\[0\\] is zero).\nThis is used to select between even and odd parity, when parity is enabled (PEN set to one). If set to one, an even number of logic 1s is transmitted or checked. If set to zero, an odd number of logic 1s is transmitted or checked."]
856 #[inline(always)]
857 pub fn uart_eps(
858 self,
859 ) -> crate::common::RegisterFieldBool<4, 1, 0, Uart2LcrReg_SPEC, crate::common::RW> {
860 crate::common::RegisterFieldBool::<4,1,0,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
861 }
862
863 #[doc = "Parity Enable. Writeable only when UART is not busy (USR\\[0\\] is zero)\nThis bit is used to enable and disable parity generation and detection in transmitted and received serial character respectively.\n0 = parity disabled\n1 = parity enabled"]
864 #[inline(always)]
865 pub fn uart_pen(
866 self,
867 ) -> crate::common::RegisterFieldBool<3, 1, 0, Uart2LcrReg_SPEC, crate::common::RW> {
868 crate::common::RegisterFieldBool::<3,1,0,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
869 }
870
871 #[doc = "Number of stop bits. Writeable only when UART is not busy (USR\\[0\\] is zero).\nThis is used to select the number of stop bits per character that the peripheral transmits and receives. If set to zero, one stop bit is transmitted in the serial data.\nIf set to one and the data bits are set to 5 (LCR\\[1:0\\] set to zero) one and a half stop bits is transmitted. Otherwise, two stop bits are transmitted. Note that regardless of the number of stop bits selected, the receiver checks only the first stop bit.\n0 = 1 stop bit\n1 = 1.5 stop bits when DLS (LCR\\[1:0\\]) is zero, else 2 stop bit"]
872 #[inline(always)]
873 pub fn uart_stop(
874 self,
875 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2LcrReg_SPEC, crate::common::RW> {
876 crate::common::RegisterFieldBool::<2,1,0,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
877 }
878
879 #[doc = "Data Length Select.Writeable only when UART is not busy (USR\\[0\\] is zero).\nThis is used to select the number of data bits per character that the peripheral transmits and receives. The number of bit that may be selected areas follows:\n00 = 5 bits\n01 = 6 bits\n10 = 7 bits\n11 = 8 bits"]
880 #[inline(always)]
881 pub fn uart_dls(
882 self,
883 ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, Uart2LcrReg_SPEC, crate::common::RW>
884 {
885 crate::common::RegisterField::<0,0x3,1,0,u8,u8,Uart2LcrReg_SPEC,crate::common::RW>::from_register(self,0)
886 }
887}
888impl ::core::default::Default for Uart2LcrReg {
889 #[inline(always)]
890 fn default() -> Uart2LcrReg {
891 <crate::RegValueT<Uart2LcrReg_SPEC> as RegisterValue<_>>::new(0)
892 }
893}
894
895#[doc(hidden)]
896#[derive(Copy, Clone, Eq, PartialEq)]
897pub struct Uart2LsrReg_SPEC;
898impl crate::sealed::RegSpec for Uart2LsrReg_SPEC {
899 type DataType = u16;
900}
901
902#[doc = "Line Status Register"]
903pub type Uart2LsrReg = crate::RegValueT<Uart2LsrReg_SPEC>;
904
905impl Uart2LsrReg {
906 #[doc = "Receiver FIFO Error bit.\nThis bit is only relevant when FIFOs are enabled (FCR\\[0\\] set to one). This is used to indicate if there is at least one parity error, framing error, or break indication in the FIFO.\n0 = no error in RX FIFO\n1 = error in RX FIFO\nThis bit is cleared when the LSR is read and the character with the error is at the top of the receiver FIFO and there are no subsequent errors in the FIFO."]
907 #[inline(always)]
908 pub fn uart_rfe(
909 self,
910 ) -> crate::common::RegisterFieldBool<7, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
911 crate::common::RegisterFieldBool::<7,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
912 }
913
914 #[doc = "Transmitter Empty bit.\nIf FIFOs enabled (FCR\\[0\\] set to one), this bit is set whenever the Transmitter Shift Register and the FIFO are both empty. If FIFOs are disabled, this bit is set whenever the Transmitter Holding Register(THR) and the Transmitter Shift Register are both empty."]
915 #[inline(always)]
916 pub fn uart_temt(
917 self,
918 ) -> crate::common::RegisterFieldBool<6, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
919 crate::common::RegisterFieldBool::<6,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
920 }
921
922 #[doc = "Transmit Holding Register Empty bit.\nIf THRE mode is disabled (IER\\[7\\] set to zero) and regardless of FIFO\'s being implemented/enabled or not, this bit indicates that the THR or TX FIFO is empty.\nThis bit is set whenever data is transferred from the THR or TX FIFO to the transmitter shift register and no new data has been written to the THR or TX FIFO. This also causes a THRE Interrupt to occur, if the THRE Interrupt is enabled. If both modes are active (IER\\[7\\] set to one and FCR\\[0\\] set to one respectively), the functionality is switched to indicate the transmitter FIFO is full, and no longer controls THRE interrupts, which are then controlled by the FCR\\[5:4\\] threshold setting."]
923 #[inline(always)]
924 pub fn uart_thre(
925 self,
926 ) -> crate::common::RegisterFieldBool<5, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
927 crate::common::RegisterFieldBool::<5,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
928 }
929
930 #[doc = "Break Interrupt bit.\nThis is used to indicate the detection of a break sequence on the serial input data.\nIf in UART mode (SIR_MODE == Disabled), it is set whenever the serial input, sin, is held in a logic \'0\' state for longer than the sum of start time + data bits + parity + stop bits.\nIf in infrared mode (SIR_MODE == Enabled), it is set whenever the serial input, sir_in, is continuously pulsed to logic \'0\' for longer than the sum of start time + data bits + parity + stop bits. A break condition on serial input causes one and only one character, consisting of all zeros, to be received by the UART.\nIn the FIFO mode, the character associated with the break condition is carried through the FIFO and is revealed when the character is at the top of the FIFO.\nReading the LSR clears the BI bit. In the non-FIFO mode, the BI indication occurs immediately and persists until the LSR is read."]
931 #[inline(always)]
932 pub fn uart_bi(
933 self,
934 ) -> crate::common::RegisterFieldBool<4, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
935 crate::common::RegisterFieldBool::<4,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
936 }
937
938 #[doc = "Framing Error bit.\nThis is used to indicate the occurrence of a framing error in the receiver. A framing error occurs when the receiver does not detect a valid STOP bit in the received data.\nIn the FIFO mode, since the framing error is associated with a character received, it is revealed when the character with the framing error is at the top of the FIFO.\nWhen a framing error occurs, the UART tries to resynchronize. It does this by assuming that the error was due to the start bit of the next character and then continues receiving the other bit i.e. data, and/or parity and stop. It should be noted that the Framing Error (FE) bit (LSR\\[3\\]) is set if a break interrupt has occurred, as indicated by Break Interrupt (BI) bit (LSR\\[4\\]).\n0 = no framing error\n1 = framing error\nReading the LSR clears the FE bit."]
939 #[inline(always)]
940 pub fn uart_fe(
941 self,
942 ) -> crate::common::RegisterFieldBool<3, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
943 crate::common::RegisterFieldBool::<3,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
944 }
945
946 #[doc = "Parity Error bit.\nThis is used to indicate the occurrence of a parity error in the receiver if the Parity Enable (PEN) bit (LCR\\[3\\]) is set.\nIn the FIFO mode, since the parity error is associated with a character received, it is revealed when the character with the parity error arrives at the top of the FIFO.\nIt should be noted that the Parity Error (PE) bit (LSR\\[2\\]) is set if a break interrupt has occurred, as indicated by Break Interrupt (BI) bit (LSR\\[4\\]).\n0 = no parity error\n1 = parity error\nReading the LSR clears the PE bit."]
947 #[inline(always)]
948 pub fn uart_pe(
949 self,
950 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
951 crate::common::RegisterFieldBool::<2,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
952 }
953
954 #[doc = "Overrun error bit.\nThis is used to indicate the occurrence of an overrun error.\nThis occurs if a new data character was received before the previous data was read.\nIn the non-FIFO mode, the OE bit is set when a new character arrives in the receiver before the previous character was read from the RBR. When this happens, the data in the RBR is overwritten. In the FIFO mode, an overrun error occurs when the FIFO is full and a new character arrives at the receiver. The data in the FIFO is retained and the data in the receive shift register is lost.\n0 = no overrun error\n1 = overrun error\nReading the LSR clears the OE bit."]
955 #[inline(always)]
956 pub fn uart_oe(
957 self,
958 ) -> crate::common::RegisterFieldBool<1, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
959 crate::common::RegisterFieldBool::<1,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
960 }
961
962 #[doc = "Data Ready bit.\nThis is used to indicate that the receiver contains at least one character in the RBR or the receiver FIFO.\n0 = no data ready\n1 = data ready\nThis bit is cleared when the RBR is read in non-FIFO mode, or when the receiver FIFO is empty, in FIFO mode."]
963 #[inline(always)]
964 pub fn uart_dr(
965 self,
966 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2LsrReg_SPEC, crate::common::R> {
967 crate::common::RegisterFieldBool::<0,1,0,Uart2LsrReg_SPEC,crate::common::R>::from_register(self,0)
968 }
969}
970impl ::core::default::Default for Uart2LsrReg {
971 #[inline(always)]
972 fn default() -> Uart2LsrReg {
973 <crate::RegValueT<Uart2LsrReg_SPEC> as RegisterValue<_>>::new(96)
974 }
975}
976
977#[doc(hidden)]
978#[derive(Copy, Clone, Eq, PartialEq)]
979pub struct Uart2McrReg_SPEC;
980impl crate::sealed::RegSpec for Uart2McrReg_SPEC {
981 type DataType = u16;
982}
983
984#[doc = "Modem Control Register"]
985pub type Uart2McrReg = crate::RegValueT<Uart2McrReg_SPEC>;
986
987impl Uart2McrReg {
988 #[doc = "LoopBack Bit.\nThis is used to put the UART into a diagnostic mode for test purposes.\nIf operating in UART mode (SIR_MODE not active, MCR\\[6\\] set to zero), data on the sout line is held high, while serial data output is looped back to the sin line, internally. In this mode all the interrupts are fully functional. Also, in loopback mode, the modem control inputs (dsr_n, cts_n, ri_n, dcd_n) are disconnected and the modem control outputs (dtr_n, rts_n, out1_n, out2_n) are looped back to the inputs, internally.\nIf operating in infrared mode (SIR_MODE active, MCR\\[6\\] set to one), data on the sir_out_n line is held low, while serial data output is inverted and looped back to the sir_in line."]
989 #[inline(always)]
990 pub fn uart_lb(
991 self,
992 ) -> crate::common::RegisterFieldBool<4, 1, 0, Uart2McrReg_SPEC, crate::common::RW> {
993 crate::common::RegisterFieldBool::<4,1,0,Uart2McrReg_SPEC,crate::common::RW>::from_register(self,0)
994 }
995}
996impl ::core::default::Default for Uart2McrReg {
997 #[inline(always)]
998 fn default() -> Uart2McrReg {
999 <crate::RegValueT<Uart2McrReg_SPEC> as RegisterValue<_>>::new(0)
1000 }
1001}
1002
1003#[doc(hidden)]
1004#[derive(Copy, Clone, Eq, PartialEq)]
1005pub struct Uart2RbrThrDllReg_SPEC;
1006impl crate::sealed::RegSpec for Uart2RbrThrDllReg_SPEC {
1007 type DataType = u16;
1008}
1009
1010#[doc = "Receive Buffer Register/Transmit Holding Register/Divisor Latch Low"]
1011pub type Uart2RbrThrDllReg = crate::RegValueT<Uart2RbrThrDllReg_SPEC>;
1012
1013impl Uart2RbrThrDllReg {
1014 #[doc = "Receive Buffer Register: (RBR).\nThis register contains the data byte received on the serial input port (sin) in UART mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur.\nTransmit Holding Register: (THR)\nThis register contains data to be transmitted on the serial output port (sout) in UART mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, 16 number of characters of data may be written to the THR before the FIFO is full. Any attempt to write data when the FIFO is full results in the write data being lost.\nDivisor Latch (Low): (DLL)\nThis register makes up the lower 8-bits of a 16-bit, read/write, Divisor Latch register that contains the baud rate divisor for the UART. This register may only be accessed when the DLAB bit (LCR\\[7\\]) is set. The output baud rate is equal to the serial clock (sclk) frequency divided by sixteen times the value of the baud rate divisor, as follows:\nbaud rate = (serial clock freq) / (16 * divisor)\nNote that with the Divisor Latch Registers (DLL and DLH) set to zero, the baud clock is disabled and no serial communications will occur. Also, once the Divisor Latch is set, at least 8 clock cycles of the slowest UART clock should be allowed to pass before transmitting or receiving data.\nFor the Divisor Latch (High) bits, see register UART_IER_DLH_REG."]
1015 #[inline(always)]
1016 pub fn rbr_thr_dll(
1017 self,
1018 ) -> crate::common::RegisterField<
1019 0,
1020 0xff,
1021 1,
1022 0,
1023 u8,
1024 u8,
1025 Uart2RbrThrDllReg_SPEC,
1026 crate::common::RW,
1027 > {
1028 crate::common::RegisterField::<
1029 0,
1030 0xff,
1031 1,
1032 0,
1033 u8,
1034 u8,
1035 Uart2RbrThrDllReg_SPEC,
1036 crate::common::RW,
1037 >::from_register(self, 0)
1038 }
1039}
1040impl ::core::default::Default for Uart2RbrThrDllReg {
1041 #[inline(always)]
1042 fn default() -> Uart2RbrThrDllReg {
1043 <crate::RegValueT<Uart2RbrThrDllReg_SPEC> as RegisterValue<_>>::new(0)
1044 }
1045}
1046
1047#[doc(hidden)]
1048#[derive(Copy, Clone, Eq, PartialEq)]
1049pub struct Uart2RflReg_SPEC;
1050impl crate::sealed::RegSpec for Uart2RflReg_SPEC {
1051 type DataType = u16;
1052}
1053
1054#[doc = "Receive FIFO Level"]
1055pub type Uart2RflReg = crate::RegValueT<Uart2RflReg_SPEC>;
1056
1057impl Uart2RflReg {
1058 #[doc = "Receive FIFO Level.\nThis is indicates the number of data entries in the receive FIFO."]
1059 #[inline(always)]
1060 pub fn uart_receive_fifo_level(
1061 self,
1062 ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Uart2RflReg_SPEC, crate::common::R>
1063 {
1064 crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Uart2RflReg_SPEC,crate::common::R>::from_register(self,0)
1065 }
1066}
1067impl ::core::default::Default for Uart2RflReg {
1068 #[inline(always)]
1069 fn default() -> Uart2RflReg {
1070 <crate::RegValueT<Uart2RflReg_SPEC> as RegisterValue<_>>::new(0)
1071 }
1072}
1073
1074#[doc(hidden)]
1075#[derive(Copy, Clone, Eq, PartialEq)]
1076pub struct Uart2SbcrReg_SPEC;
1077impl crate::sealed::RegSpec for Uart2SbcrReg_SPEC {
1078 type DataType = u16;
1079}
1080
1081#[doc = "Shadow Break Control Register"]
1082pub type Uart2SbcrReg = crate::RegValueT<Uart2SbcrReg_SPEC>;
1083
1084impl Uart2SbcrReg {
1085 #[doc = "Shadow Break Control Bit.\nThis is a shadow register for the Break bit (LCR\\[6\\]), this can be used to remove the burden of having to performing a read modify write on the LCR. This is used to cause a break condition to be transmitted to the receiving device.\nIf set to one the serial output is forced to the spacing (logic 0) state. When not in Loopback Mode, as determined by MCR\\[4\\], the sout line is forced low until the Break bit is cleared.\nIf SIR_MODE active (MCR\\[6\\] = 1) the sir_out_n line is continuously pulsed. When in Loopback Mode, the break condition is internally looped back to the receiver."]
1086 #[inline(always)]
1087 pub fn uart_shadow_break_control(
1088 self,
1089 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2SbcrReg_SPEC, crate::common::RW> {
1090 crate::common::RegisterFieldBool::<0,1,0,Uart2SbcrReg_SPEC,crate::common::RW>::from_register(self,0)
1091 }
1092}
1093impl ::core::default::Default for Uart2SbcrReg {
1094 #[inline(always)]
1095 fn default() -> Uart2SbcrReg {
1096 <crate::RegValueT<Uart2SbcrReg_SPEC> as RegisterValue<_>>::new(0)
1097 }
1098}
1099
1100#[doc(hidden)]
1101#[derive(Copy, Clone, Eq, PartialEq)]
1102pub struct Uart2ScrReg_SPEC;
1103impl crate::sealed::RegSpec for Uart2ScrReg_SPEC {
1104 type DataType = u16;
1105}
1106
1107#[doc = "Scratchpad Register"]
1108pub type Uart2ScrReg = crate::RegValueT<Uart2ScrReg_SPEC>;
1109
1110impl Uart2ScrReg {
1111 #[doc = "This register is for programmers to use as a temporary storage space. It has no defined purpose in the UART Ctrl."]
1112 #[inline(always)]
1113 pub fn uart_scratch_pad(
1114 self,
1115 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Uart2ScrReg_SPEC, crate::common::RW>
1116 {
1117 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Uart2ScrReg_SPEC,crate::common::RW>::from_register(self,0)
1118 }
1119}
1120impl ::core::default::Default for Uart2ScrReg {
1121 #[inline(always)]
1122 fn default() -> Uart2ScrReg {
1123 <crate::RegValueT<Uart2ScrReg_SPEC> as RegisterValue<_>>::new(0)
1124 }
1125}
1126
1127#[doc(hidden)]
1128#[derive(Copy, Clone, Eq, PartialEq)]
1129pub struct Uart2SdmamReg_SPEC;
1130impl crate::sealed::RegSpec for Uart2SdmamReg_SPEC {
1131 type DataType = u16;
1132}
1133
1134#[doc = "Shadow DMA Mode"]
1135pub type Uart2SdmamReg = crate::RegValueT<Uart2SdmamReg_SPEC>;
1136
1137impl Uart2SdmamReg {
1138 #[doc = "Shadow DMA Mode.\nThis is a shadow register for the DMA mode bit (FCR\\[3\\]). This can be used to remove the burden of having to store the previously written value to the FCR in memory and having to mask this value so that only the DMA Mode bit gets updated. This determines the DMA signalling mode used for the dma_tx_req_n and dma_rx_req_n output signals.\n0 = mode 0\n1 = mode 1"]
1139 #[inline(always)]
1140 pub fn uart_shadow_dma_mode(
1141 self,
1142 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2SdmamReg_SPEC, crate::common::RW> {
1143 crate::common::RegisterFieldBool::<0,1,0,Uart2SdmamReg_SPEC,crate::common::RW>::from_register(self,0)
1144 }
1145}
1146impl ::core::default::Default for Uart2SdmamReg {
1147 #[inline(always)]
1148 fn default() -> Uart2SdmamReg {
1149 <crate::RegValueT<Uart2SdmamReg_SPEC> as RegisterValue<_>>::new(0)
1150 }
1151}
1152
1153#[doc(hidden)]
1154#[derive(Copy, Clone, Eq, PartialEq)]
1155pub struct Uart2SfeReg_SPEC;
1156impl crate::sealed::RegSpec for Uart2SfeReg_SPEC {
1157 type DataType = u16;
1158}
1159
1160#[doc = "Shadow FIFO Enable"]
1161pub type Uart2SfeReg = crate::RegValueT<Uart2SfeReg_SPEC>;
1162
1163impl Uart2SfeReg {
1164 #[doc = "Shadow FIFO Enable.\nThis is a shadow register for the FIFO enable bit (FCR\\[0\\]). This can be used to remove the burden of having to store the previously written value to the FCR in memory and having to mask this value so that only the FIFO enable bit gets updated.This enables/disables the transmit (XMIT) and receive (RCVR) FIFOs. If this bit is set to zero (disabled) after being enabled then both the XMIT and RCVR controller portion of FIFOs are reset."]
1165 #[inline(always)]
1166 pub fn uart_shadow_fifo_enable(
1167 self,
1168 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2SfeReg_SPEC, crate::common::RW> {
1169 crate::common::RegisterFieldBool::<0,1,0,Uart2SfeReg_SPEC,crate::common::RW>::from_register(self,0)
1170 }
1171}
1172impl ::core::default::Default for Uart2SfeReg {
1173 #[inline(always)]
1174 fn default() -> Uart2SfeReg {
1175 <crate::RegValueT<Uart2SfeReg_SPEC> as RegisterValue<_>>::new(0)
1176 }
1177}
1178
1179#[doc(hidden)]
1180#[derive(Copy, Clone, Eq, PartialEq)]
1181pub struct Uart2SrbrSthr0Reg_SPEC;
1182impl crate::sealed::RegSpec for Uart2SrbrSthr0Reg_SPEC {
1183 type DataType = u16;
1184}
1185
1186#[doc = "Shadow Receive/Transmit Buffer Register"]
1187pub type Uart2SrbrSthr0Reg = crate::RegValueT<Uart2SrbrSthr0Reg_SPEC>;
1188
1189impl Uart2SrbrSthr0Reg {
1190 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1191 #[inline(always)]
1192 pub fn srbr_sthrx(
1193 self,
1194 ) -> crate::common::RegisterField<
1195 0,
1196 0xff,
1197 1,
1198 0,
1199 u8,
1200 u8,
1201 Uart2SrbrSthr0Reg_SPEC,
1202 crate::common::RW,
1203 > {
1204 crate::common::RegisterField::<
1205 0,
1206 0xff,
1207 1,
1208 0,
1209 u8,
1210 u8,
1211 Uart2SrbrSthr0Reg_SPEC,
1212 crate::common::RW,
1213 >::from_register(self, 0)
1214 }
1215}
1216impl ::core::default::Default for Uart2SrbrSthr0Reg {
1217 #[inline(always)]
1218 fn default() -> Uart2SrbrSthr0Reg {
1219 <crate::RegValueT<Uart2SrbrSthr0Reg_SPEC> as RegisterValue<_>>::new(0)
1220 }
1221}
1222
1223#[doc(hidden)]
1224#[derive(Copy, Clone, Eq, PartialEq)]
1225pub struct Uart2SrbrSthr10Reg_SPEC;
1226impl crate::sealed::RegSpec for Uart2SrbrSthr10Reg_SPEC {
1227 type DataType = u16;
1228}
1229
1230#[doc = "Shadow Receive/Transmit Buffer Register"]
1231pub type Uart2SrbrSthr10Reg = crate::RegValueT<Uart2SrbrSthr10Reg_SPEC>;
1232
1233impl Uart2SrbrSthr10Reg {
1234 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1235 #[inline(always)]
1236 pub fn srbr_sthrx(
1237 self,
1238 ) -> crate::common::RegisterField<
1239 0,
1240 0xff,
1241 1,
1242 0,
1243 u8,
1244 u8,
1245 Uart2SrbrSthr10Reg_SPEC,
1246 crate::common::RW,
1247 > {
1248 crate::common::RegisterField::<
1249 0,
1250 0xff,
1251 1,
1252 0,
1253 u8,
1254 u8,
1255 Uart2SrbrSthr10Reg_SPEC,
1256 crate::common::RW,
1257 >::from_register(self, 0)
1258 }
1259}
1260impl ::core::default::Default for Uart2SrbrSthr10Reg {
1261 #[inline(always)]
1262 fn default() -> Uart2SrbrSthr10Reg {
1263 <crate::RegValueT<Uart2SrbrSthr10Reg_SPEC> as RegisterValue<_>>::new(0)
1264 }
1265}
1266
1267#[doc(hidden)]
1268#[derive(Copy, Clone, Eq, PartialEq)]
1269pub struct Uart2SrbrSthr11Reg_SPEC;
1270impl crate::sealed::RegSpec for Uart2SrbrSthr11Reg_SPEC {
1271 type DataType = u16;
1272}
1273
1274#[doc = "Shadow Receive/Transmit Buffer Register"]
1275pub type Uart2SrbrSthr11Reg = crate::RegValueT<Uart2SrbrSthr11Reg_SPEC>;
1276
1277impl Uart2SrbrSthr11Reg {
1278 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1279 #[inline(always)]
1280 pub fn srbr_sthrx(
1281 self,
1282 ) -> crate::common::RegisterField<
1283 0,
1284 0xff,
1285 1,
1286 0,
1287 u8,
1288 u8,
1289 Uart2SrbrSthr11Reg_SPEC,
1290 crate::common::RW,
1291 > {
1292 crate::common::RegisterField::<
1293 0,
1294 0xff,
1295 1,
1296 0,
1297 u8,
1298 u8,
1299 Uart2SrbrSthr11Reg_SPEC,
1300 crate::common::RW,
1301 >::from_register(self, 0)
1302 }
1303}
1304impl ::core::default::Default for Uart2SrbrSthr11Reg {
1305 #[inline(always)]
1306 fn default() -> Uart2SrbrSthr11Reg {
1307 <crate::RegValueT<Uart2SrbrSthr11Reg_SPEC> as RegisterValue<_>>::new(0)
1308 }
1309}
1310
1311#[doc(hidden)]
1312#[derive(Copy, Clone, Eq, PartialEq)]
1313pub struct Uart2SrbrSthr12Reg_SPEC;
1314impl crate::sealed::RegSpec for Uart2SrbrSthr12Reg_SPEC {
1315 type DataType = u16;
1316}
1317
1318#[doc = "Shadow Receive/Transmit Buffer Register"]
1319pub type Uart2SrbrSthr12Reg = crate::RegValueT<Uart2SrbrSthr12Reg_SPEC>;
1320
1321impl Uart2SrbrSthr12Reg {
1322 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1323 #[inline(always)]
1324 pub fn srbr_sthrx(
1325 self,
1326 ) -> crate::common::RegisterField<
1327 0,
1328 0xff,
1329 1,
1330 0,
1331 u8,
1332 u8,
1333 Uart2SrbrSthr12Reg_SPEC,
1334 crate::common::RW,
1335 > {
1336 crate::common::RegisterField::<
1337 0,
1338 0xff,
1339 1,
1340 0,
1341 u8,
1342 u8,
1343 Uart2SrbrSthr12Reg_SPEC,
1344 crate::common::RW,
1345 >::from_register(self, 0)
1346 }
1347}
1348impl ::core::default::Default for Uart2SrbrSthr12Reg {
1349 #[inline(always)]
1350 fn default() -> Uart2SrbrSthr12Reg {
1351 <crate::RegValueT<Uart2SrbrSthr12Reg_SPEC> as RegisterValue<_>>::new(0)
1352 }
1353}
1354
1355#[doc(hidden)]
1356#[derive(Copy, Clone, Eq, PartialEq)]
1357pub struct Uart2SrbrSthr13Reg_SPEC;
1358impl crate::sealed::RegSpec for Uart2SrbrSthr13Reg_SPEC {
1359 type DataType = u16;
1360}
1361
1362#[doc = "Shadow Receive/Transmit Buffer Register"]
1363pub type Uart2SrbrSthr13Reg = crate::RegValueT<Uart2SrbrSthr13Reg_SPEC>;
1364
1365impl Uart2SrbrSthr13Reg {
1366 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1367 #[inline(always)]
1368 pub fn srbr_sthrx(
1369 self,
1370 ) -> crate::common::RegisterField<
1371 0,
1372 0xff,
1373 1,
1374 0,
1375 u8,
1376 u8,
1377 Uart2SrbrSthr13Reg_SPEC,
1378 crate::common::RW,
1379 > {
1380 crate::common::RegisterField::<
1381 0,
1382 0xff,
1383 1,
1384 0,
1385 u8,
1386 u8,
1387 Uart2SrbrSthr13Reg_SPEC,
1388 crate::common::RW,
1389 >::from_register(self, 0)
1390 }
1391}
1392impl ::core::default::Default for Uart2SrbrSthr13Reg {
1393 #[inline(always)]
1394 fn default() -> Uart2SrbrSthr13Reg {
1395 <crate::RegValueT<Uart2SrbrSthr13Reg_SPEC> as RegisterValue<_>>::new(0)
1396 }
1397}
1398
1399#[doc(hidden)]
1400#[derive(Copy, Clone, Eq, PartialEq)]
1401pub struct Uart2SrbrSthr14Reg_SPEC;
1402impl crate::sealed::RegSpec for Uart2SrbrSthr14Reg_SPEC {
1403 type DataType = u16;
1404}
1405
1406#[doc = "Shadow Receive/Transmit Buffer Register"]
1407pub type Uart2SrbrSthr14Reg = crate::RegValueT<Uart2SrbrSthr14Reg_SPEC>;
1408
1409impl Uart2SrbrSthr14Reg {
1410 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1411 #[inline(always)]
1412 pub fn srbr_sthrx(
1413 self,
1414 ) -> crate::common::RegisterField<
1415 0,
1416 0xff,
1417 1,
1418 0,
1419 u8,
1420 u8,
1421 Uart2SrbrSthr14Reg_SPEC,
1422 crate::common::RW,
1423 > {
1424 crate::common::RegisterField::<
1425 0,
1426 0xff,
1427 1,
1428 0,
1429 u8,
1430 u8,
1431 Uart2SrbrSthr14Reg_SPEC,
1432 crate::common::RW,
1433 >::from_register(self, 0)
1434 }
1435}
1436impl ::core::default::Default for Uart2SrbrSthr14Reg {
1437 #[inline(always)]
1438 fn default() -> Uart2SrbrSthr14Reg {
1439 <crate::RegValueT<Uart2SrbrSthr14Reg_SPEC> as RegisterValue<_>>::new(0)
1440 }
1441}
1442
1443#[doc(hidden)]
1444#[derive(Copy, Clone, Eq, PartialEq)]
1445pub struct Uart2SrbrSthr15Reg_SPEC;
1446impl crate::sealed::RegSpec for Uart2SrbrSthr15Reg_SPEC {
1447 type DataType = u16;
1448}
1449
1450#[doc = "Shadow Receive/Transmit Buffer Register"]
1451pub type Uart2SrbrSthr15Reg = crate::RegValueT<Uart2SrbrSthr15Reg_SPEC>;
1452
1453impl Uart2SrbrSthr15Reg {
1454 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1455 #[inline(always)]
1456 pub fn srbr_sthrx(
1457 self,
1458 ) -> crate::common::RegisterField<
1459 0,
1460 0xff,
1461 1,
1462 0,
1463 u8,
1464 u8,
1465 Uart2SrbrSthr15Reg_SPEC,
1466 crate::common::RW,
1467 > {
1468 crate::common::RegisterField::<
1469 0,
1470 0xff,
1471 1,
1472 0,
1473 u8,
1474 u8,
1475 Uart2SrbrSthr15Reg_SPEC,
1476 crate::common::RW,
1477 >::from_register(self, 0)
1478 }
1479}
1480impl ::core::default::Default for Uart2SrbrSthr15Reg {
1481 #[inline(always)]
1482 fn default() -> Uart2SrbrSthr15Reg {
1483 <crate::RegValueT<Uart2SrbrSthr15Reg_SPEC> as RegisterValue<_>>::new(0)
1484 }
1485}
1486
1487#[doc(hidden)]
1488#[derive(Copy, Clone, Eq, PartialEq)]
1489pub struct Uart2SrbrSthr1Reg_SPEC;
1490impl crate::sealed::RegSpec for Uart2SrbrSthr1Reg_SPEC {
1491 type DataType = u16;
1492}
1493
1494#[doc = "Shadow Receive/Transmit Buffer Register"]
1495pub type Uart2SrbrSthr1Reg = crate::RegValueT<Uart2SrbrSthr1Reg_SPEC>;
1496
1497impl Uart2SrbrSthr1Reg {
1498 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1499 #[inline(always)]
1500 pub fn srbr_sthrx(
1501 self,
1502 ) -> crate::common::RegisterField<
1503 0,
1504 0xff,
1505 1,
1506 0,
1507 u8,
1508 u8,
1509 Uart2SrbrSthr1Reg_SPEC,
1510 crate::common::RW,
1511 > {
1512 crate::common::RegisterField::<
1513 0,
1514 0xff,
1515 1,
1516 0,
1517 u8,
1518 u8,
1519 Uart2SrbrSthr1Reg_SPEC,
1520 crate::common::RW,
1521 >::from_register(self, 0)
1522 }
1523}
1524impl ::core::default::Default for Uart2SrbrSthr1Reg {
1525 #[inline(always)]
1526 fn default() -> Uart2SrbrSthr1Reg {
1527 <crate::RegValueT<Uart2SrbrSthr1Reg_SPEC> as RegisterValue<_>>::new(0)
1528 }
1529}
1530
1531#[doc(hidden)]
1532#[derive(Copy, Clone, Eq, PartialEq)]
1533pub struct Uart2SrbrSthr2Reg_SPEC;
1534impl crate::sealed::RegSpec for Uart2SrbrSthr2Reg_SPEC {
1535 type DataType = u16;
1536}
1537
1538#[doc = "Shadow Receive/Transmit Buffer Register"]
1539pub type Uart2SrbrSthr2Reg = crate::RegValueT<Uart2SrbrSthr2Reg_SPEC>;
1540
1541impl Uart2SrbrSthr2Reg {
1542 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1543 #[inline(always)]
1544 pub fn srbr_sthrx(
1545 self,
1546 ) -> crate::common::RegisterField<
1547 0,
1548 0xff,
1549 1,
1550 0,
1551 u8,
1552 u8,
1553 Uart2SrbrSthr2Reg_SPEC,
1554 crate::common::RW,
1555 > {
1556 crate::common::RegisterField::<
1557 0,
1558 0xff,
1559 1,
1560 0,
1561 u8,
1562 u8,
1563 Uart2SrbrSthr2Reg_SPEC,
1564 crate::common::RW,
1565 >::from_register(self, 0)
1566 }
1567}
1568impl ::core::default::Default for Uart2SrbrSthr2Reg {
1569 #[inline(always)]
1570 fn default() -> Uart2SrbrSthr2Reg {
1571 <crate::RegValueT<Uart2SrbrSthr2Reg_SPEC> as RegisterValue<_>>::new(0)
1572 }
1573}
1574
1575#[doc(hidden)]
1576#[derive(Copy, Clone, Eq, PartialEq)]
1577pub struct Uart2SrbrSthr3Reg_SPEC;
1578impl crate::sealed::RegSpec for Uart2SrbrSthr3Reg_SPEC {
1579 type DataType = u16;
1580}
1581
1582#[doc = "Shadow Receive/Transmit Buffer Register"]
1583pub type Uart2SrbrSthr3Reg = crate::RegValueT<Uart2SrbrSthr3Reg_SPEC>;
1584
1585impl Uart2SrbrSthr3Reg {
1586 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1587 #[inline(always)]
1588 pub fn srbr_sthrx(
1589 self,
1590 ) -> crate::common::RegisterField<
1591 0,
1592 0xff,
1593 1,
1594 0,
1595 u8,
1596 u8,
1597 Uart2SrbrSthr3Reg_SPEC,
1598 crate::common::RW,
1599 > {
1600 crate::common::RegisterField::<
1601 0,
1602 0xff,
1603 1,
1604 0,
1605 u8,
1606 u8,
1607 Uart2SrbrSthr3Reg_SPEC,
1608 crate::common::RW,
1609 >::from_register(self, 0)
1610 }
1611}
1612impl ::core::default::Default for Uart2SrbrSthr3Reg {
1613 #[inline(always)]
1614 fn default() -> Uart2SrbrSthr3Reg {
1615 <crate::RegValueT<Uart2SrbrSthr3Reg_SPEC> as RegisterValue<_>>::new(0)
1616 }
1617}
1618
1619#[doc(hidden)]
1620#[derive(Copy, Clone, Eq, PartialEq)]
1621pub struct Uart2SrbrSthr4Reg_SPEC;
1622impl crate::sealed::RegSpec for Uart2SrbrSthr4Reg_SPEC {
1623 type DataType = u16;
1624}
1625
1626#[doc = "Shadow Receive/Transmit Buffer Register"]
1627pub type Uart2SrbrSthr4Reg = crate::RegValueT<Uart2SrbrSthr4Reg_SPEC>;
1628
1629impl Uart2SrbrSthr4Reg {
1630 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1631 #[inline(always)]
1632 pub fn srbr_sthrx(
1633 self,
1634 ) -> crate::common::RegisterField<
1635 0,
1636 0xff,
1637 1,
1638 0,
1639 u8,
1640 u8,
1641 Uart2SrbrSthr4Reg_SPEC,
1642 crate::common::RW,
1643 > {
1644 crate::common::RegisterField::<
1645 0,
1646 0xff,
1647 1,
1648 0,
1649 u8,
1650 u8,
1651 Uart2SrbrSthr4Reg_SPEC,
1652 crate::common::RW,
1653 >::from_register(self, 0)
1654 }
1655}
1656impl ::core::default::Default for Uart2SrbrSthr4Reg {
1657 #[inline(always)]
1658 fn default() -> Uart2SrbrSthr4Reg {
1659 <crate::RegValueT<Uart2SrbrSthr4Reg_SPEC> as RegisterValue<_>>::new(0)
1660 }
1661}
1662
1663#[doc(hidden)]
1664#[derive(Copy, Clone, Eq, PartialEq)]
1665pub struct Uart2SrbrSthr5Reg_SPEC;
1666impl crate::sealed::RegSpec for Uart2SrbrSthr5Reg_SPEC {
1667 type DataType = u16;
1668}
1669
1670#[doc = "Shadow Receive/Transmit Buffer Register"]
1671pub type Uart2SrbrSthr5Reg = crate::RegValueT<Uart2SrbrSthr5Reg_SPEC>;
1672
1673impl Uart2SrbrSthr5Reg {
1674 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1675 #[inline(always)]
1676 pub fn srbr_sthrx(
1677 self,
1678 ) -> crate::common::RegisterField<
1679 0,
1680 0xff,
1681 1,
1682 0,
1683 u8,
1684 u8,
1685 Uart2SrbrSthr5Reg_SPEC,
1686 crate::common::RW,
1687 > {
1688 crate::common::RegisterField::<
1689 0,
1690 0xff,
1691 1,
1692 0,
1693 u8,
1694 u8,
1695 Uart2SrbrSthr5Reg_SPEC,
1696 crate::common::RW,
1697 >::from_register(self, 0)
1698 }
1699}
1700impl ::core::default::Default for Uart2SrbrSthr5Reg {
1701 #[inline(always)]
1702 fn default() -> Uart2SrbrSthr5Reg {
1703 <crate::RegValueT<Uart2SrbrSthr5Reg_SPEC> as RegisterValue<_>>::new(0)
1704 }
1705}
1706
1707#[doc(hidden)]
1708#[derive(Copy, Clone, Eq, PartialEq)]
1709pub struct Uart2SrbrSthr6Reg_SPEC;
1710impl crate::sealed::RegSpec for Uart2SrbrSthr6Reg_SPEC {
1711 type DataType = u16;
1712}
1713
1714#[doc = "Shadow Receive/Transmit Buffer Register"]
1715pub type Uart2SrbrSthr6Reg = crate::RegValueT<Uart2SrbrSthr6Reg_SPEC>;
1716
1717impl Uart2SrbrSthr6Reg {
1718 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1719 #[inline(always)]
1720 pub fn srbr_sthrx(
1721 self,
1722 ) -> crate::common::RegisterField<
1723 0,
1724 0xff,
1725 1,
1726 0,
1727 u8,
1728 u8,
1729 Uart2SrbrSthr6Reg_SPEC,
1730 crate::common::RW,
1731 > {
1732 crate::common::RegisterField::<
1733 0,
1734 0xff,
1735 1,
1736 0,
1737 u8,
1738 u8,
1739 Uart2SrbrSthr6Reg_SPEC,
1740 crate::common::RW,
1741 >::from_register(self, 0)
1742 }
1743}
1744impl ::core::default::Default for Uart2SrbrSthr6Reg {
1745 #[inline(always)]
1746 fn default() -> Uart2SrbrSthr6Reg {
1747 <crate::RegValueT<Uart2SrbrSthr6Reg_SPEC> as RegisterValue<_>>::new(0)
1748 }
1749}
1750
1751#[doc(hidden)]
1752#[derive(Copy, Clone, Eq, PartialEq)]
1753pub struct Uart2SrbrSthr7Reg_SPEC;
1754impl crate::sealed::RegSpec for Uart2SrbrSthr7Reg_SPEC {
1755 type DataType = u16;
1756}
1757
1758#[doc = "Shadow Receive/Transmit Buffer Register"]
1759pub type Uart2SrbrSthr7Reg = crate::RegValueT<Uart2SrbrSthr7Reg_SPEC>;
1760
1761impl Uart2SrbrSthr7Reg {
1762 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1763 #[inline(always)]
1764 pub fn srbr_sthrx(
1765 self,
1766 ) -> crate::common::RegisterField<
1767 0,
1768 0xff,
1769 1,
1770 0,
1771 u8,
1772 u8,
1773 Uart2SrbrSthr7Reg_SPEC,
1774 crate::common::RW,
1775 > {
1776 crate::common::RegisterField::<
1777 0,
1778 0xff,
1779 1,
1780 0,
1781 u8,
1782 u8,
1783 Uart2SrbrSthr7Reg_SPEC,
1784 crate::common::RW,
1785 >::from_register(self, 0)
1786 }
1787}
1788impl ::core::default::Default for Uart2SrbrSthr7Reg {
1789 #[inline(always)]
1790 fn default() -> Uart2SrbrSthr7Reg {
1791 <crate::RegValueT<Uart2SrbrSthr7Reg_SPEC> as RegisterValue<_>>::new(0)
1792 }
1793}
1794
1795#[doc(hidden)]
1796#[derive(Copy, Clone, Eq, PartialEq)]
1797pub struct Uart2SrbrSthr8Reg_SPEC;
1798impl crate::sealed::RegSpec for Uart2SrbrSthr8Reg_SPEC {
1799 type DataType = u16;
1800}
1801
1802#[doc = "Shadow Receive/Transmit Buffer Register"]
1803pub type Uart2SrbrSthr8Reg = crate::RegValueT<Uart2SrbrSthr8Reg_SPEC>;
1804
1805impl Uart2SrbrSthr8Reg {
1806 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1807 #[inline(always)]
1808 pub fn srbr_sthrx(
1809 self,
1810 ) -> crate::common::RegisterField<
1811 0,
1812 0xff,
1813 1,
1814 0,
1815 u8,
1816 u8,
1817 Uart2SrbrSthr8Reg_SPEC,
1818 crate::common::RW,
1819 > {
1820 crate::common::RegisterField::<
1821 0,
1822 0xff,
1823 1,
1824 0,
1825 u8,
1826 u8,
1827 Uart2SrbrSthr8Reg_SPEC,
1828 crate::common::RW,
1829 >::from_register(self, 0)
1830 }
1831}
1832impl ::core::default::Default for Uart2SrbrSthr8Reg {
1833 #[inline(always)]
1834 fn default() -> Uart2SrbrSthr8Reg {
1835 <crate::RegValueT<Uart2SrbrSthr8Reg_SPEC> as RegisterValue<_>>::new(0)
1836 }
1837}
1838
1839#[doc(hidden)]
1840#[derive(Copy, Clone, Eq, PartialEq)]
1841pub struct Uart2SrbrSthr9Reg_SPEC;
1842impl crate::sealed::RegSpec for Uart2SrbrSthr9Reg_SPEC {
1843 type DataType = u16;
1844}
1845
1846#[doc = "Shadow Receive/Transmit Buffer Register"]
1847pub type Uart2SrbrSthr9Reg = crate::RegValueT<Uart2SrbrSthr9Reg_SPEC>;
1848
1849impl Uart2SrbrSthr9Reg {
1850 #[doc = "Shadow Receive Buffer Register x: This is a shadow register for the RBR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains the data byte received on the serial input port (sin) in UART mode or the serial infrared input (sir_in) in infrared mode. The data in this register is valid only if the Data Ready (DR) bit in the Line status Register (LSR) is set. If FIFOs are disabled (FCR\\[0\\] set to zero), the data in the RBR must be read before the next data arrives, otherwise it will be overwritten, resulting in an overrun error. If FIFOs are enabled (FCR\\[0\\] set to one), this register accesses the head of the receive FIFO. If the receive FIFO is full and this register is not read before the next data character arrives, then the data already in the FIFO will be preserved but any incoming data will be lost. An overrun error will also occur. Shadow Transmit Holding Register 0: This is a shadow register for the THR and has been allocated sixteen 32-bit locations so as to accommodate burst accesses from the master. This register contains data to be transmitted on the serial output port (sout) in UART mode or the serial infrared output (sir_out_n) in infrared mode. Data should only be written to the THR when the THR Empty (THRE) bit (LSR\\[5\\]) is set. If FIFO\'s are disabled (FCR\\[0\\] set to zero) and THRE is set, writing a single character to the THR clears the THRE. Any additional writes to the THR before the THRE is set again causes the THR data to be overwritten. If FIFO\'s are enabled (FCR\\[0\\] set to one) and THRE is set, x number of characters of data may be written to the THR before the FIFO is full. The number x (default=16) is determined by the value of FIFO Depth that you set during configuration. Any attempt to write data when the FIFO is full results in the write data being lost."]
1851 #[inline(always)]
1852 pub fn srbr_sthrx(
1853 self,
1854 ) -> crate::common::RegisterField<
1855 0,
1856 0xff,
1857 1,
1858 0,
1859 u8,
1860 u8,
1861 Uart2SrbrSthr9Reg_SPEC,
1862 crate::common::RW,
1863 > {
1864 crate::common::RegisterField::<
1865 0,
1866 0xff,
1867 1,
1868 0,
1869 u8,
1870 u8,
1871 Uart2SrbrSthr9Reg_SPEC,
1872 crate::common::RW,
1873 >::from_register(self, 0)
1874 }
1875}
1876impl ::core::default::Default for Uart2SrbrSthr9Reg {
1877 #[inline(always)]
1878 fn default() -> Uart2SrbrSthr9Reg {
1879 <crate::RegValueT<Uart2SrbrSthr9Reg_SPEC> as RegisterValue<_>>::new(0)
1880 }
1881}
1882
1883#[doc(hidden)]
1884#[derive(Copy, Clone, Eq, PartialEq)]
1885pub struct Uart2SrrReg_SPEC;
1886impl crate::sealed::RegSpec for Uart2SrrReg_SPEC {
1887 type DataType = u16;
1888}
1889
1890#[doc = "Software Reset Register."]
1891pub type Uart2SrrReg = crate::RegValueT<Uart2SrrReg_SPEC>;
1892
1893impl Uart2SrrReg {
1894 #[doc = "XMIT FIFO Reset.\nThis is a shadow register for the XMIT FIFO Reset bit (FCR\\[2\\]). This can be used to remove the burden on software having to store previously written FCR values (which are pretty static) just to reset the transmit FIFO. This resets the control portion of the transmit FIFO and treats the FIFO as empty. Note that this bit is \'self-clearing\'. It is not necessary to clear this bit."]
1895 #[inline(always)]
1896 pub fn uart_xfr(
1897 self,
1898 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2SrrReg_SPEC, crate::common::W> {
1899 crate::common::RegisterFieldBool::<2,1,0,Uart2SrrReg_SPEC,crate::common::W>::from_register(self,0)
1900 }
1901
1902 #[doc = "RCVR FIFO Reset.\nThis is a shadow register for the RCVR FIFO Reset bit (FCR\\[1\\]). This can be used to remove the burden on software having to store previously written FCR values (which are pretty static) just to reset the receive FIFO This resets the control portion of the receive FIFO and treats the FIFO as empty.\nNote that this bit is \'self-clearing\'. It is not necessary to clear this bit."]
1903 #[inline(always)]
1904 pub fn uart_rfr(
1905 self,
1906 ) -> crate::common::RegisterFieldBool<1, 1, 0, Uart2SrrReg_SPEC, crate::common::W> {
1907 crate::common::RegisterFieldBool::<1,1,0,Uart2SrrReg_SPEC,crate::common::W>::from_register(self,0)
1908 }
1909
1910 #[doc = "UART Reset. This asynchronously resets the UART Ctrl and synchronously removes the reset assertion. For a two clock implementation both pclk and sclk domains are reset."]
1911 #[inline(always)]
1912 pub fn uart_ur(
1913 self,
1914 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2SrrReg_SPEC, crate::common::W> {
1915 crate::common::RegisterFieldBool::<0,1,0,Uart2SrrReg_SPEC,crate::common::W>::from_register(self,0)
1916 }
1917}
1918impl ::core::default::Default for Uart2SrrReg {
1919 #[inline(always)]
1920 fn default() -> Uart2SrrReg {
1921 <crate::RegValueT<Uart2SrrReg_SPEC> as RegisterValue<_>>::new(0)
1922 }
1923}
1924
1925#[doc(hidden)]
1926#[derive(Copy, Clone, Eq, PartialEq)]
1927pub struct Uart2SrtReg_SPEC;
1928impl crate::sealed::RegSpec for Uart2SrtReg_SPEC {
1929 type DataType = u16;
1930}
1931
1932#[doc = "Shadow RCVR Trigger"]
1933pub type Uart2SrtReg = crate::RegValueT<Uart2SrtReg_SPEC>;
1934
1935impl Uart2SrtReg {
1936 #[doc = "Shadow RCVR Trigger.\nThis is a shadow register for the RCVR trigger bits (FCR\\[7:6\\]). This can be used to remove the burden of having to store the previously written value to the FCR in memory and having to mask this value so that only the RCVR trigger bit gets updated.\nThis is used to select the trigger level in the receiver FIFO at which the Received Data Available Interrupt is generated. It also determines when the dma_rx_req_n signal is asserted when DMA Mode (FCR\\[3\\]) = 1. The following trigger levels are supported:\n00 = 1 character in the FIFO\n01 = FIFO ¼ full\n10 = FIFO ½ full\n11 = FIFO 2 less than full"]
1937 #[inline(always)]
1938 pub fn uart_shadow_rcvr_trigger(
1939 self,
1940 ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, Uart2SrtReg_SPEC, crate::common::RW>
1941 {
1942 crate::common::RegisterField::<0,0x3,1,0,u8,u8,Uart2SrtReg_SPEC,crate::common::RW>::from_register(self,0)
1943 }
1944}
1945impl ::core::default::Default for Uart2SrtReg {
1946 #[inline(always)]
1947 fn default() -> Uart2SrtReg {
1948 <crate::RegValueT<Uart2SrtReg_SPEC> as RegisterValue<_>>::new(0)
1949 }
1950}
1951
1952#[doc(hidden)]
1953#[derive(Copy, Clone, Eq, PartialEq)]
1954pub struct Uart2StetReg_SPEC;
1955impl crate::sealed::RegSpec for Uart2StetReg_SPEC {
1956 type DataType = u16;
1957}
1958
1959#[doc = "Shadow TX Empty Trigger"]
1960pub type Uart2StetReg = crate::RegValueT<Uart2StetReg_SPEC>;
1961
1962impl Uart2StetReg {
1963 #[doc = "Shadow TX Empty Trigger.\nThis is a shadow register for the TX empty trigger bits (FCR\\[5:4\\]). This can be used to remove the burden of having to store the previously written value to the FCR in memory and having to mask this value so that only the TX empty trigger bit gets updated.\nThis is used to select the empty threshold level at which the THRE Interrupts are generated when the mode is active. The following trigger levels are supported:\n00 = FIFO empty\n01 = 2 characters in the FIFO\n10 = FIFO ¼ full\n11 = FIFO ½ full"]
1964 #[inline(always)]
1965 pub fn uart_shadow_tx_empty_trigger(
1966 self,
1967 ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, Uart2StetReg_SPEC, crate::common::RW>
1968 {
1969 crate::common::RegisterField::<0,0x3,1,0,u8,u8,Uart2StetReg_SPEC,crate::common::RW>::from_register(self,0)
1970 }
1971}
1972impl ::core::default::Default for Uart2StetReg {
1973 #[inline(always)]
1974 fn default() -> Uart2StetReg {
1975 <crate::RegValueT<Uart2StetReg_SPEC> as RegisterValue<_>>::new(0)
1976 }
1977}
1978
1979#[doc(hidden)]
1980#[derive(Copy, Clone, Eq, PartialEq)]
1981pub struct Uart2TflReg_SPEC;
1982impl crate::sealed::RegSpec for Uart2TflReg_SPEC {
1983 type DataType = u16;
1984}
1985
1986#[doc = "Transmit FIFO Level"]
1987pub type Uart2TflReg = crate::RegValueT<Uart2TflReg_SPEC>;
1988
1989impl Uart2TflReg {
1990 #[doc = "Transmit FIFO Level.\nThis is indicates the number of data entries in the transmit FIFO."]
1991 #[inline(always)]
1992 pub fn uart_transmit_fifo_level(
1993 self,
1994 ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Uart2TflReg_SPEC, crate::common::R>
1995 {
1996 crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Uart2TflReg_SPEC,crate::common::R>::from_register(self,0)
1997 }
1998}
1999impl ::core::default::Default for Uart2TflReg {
2000 #[inline(always)]
2001 fn default() -> Uart2TflReg {
2002 <crate::RegValueT<Uart2TflReg_SPEC> as RegisterValue<_>>::new(0)
2003 }
2004}
2005
2006#[doc(hidden)]
2007#[derive(Copy, Clone, Eq, PartialEq)]
2008pub struct Uart2UcvHighReg_SPEC;
2009impl crate::sealed::RegSpec for Uart2UcvHighReg_SPEC {
2010 type DataType = u16;
2011}
2012
2013#[doc = "Component Version"]
2014pub type Uart2UcvHighReg = crate::RegValueT<Uart2UcvHighReg_SPEC>;
2015
2016impl Uart2UcvHighReg {
2017 #[doc = "Component Version"]
2018 #[inline(always)]
2019 pub fn ucv(
2020 self,
2021 ) -> crate::common::RegisterField<
2022 0,
2023 0xffff,
2024 1,
2025 0,
2026 u16,
2027 u16,
2028 Uart2UcvHighReg_SPEC,
2029 crate::common::R,
2030 > {
2031 crate::common::RegisterField::<
2032 0,
2033 0xffff,
2034 1,
2035 0,
2036 u16,
2037 u16,
2038 Uart2UcvHighReg_SPEC,
2039 crate::common::R,
2040 >::from_register(self, 0)
2041 }
2042}
2043impl ::core::default::Default for Uart2UcvHighReg {
2044 #[inline(always)]
2045 fn default() -> Uart2UcvHighReg {
2046 <crate::RegValueT<Uart2UcvHighReg_SPEC> as RegisterValue<_>>::new(13105)
2047 }
2048}
2049
2050#[doc(hidden)]
2051#[derive(Copy, Clone, Eq, PartialEq)]
2052pub struct Uart2UcvReg_SPEC;
2053impl crate::sealed::RegSpec for Uart2UcvReg_SPEC {
2054 type DataType = u16;
2055}
2056
2057#[doc = "Component Version"]
2058pub type Uart2UcvReg = crate::RegValueT<Uart2UcvReg_SPEC>;
2059
2060impl Uart2UcvReg {
2061 #[doc = "Component Version"]
2062 #[inline(always)]
2063 pub fn ucv(
2064 self,
2065 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Uart2UcvReg_SPEC, crate::common::R>
2066 {
2067 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Uart2UcvReg_SPEC,crate::common::R>::from_register(self,0)
2068 }
2069}
2070impl ::core::default::Default for Uart2UcvReg {
2071 #[inline(always)]
2072 fn default() -> Uart2UcvReg {
2073 <crate::RegValueT<Uart2UcvReg_SPEC> as RegisterValue<_>>::new(13610)
2074 }
2075}
2076
2077#[doc(hidden)]
2078#[derive(Copy, Clone, Eq, PartialEq)]
2079pub struct Uart2UsrReg_SPEC;
2080impl crate::sealed::RegSpec for Uart2UsrReg_SPEC {
2081 type DataType = u16;
2082}
2083
2084#[doc = "UART Status Register"]
2085pub type Uart2UsrReg = crate::RegValueT<Uart2UsrReg_SPEC>;
2086
2087impl Uart2UsrReg {
2088 #[doc = "Receive FIFO Full.\nThis is used to indicate that the receive FIFO is completely full.\n0 = Receive FIFO not full\n1 = Receive FIFO Full\nThis bit is cleared when the RX FIFO is no longer full."]
2089 #[inline(always)]
2090 pub fn uart_rff(
2091 self,
2092 ) -> crate::common::RegisterFieldBool<4, 1, 0, Uart2UsrReg_SPEC, crate::common::R> {
2093 crate::common::RegisterFieldBool::<4,1,0,Uart2UsrReg_SPEC,crate::common::R>::from_register(self,0)
2094 }
2095
2096 #[doc = "Receive FIFO Not Empty.\nThis is used to indicate that the receive FIFO contains one or more entries.\n0 = Receive FIFO is empty\n1 = Receive FIFO is not empty\nThis bit is cleared when the RX FIFO is empty."]
2097 #[inline(always)]
2098 pub fn uart_rfne(
2099 self,
2100 ) -> crate::common::RegisterFieldBool<3, 1, 0, Uart2UsrReg_SPEC, crate::common::R> {
2101 crate::common::RegisterFieldBool::<3,1,0,Uart2UsrReg_SPEC,crate::common::R>::from_register(self,0)
2102 }
2103
2104 #[doc = "Transmit FIFO Empty.\nThis is used to indicate that the transmit FIFO is completely empty.\n0 = Transmit FIFO is not empty\n1 = Transmit FIFO is empty\nThis bit is cleared when the TX FIFO is no longer empty."]
2105 #[inline(always)]
2106 pub fn uart_tfe(
2107 self,
2108 ) -> crate::common::RegisterFieldBool<2, 1, 0, Uart2UsrReg_SPEC, crate::common::R> {
2109 crate::common::RegisterFieldBool::<2,1,0,Uart2UsrReg_SPEC,crate::common::R>::from_register(self,0)
2110 }
2111
2112 #[doc = "Transmit FIFO Not Full.\nThis is used to indicate that the transmit FIFO in not full.\n0 = Transmit FIFO is full\n1 = Transmit FIFO is not full\nThis bit is cleared when the TX FIFO is full."]
2113 #[inline(always)]
2114 pub fn uart_tfnf(
2115 self,
2116 ) -> crate::common::RegisterFieldBool<1, 1, 0, Uart2UsrReg_SPEC, crate::common::R> {
2117 crate::common::RegisterFieldBool::<1,1,0,Uart2UsrReg_SPEC,crate::common::R>::from_register(self,0)
2118 }
2119
2120 #[doc = "UART Busy. This indicates that a serial transfer is in progress, when cleared indicates that the DW_apb_uart is idle or inactive. 0 - DW_apb_uart is idle or inactive 1 - DW_apb_uart is busy (actively transferring data) Note that it is possible for the UART Busy bit to be cleared even though a new character may have been sent from another device. That is, if the DW_apb_uart has no data in the THR and RBR and there is no transmission in progress and a start bit of a new character has just reached the DW_apb_uart. This is due to the fact that a valid start is not seen until the middle of the bit period and this duration is dependent on the baud divisor that has been programmed. If a second system clock has been implemented (CLOCK_MODE == Enabled) the assertion of this bit will also be delayed by several cycles of the slower clock."]
2121 #[inline(always)]
2122 pub fn uart_busy(
2123 self,
2124 ) -> crate::common::RegisterFieldBool<0, 1, 0, Uart2UsrReg_SPEC, crate::common::R> {
2125 crate::common::RegisterFieldBool::<0,1,0,Uart2UsrReg_SPEC,crate::common::R>::from_register(self,0)
2126 }
2127}
2128impl ::core::default::Default for Uart2UsrReg {
2129 #[inline(always)]
2130 fn default() -> Uart2UsrReg {
2131 <crate::RegValueT<Uart2UsrReg_SPEC> as RegisterValue<_>>::new(6)
2132 }
2133}