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"Serial Communication Interface 0"]
28unsafe impl ::core::marker::Send for super::Sci0 {}
29unsafe impl ::core::marker::Sync for super::Sci0 {}
30impl super::Sci0 {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Serial Mode Register (SCMR.SMIF = 0)"]
38 #[inline(always)]
39 pub const fn smr(&self) -> &'static crate::common::Reg<self::Smr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Smr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Serial mode register (SCMR.SMIF = 1)"]
48 #[inline(always)]
49 pub const fn smr_smci(
50 &self,
51 ) -> &'static crate::common::Reg<self::SmrSmci_SPEC, crate::common::RW> {
52 unsafe {
53 crate::common::Reg::<self::SmrSmci_SPEC, crate::common::RW>::from_ptr(
54 self._svd2pac_as_ptr().add(0usize),
55 )
56 }
57 }
58
59 #[doc = "Bit Rate Register"]
60 #[inline(always)]
61 pub const fn brr(&self) -> &'static crate::common::Reg<self::Brr_SPEC, crate::common::RW> {
62 unsafe {
63 crate::common::Reg::<self::Brr_SPEC, crate::common::RW>::from_ptr(
64 self._svd2pac_as_ptr().add(1usize),
65 )
66 }
67 }
68
69 #[doc = "Serial Control Register (SCMR.SMIF = 0)"]
70 #[inline(always)]
71 pub const fn scr(&self) -> &'static crate::common::Reg<self::Scr_SPEC, crate::common::RW> {
72 unsafe {
73 crate::common::Reg::<self::Scr_SPEC, crate::common::RW>::from_ptr(
74 self._svd2pac_as_ptr().add(2usize),
75 )
76 }
77 }
78
79 #[doc = "Serial Control Register (SCMR.SMIF =1)"]
80 #[inline(always)]
81 pub const fn scr_smci(
82 &self,
83 ) -> &'static crate::common::Reg<self::ScrSmci_SPEC, crate::common::RW> {
84 unsafe {
85 crate::common::Reg::<self::ScrSmci_SPEC, crate::common::RW>::from_ptr(
86 self._svd2pac_as_ptr().add(2usize),
87 )
88 }
89 }
90
91 #[doc = "Transmit Data Register"]
92 #[inline(always)]
93 pub const fn tdr(&self) -> &'static crate::common::Reg<self::Tdr_SPEC, crate::common::RW> {
94 unsafe {
95 crate::common::Reg::<self::Tdr_SPEC, crate::common::RW>::from_ptr(
96 self._svd2pac_as_ptr().add(3usize),
97 )
98 }
99 }
100
101 #[doc = "Serial Status Register(SCMR.SMIF = 0 and FCR.FM=0)"]
102 #[inline(always)]
103 pub const fn ssr(&self) -> &'static crate::common::Reg<self::Ssr_SPEC, crate::common::RW> {
104 unsafe {
105 crate::common::Reg::<self::Ssr_SPEC, crate::common::RW>::from_ptr(
106 self._svd2pac_as_ptr().add(4usize),
107 )
108 }
109 }
110
111 #[doc = "Serial Status Register(SCMR.SMIF = 0 and FCR.FM=1)"]
112 #[inline(always)]
113 pub const fn ssr_fifo(
114 &self,
115 ) -> &'static crate::common::Reg<self::SsrFifo_SPEC, crate::common::RW> {
116 unsafe {
117 crate::common::Reg::<self::SsrFifo_SPEC, crate::common::RW>::from_ptr(
118 self._svd2pac_as_ptr().add(4usize),
119 )
120 }
121 }
122
123 #[doc = "Serial Status Register(SCMR.SMIF = 1)"]
124 #[inline(always)]
125 pub const fn ssr_smci(
126 &self,
127 ) -> &'static crate::common::Reg<self::SsrSmci_SPEC, crate::common::RW> {
128 unsafe {
129 crate::common::Reg::<self::SsrSmci_SPEC, crate::common::RW>::from_ptr(
130 self._svd2pac_as_ptr().add(4usize),
131 )
132 }
133 }
134
135 #[doc = "Receive Data Register"]
136 #[inline(always)]
137 pub const fn rdr(&self) -> &'static crate::common::Reg<self::Rdr_SPEC, crate::common::R> {
138 unsafe {
139 crate::common::Reg::<self::Rdr_SPEC, crate::common::R>::from_ptr(
140 self._svd2pac_as_ptr().add(5usize),
141 )
142 }
143 }
144
145 #[doc = "Smart Card Mode Register"]
146 #[inline(always)]
147 pub const fn scmr(&self) -> &'static crate::common::Reg<self::Scmr_SPEC, crate::common::RW> {
148 unsafe {
149 crate::common::Reg::<self::Scmr_SPEC, crate::common::RW>::from_ptr(
150 self._svd2pac_as_ptr().add(6usize),
151 )
152 }
153 }
154
155 #[doc = "Serial Extended Mode Register"]
156 #[inline(always)]
157 pub const fn semr(&self) -> &'static crate::common::Reg<self::Semr_SPEC, crate::common::RW> {
158 unsafe {
159 crate::common::Reg::<self::Semr_SPEC, crate::common::RW>::from_ptr(
160 self._svd2pac_as_ptr().add(7usize),
161 )
162 }
163 }
164
165 #[doc = "Noise Filter Setting Register"]
166 #[inline(always)]
167 pub const fn snfr(&self) -> &'static crate::common::Reg<self::Snfr_SPEC, crate::common::RW> {
168 unsafe {
169 crate::common::Reg::<self::Snfr_SPEC, crate::common::RW>::from_ptr(
170 self._svd2pac_as_ptr().add(8usize),
171 )
172 }
173 }
174
175 #[doc = "I2C Mode Register 1"]
176 #[inline(always)]
177 pub const fn simr1(&self) -> &'static crate::common::Reg<self::Simr1_SPEC, crate::common::RW> {
178 unsafe {
179 crate::common::Reg::<self::Simr1_SPEC, crate::common::RW>::from_ptr(
180 self._svd2pac_as_ptr().add(9usize),
181 )
182 }
183 }
184
185 #[doc = "I2C Mode Register 2"]
186 #[inline(always)]
187 pub const fn simr2(&self) -> &'static crate::common::Reg<self::Simr2_SPEC, crate::common::RW> {
188 unsafe {
189 crate::common::Reg::<self::Simr2_SPEC, crate::common::RW>::from_ptr(
190 self._svd2pac_as_ptr().add(10usize),
191 )
192 }
193 }
194
195 #[doc = "IIC Mode Register 3"]
196 #[inline(always)]
197 pub const fn simr3(&self) -> &'static crate::common::Reg<self::Simr3_SPEC, crate::common::RW> {
198 unsafe {
199 crate::common::Reg::<self::Simr3_SPEC, crate::common::RW>::from_ptr(
200 self._svd2pac_as_ptr().add(11usize),
201 )
202 }
203 }
204
205 #[doc = "IIC Status Register"]
206 #[inline(always)]
207 pub const fn sisr(&self) -> &'static crate::common::Reg<self::Sisr_SPEC, crate::common::R> {
208 unsafe {
209 crate::common::Reg::<self::Sisr_SPEC, crate::common::R>::from_ptr(
210 self._svd2pac_as_ptr().add(12usize),
211 )
212 }
213 }
214
215 #[doc = "SPI Mode Register"]
216 #[inline(always)]
217 pub const fn spmr(&self) -> &'static crate::common::Reg<self::Spmr_SPEC, crate::common::RW> {
218 unsafe {
219 crate::common::Reg::<self::Spmr_SPEC, crate::common::RW>::from_ptr(
220 self._svd2pac_as_ptr().add(13usize),
221 )
222 }
223 }
224
225 #[doc = "Transmit 9-bit Data Register"]
226 #[inline(always)]
227 pub const fn tdrhl(&self) -> &'static crate::common::Reg<self::Tdrhl_SPEC, crate::common::RW> {
228 unsafe {
229 crate::common::Reg::<self::Tdrhl_SPEC, crate::common::RW>::from_ptr(
230 self._svd2pac_as_ptr().add(14usize),
231 )
232 }
233 }
234
235 #[doc = "Transmit FIFO Data Register HL"]
236 #[inline(always)]
237 pub const fn ftdrhl(&self) -> &'static crate::common::Reg<self::Ftdrhl_SPEC, crate::common::W> {
238 unsafe {
239 crate::common::Reg::<self::Ftdrhl_SPEC, crate::common::W>::from_ptr(
240 self._svd2pac_as_ptr().add(14usize),
241 )
242 }
243 }
244
245 #[doc = "Transmit FIFO Data Register H"]
246 #[inline(always)]
247 pub const fn ftdrh(&self) -> &'static crate::common::Reg<self::Ftdrh_SPEC, crate::common::W> {
248 unsafe {
249 crate::common::Reg::<self::Ftdrh_SPEC, crate::common::W>::from_ptr(
250 self._svd2pac_as_ptr().add(14usize),
251 )
252 }
253 }
254
255 #[doc = "Transmit FIFO Data Register L"]
256 #[inline(always)]
257 pub const fn ftdrl(&self) -> &'static crate::common::Reg<self::Ftdrl_SPEC, crate::common::W> {
258 unsafe {
259 crate::common::Reg::<self::Ftdrl_SPEC, crate::common::W>::from_ptr(
260 self._svd2pac_as_ptr().add(15usize),
261 )
262 }
263 }
264
265 #[doc = "Receive 9-bit Data Register"]
266 #[inline(always)]
267 pub const fn rdrhl(&self) -> &'static crate::common::Reg<self::Rdrhl_SPEC, crate::common::R> {
268 unsafe {
269 crate::common::Reg::<self::Rdrhl_SPEC, crate::common::R>::from_ptr(
270 self._svd2pac_as_ptr().add(16usize),
271 )
272 }
273 }
274
275 #[doc = "Receive FIFO Data Register HL"]
276 #[inline(always)]
277 pub const fn frdrhl(&self) -> &'static crate::common::Reg<self::Frdrhl_SPEC, crate::common::R> {
278 unsafe {
279 crate::common::Reg::<self::Frdrhl_SPEC, crate::common::R>::from_ptr(
280 self._svd2pac_as_ptr().add(16usize),
281 )
282 }
283 }
284
285 #[doc = "Receive FIFO Data Register H"]
286 #[inline(always)]
287 pub const fn frdrh(&self) -> &'static crate::common::Reg<self::Frdrh_SPEC, crate::common::R> {
288 unsafe {
289 crate::common::Reg::<self::Frdrh_SPEC, crate::common::R>::from_ptr(
290 self._svd2pac_as_ptr().add(16usize),
291 )
292 }
293 }
294
295 #[doc = "Receive FIFO Data Register L"]
296 #[inline(always)]
297 pub const fn frdrl(&self) -> &'static crate::common::Reg<self::Frdrl_SPEC, crate::common::R> {
298 unsafe {
299 crate::common::Reg::<self::Frdrl_SPEC, crate::common::R>::from_ptr(
300 self._svd2pac_as_ptr().add(17usize),
301 )
302 }
303 }
304
305 #[doc = "Modulation Duty Register"]
306 #[inline(always)]
307 pub const fn mddr(&self) -> &'static crate::common::Reg<self::Mddr_SPEC, crate::common::RW> {
308 unsafe {
309 crate::common::Reg::<self::Mddr_SPEC, crate::common::RW>::from_ptr(
310 self._svd2pac_as_ptr().add(18usize),
311 )
312 }
313 }
314
315 #[doc = "Data Compare Match Control Register"]
316 #[inline(always)]
317 pub const fn dccr(&self) -> &'static crate::common::Reg<self::Dccr_SPEC, crate::common::RW> {
318 unsafe {
319 crate::common::Reg::<self::Dccr_SPEC, crate::common::RW>::from_ptr(
320 self._svd2pac_as_ptr().add(19usize),
321 )
322 }
323 }
324
325 #[doc = "FIFO Control Register"]
326 #[inline(always)]
327 pub const fn fcr(&self) -> &'static crate::common::Reg<self::Fcr_SPEC, crate::common::RW> {
328 unsafe {
329 crate::common::Reg::<self::Fcr_SPEC, crate::common::RW>::from_ptr(
330 self._svd2pac_as_ptr().add(20usize),
331 )
332 }
333 }
334
335 #[doc = "FIFO Data Count Register"]
336 #[inline(always)]
337 pub const fn fdr(&self) -> &'static crate::common::Reg<self::Fdr_SPEC, crate::common::R> {
338 unsafe {
339 crate::common::Reg::<self::Fdr_SPEC, crate::common::R>::from_ptr(
340 self._svd2pac_as_ptr().add(22usize),
341 )
342 }
343 }
344
345 #[doc = "Line Status Register"]
346 #[inline(always)]
347 pub const fn lsr(&self) -> &'static crate::common::Reg<self::Lsr_SPEC, crate::common::R> {
348 unsafe {
349 crate::common::Reg::<self::Lsr_SPEC, crate::common::R>::from_ptr(
350 self._svd2pac_as_ptr().add(24usize),
351 )
352 }
353 }
354
355 #[doc = "Compare Match Data Register"]
356 #[inline(always)]
357 pub const fn cdr(&self) -> &'static crate::common::Reg<self::Cdr_SPEC, crate::common::RW> {
358 unsafe {
359 crate::common::Reg::<self::Cdr_SPEC, crate::common::RW>::from_ptr(
360 self._svd2pac_as_ptr().add(26usize),
361 )
362 }
363 }
364
365 #[doc = "Serial Port Register"]
366 #[inline(always)]
367 pub const fn sptr(&self) -> &'static crate::common::Reg<self::Sptr_SPEC, crate::common::RW> {
368 unsafe {
369 crate::common::Reg::<self::Sptr_SPEC, crate::common::RW>::from_ptr(
370 self._svd2pac_as_ptr().add(28usize),
371 )
372 }
373 }
374}
375#[doc(hidden)]
376#[derive(Copy, Clone, Eq, PartialEq)]
377pub struct Smr_SPEC;
378impl crate::sealed::RegSpec for Smr_SPEC {
379 type DataType = u8;
380}
381
382#[doc = "Serial Mode Register (SCMR.SMIF = 0)"]
383pub type Smr = crate::RegValueT<Smr_SPEC>;
384
385impl Smr {
386 #[doc = "Communications Mode"]
387 #[inline(always)]
388 pub fn cm(
389 self,
390 ) -> crate::common::RegisterField<7, 0x1, 1, 0, smr::Cm, smr::Cm, Smr_SPEC, crate::common::RW>
391 {
392 crate::common::RegisterField::<7,0x1,1,0,smr::Cm,smr::Cm,Smr_SPEC,crate::common::RW>::from_register(self,0)
393 }
394
395 #[doc = "Character Length(Valid only in asynchronous mode)"]
396 #[inline(always)]
397 pub fn chr(
398 self,
399 ) -> crate::common::RegisterField<6, 0x1, 1, 0, smr::Chr, smr::Chr, Smr_SPEC, crate::common::RW>
400 {
401 crate::common::RegisterField::<6,0x1,1,0,smr::Chr,smr::Chr,Smr_SPEC,crate::common::RW>::from_register(self,0)
402 }
403
404 #[doc = "Parity Enable(Valid only in asynchronous mode)"]
405 #[inline(always)]
406 pub fn pe(
407 self,
408 ) -> crate::common::RegisterField<5, 0x1, 1, 0, smr::Pe, smr::Pe, Smr_SPEC, crate::common::RW>
409 {
410 crate::common::RegisterField::<5,0x1,1,0,smr::Pe,smr::Pe,Smr_SPEC,crate::common::RW>::from_register(self,0)
411 }
412
413 #[doc = "Parity Mode (Valid only when the PE bit is 1)"]
414 #[inline(always)]
415 pub fn pm(
416 self,
417 ) -> crate::common::RegisterField<4, 0x1, 1, 0, smr::Pm, smr::Pm, Smr_SPEC, crate::common::RW>
418 {
419 crate::common::RegisterField::<4,0x1,1,0,smr::Pm,smr::Pm,Smr_SPEC,crate::common::RW>::from_register(self,0)
420 }
421
422 #[doc = "Stop Bit Length(Valid only in asynchronous mode)"]
423 #[inline(always)]
424 pub fn stop(
425 self,
426 ) -> crate::common::RegisterField<3, 0x1, 1, 0, smr::Stop, smr::Stop, Smr_SPEC, crate::common::RW>
427 {
428 crate::common::RegisterField::<
429 3,
430 0x1,
431 1,
432 0,
433 smr::Stop,
434 smr::Stop,
435 Smr_SPEC,
436 crate::common::RW,
437 >::from_register(self, 0)
438 }
439
440 #[doc = "Multi-Processor Mode(Valid only in asynchronous mode)"]
441 #[inline(always)]
442 pub fn mp(
443 self,
444 ) -> crate::common::RegisterField<2, 0x1, 1, 0, smr::Mp, smr::Mp, Smr_SPEC, crate::common::RW>
445 {
446 crate::common::RegisterField::<2,0x1,1,0,smr::Mp,smr::Mp,Smr_SPEC,crate::common::RW>::from_register(self,0)
447 }
448
449 #[doc = "Clock Select"]
450 #[inline(always)]
451 pub fn cks(
452 self,
453 ) -> crate::common::RegisterField<0, 0x3, 1, 0, smr::Cks, smr::Cks, Smr_SPEC, crate::common::RW>
454 {
455 crate::common::RegisterField::<0,0x3,1,0,smr::Cks,smr::Cks,Smr_SPEC,crate::common::RW>::from_register(self,0)
456 }
457}
458impl ::core::default::Default for Smr {
459 #[inline(always)]
460 fn default() -> Smr {
461 <crate::RegValueT<Smr_SPEC> as RegisterValue<_>>::new(0)
462 }
463}
464pub mod smr {
465
466 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
467 pub struct Cm_SPEC;
468 pub type Cm = crate::EnumBitfieldStruct<u8, Cm_SPEC>;
469 impl Cm {
470 #[doc = "Asynchronous mode or simple I2C mode"]
471 pub const _0: Self = Self::new(0);
472
473 #[doc = "Clock synchronous mode"]
474 pub const _1: Self = Self::new(1);
475 }
476 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
477 pub struct Chr_SPEC;
478 pub type Chr = crate::EnumBitfieldStruct<u8, Chr_SPEC>;
479 impl Chr {
480 #[doc = "Transmit/receive in 9-bit data length(SCMR.CHR1=0) / in 8bit data length(SCMR.CHR1=1)"]
481 pub const _0: Self = Self::new(0);
482
483 #[doc = "Transmit/receive in 9-bit data length(SCMR.CHR1=0) / in 7bit data length(SCMR.CHR1=1)"]
484 pub const _1: Self = Self::new(1);
485 }
486 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
487 pub struct Pe_SPEC;
488 pub type Pe = crate::EnumBitfieldStruct<u8, Pe_SPEC>;
489 impl Pe {
490 #[doc = "Parity bit addition is not performed (transmitting) / Parity bit checking is not performed ( receiving )"]
491 pub const _0: Self = Self::new(0);
492
493 #[doc = "The parity bit is added (transmitting) / The parity bit is checked (receiving)"]
494 pub const _1: Self = Self::new(1);
495 }
496 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
497 pub struct Pm_SPEC;
498 pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
499 impl Pm {
500 #[doc = "Selects even parity"]
501 pub const _0: Self = Self::new(0);
502
503 #[doc = "Selects odd parity"]
504 pub const _1: Self = Self::new(1);
505 }
506 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
507 pub struct Stop_SPEC;
508 pub type Stop = crate::EnumBitfieldStruct<u8, Stop_SPEC>;
509 impl Stop {
510 #[doc = "1 stop bit"]
511 pub const _0: Self = Self::new(0);
512
513 #[doc = "2 stop bits"]
514 pub const _1: Self = Self::new(1);
515 }
516 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
517 pub struct Mp_SPEC;
518 pub type Mp = crate::EnumBitfieldStruct<u8, Mp_SPEC>;
519 impl Mp {
520 #[doc = "Multi-processor communications function is disabled"]
521 pub const _0: Self = Self::new(0);
522
523 #[doc = "Multi-processor communications function is enabled"]
524 pub const _1: Self = Self::new(1);
525 }
526 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
527 pub struct Cks_SPEC;
528 pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
529 impl Cks {
530 #[doc = "PCLK clock"]
531 pub const _00: Self = Self::new(0);
532
533 #[doc = "PCLK/4 clock"]
534 pub const _01: Self = Self::new(1);
535
536 #[doc = "PCLK/16 clock"]
537 pub const _10: Self = Self::new(2);
538
539 #[doc = "PCLK/64 clock"]
540 pub const _11: Self = Self::new(3);
541 }
542}
543#[doc(hidden)]
544#[derive(Copy, Clone, Eq, PartialEq)]
545pub struct SmrSmci_SPEC;
546impl crate::sealed::RegSpec for SmrSmci_SPEC {
547 type DataType = u8;
548}
549
550#[doc = "Serial mode register (SCMR.SMIF = 1)"]
551pub type SmrSmci = crate::RegValueT<SmrSmci_SPEC>;
552
553impl SmrSmci {
554 #[doc = "GSM Mode"]
555 #[inline(always)]
556 pub fn gm(
557 self,
558 ) -> crate::common::RegisterField<
559 7,
560 0x1,
561 1,
562 0,
563 smr_smci::Gm,
564 smr_smci::Gm,
565 SmrSmci_SPEC,
566 crate::common::RW,
567 > {
568 crate::common::RegisterField::<
569 7,
570 0x1,
571 1,
572 0,
573 smr_smci::Gm,
574 smr_smci::Gm,
575 SmrSmci_SPEC,
576 crate::common::RW,
577 >::from_register(self, 0)
578 }
579
580 #[doc = "Block Transfer Mode"]
581 #[inline(always)]
582 pub fn blk(
583 self,
584 ) -> crate::common::RegisterField<
585 6,
586 0x1,
587 1,
588 0,
589 smr_smci::Blk,
590 smr_smci::Blk,
591 SmrSmci_SPEC,
592 crate::common::RW,
593 > {
594 crate::common::RegisterField::<
595 6,
596 0x1,
597 1,
598 0,
599 smr_smci::Blk,
600 smr_smci::Blk,
601 SmrSmci_SPEC,
602 crate::common::RW,
603 >::from_register(self, 0)
604 }
605
606 #[doc = "Parity Enable(Valid only in asynchronous mode)"]
607 #[inline(always)]
608 pub fn pe(
609 self,
610 ) -> crate::common::RegisterField<
611 5,
612 0x1,
613 1,
614 0,
615 smr_smci::Pe,
616 smr_smci::Pe,
617 SmrSmci_SPEC,
618 crate::common::RW,
619 > {
620 crate::common::RegisterField::<
621 5,
622 0x1,
623 1,
624 0,
625 smr_smci::Pe,
626 smr_smci::Pe,
627 SmrSmci_SPEC,
628 crate::common::RW,
629 >::from_register(self, 0)
630 }
631
632 #[doc = "Parity Mode (Valid only when the PE bit is 1)"]
633 #[inline(always)]
634 pub fn pm(
635 self,
636 ) -> crate::common::RegisterField<
637 4,
638 0x1,
639 1,
640 0,
641 smr_smci::Pm,
642 smr_smci::Pm,
643 SmrSmci_SPEC,
644 crate::common::RW,
645 > {
646 crate::common::RegisterField::<
647 4,
648 0x1,
649 1,
650 0,
651 smr_smci::Pm,
652 smr_smci::Pm,
653 SmrSmci_SPEC,
654 crate::common::RW,
655 >::from_register(self, 0)
656 }
657
658 #[doc = "Base Clock Pulse"]
659 #[inline(always)]
660 pub fn bcp(
661 self,
662 ) -> crate::common::RegisterField<
663 2,
664 0x3,
665 1,
666 0,
667 smr_smci::Bcp,
668 smr_smci::Bcp,
669 SmrSmci_SPEC,
670 crate::common::RW,
671 > {
672 crate::common::RegisterField::<
673 2,
674 0x3,
675 1,
676 0,
677 smr_smci::Bcp,
678 smr_smci::Bcp,
679 SmrSmci_SPEC,
680 crate::common::RW,
681 >::from_register(self, 0)
682 }
683
684 #[doc = "Clock Select"]
685 #[inline(always)]
686 pub fn cks(
687 self,
688 ) -> crate::common::RegisterField<
689 0,
690 0x3,
691 1,
692 0,
693 smr_smci::Cks,
694 smr_smci::Cks,
695 SmrSmci_SPEC,
696 crate::common::RW,
697 > {
698 crate::common::RegisterField::<
699 0,
700 0x3,
701 1,
702 0,
703 smr_smci::Cks,
704 smr_smci::Cks,
705 SmrSmci_SPEC,
706 crate::common::RW,
707 >::from_register(self, 0)
708 }
709}
710impl ::core::default::Default for SmrSmci {
711 #[inline(always)]
712 fn default() -> SmrSmci {
713 <crate::RegValueT<SmrSmci_SPEC> as RegisterValue<_>>::new(0)
714 }
715}
716pub mod smr_smci {
717
718 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
719 pub struct Gm_SPEC;
720 pub type Gm = crate::EnumBitfieldStruct<u8, Gm_SPEC>;
721 impl Gm {
722 #[doc = "Normal mode operation"]
723 pub const _0: Self = Self::new(0);
724
725 #[doc = "GSM mode operation"]
726 pub const _1: Self = Self::new(1);
727 }
728 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
729 pub struct Blk_SPEC;
730 pub type Blk = crate::EnumBitfieldStruct<u8, Blk_SPEC>;
731 impl Blk {
732 #[doc = "Normal mode operation"]
733 pub const _0: Self = Self::new(0);
734
735 #[doc = "Block transfer mode operation"]
736 pub const _1: Self = Self::new(1);
737 }
738 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
739 pub struct Pe_SPEC;
740 pub type Pe = crate::EnumBitfieldStruct<u8, Pe_SPEC>;
741 impl Pe {
742 #[doc = "Setting Prohibited"]
743 pub const _0: Self = Self::new(0);
744
745 #[doc = "Set this bit to 1 in smart card interface mode."]
746 pub const _1: Self = Self::new(1);
747 }
748 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
749 pub struct Pm_SPEC;
750 pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
751 impl Pm {
752 #[doc = "Selects even parity"]
753 pub const _0: Self = Self::new(0);
754
755 #[doc = "Selects odd parity"]
756 pub const _1: Self = Self::new(1);
757 }
758 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
759 pub struct Bcp_SPEC;
760 pub type Bcp = crate::EnumBitfieldStruct<u8, Bcp_SPEC>;
761 impl Bcp {
762 #[doc = "93 clock cycles(S=93) (SCMR.BCP2=0) / 32 clock cycles(S=32) (SCMR.BCP2=1)"]
763 pub const _00: Self = Self::new(0);
764
765 #[doc = "128 clock cycles(S=128) (SCMR.BCP2=0) / 64 clock cycles(S=64) (SCMR.BCP2=1)"]
766 pub const _01: Self = Self::new(1);
767
768 #[doc = "186 clock cycles(S=186) (SCMR.BCP2=0) / 372 clock cycles(S=372) (SCMR.BCP2=1)"]
769 pub const _10: Self = Self::new(2);
770
771 #[doc = "512 clock cycles(S=512) (SCMR.BCP2=0) / 256 clock cycles(S=256) (SCMR.BCP2=1)"]
772 pub const _11: Self = Self::new(3);
773 }
774 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
775 pub struct Cks_SPEC;
776 pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
777 impl Cks {
778 #[doc = "PCLK clock"]
779 pub const _00: Self = Self::new(0);
780
781 #[doc = "PCLK/4 clock"]
782 pub const _01: Self = Self::new(1);
783
784 #[doc = "PCLK/16 clock"]
785 pub const _10: Self = Self::new(2);
786
787 #[doc = "PCLK/64 clock"]
788 pub const _11: Self = Self::new(3);
789 }
790}
791#[doc(hidden)]
792#[derive(Copy, Clone, Eq, PartialEq)]
793pub struct Brr_SPEC;
794impl crate::sealed::RegSpec for Brr_SPEC {
795 type DataType = u8;
796}
797
798#[doc = "Bit Rate Register"]
799pub type Brr = crate::RegValueT<Brr_SPEC>;
800
801impl Brr {
802 #[doc = "BRR is an 8-bit register that adjusts the bit rate."]
803 #[inline(always)]
804 pub fn brr(
805 self,
806 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Brr_SPEC, crate::common::RW> {
807 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Brr_SPEC,crate::common::RW>::from_register(self,0)
808 }
809}
810impl ::core::default::Default for Brr {
811 #[inline(always)]
812 fn default() -> Brr {
813 <crate::RegValueT<Brr_SPEC> as RegisterValue<_>>::new(255)
814 }
815}
816
817#[doc(hidden)]
818#[derive(Copy, Clone, Eq, PartialEq)]
819pub struct Scr_SPEC;
820impl crate::sealed::RegSpec for Scr_SPEC {
821 type DataType = u8;
822}
823
824#[doc = "Serial Control Register (SCMR.SMIF = 0)"]
825pub type Scr = crate::RegValueT<Scr_SPEC>;
826
827impl Scr {
828 #[doc = "Transmit Interrupt Enable"]
829 #[inline(always)]
830 pub fn tie(
831 self,
832 ) -> crate::common::RegisterField<7, 0x1, 1, 0, scr::Tie, scr::Tie, Scr_SPEC, crate::common::RW>
833 {
834 crate::common::RegisterField::<7,0x1,1,0,scr::Tie,scr::Tie,Scr_SPEC,crate::common::RW>::from_register(self,0)
835 }
836
837 #[doc = "Receive Interrupt Enable"]
838 #[inline(always)]
839 pub fn rie(
840 self,
841 ) -> crate::common::RegisterField<6, 0x1, 1, 0, scr::Rie, scr::Rie, Scr_SPEC, crate::common::RW>
842 {
843 crate::common::RegisterField::<6,0x1,1,0,scr::Rie,scr::Rie,Scr_SPEC,crate::common::RW>::from_register(self,0)
844 }
845
846 #[doc = "Transmit Enable"]
847 #[inline(always)]
848 pub fn te(
849 self,
850 ) -> crate::common::RegisterField<5, 0x1, 1, 0, scr::Te, scr::Te, Scr_SPEC, crate::common::RW>
851 {
852 crate::common::RegisterField::<5,0x1,1,0,scr::Te,scr::Te,Scr_SPEC,crate::common::RW>::from_register(self,0)
853 }
854
855 #[doc = "Receive Enable"]
856 #[inline(always)]
857 pub fn re(
858 self,
859 ) -> crate::common::RegisterField<4, 0x1, 1, 0, scr::Re, scr::Re, Scr_SPEC, crate::common::RW>
860 {
861 crate::common::RegisterField::<4,0x1,1,0,scr::Re,scr::Re,Scr_SPEC,crate::common::RW>::from_register(self,0)
862 }
863
864 #[doc = "Multi-Processor Interrupt Enable(Valid in asynchronous mode when SMR.MP = 1)"]
865 #[inline(always)]
866 pub fn mpie(
867 self,
868 ) -> crate::common::RegisterField<3, 0x1, 1, 0, scr::Mpie, scr::Mpie, Scr_SPEC, crate::common::RW>
869 {
870 crate::common::RegisterField::<
871 3,
872 0x1,
873 1,
874 0,
875 scr::Mpie,
876 scr::Mpie,
877 Scr_SPEC,
878 crate::common::RW,
879 >::from_register(self, 0)
880 }
881
882 #[doc = "Transmit End Interrupt Enable"]
883 #[inline(always)]
884 pub fn teie(
885 self,
886 ) -> crate::common::RegisterField<2, 0x1, 1, 0, scr::Teie, scr::Teie, Scr_SPEC, crate::common::RW>
887 {
888 crate::common::RegisterField::<
889 2,
890 0x1,
891 1,
892 0,
893 scr::Teie,
894 scr::Teie,
895 Scr_SPEC,
896 crate::common::RW,
897 >::from_register(self, 0)
898 }
899
900 #[doc = "Clock Enable"]
901 #[inline(always)]
902 pub fn cke(
903 self,
904 ) -> crate::common::RegisterField<0, 0x3, 1, 0, scr::Cke, scr::Cke, Scr_SPEC, crate::common::RW>
905 {
906 crate::common::RegisterField::<0,0x3,1,0,scr::Cke,scr::Cke,Scr_SPEC,crate::common::RW>::from_register(self,0)
907 }
908}
909impl ::core::default::Default for Scr {
910 #[inline(always)]
911 fn default() -> Scr {
912 <crate::RegValueT<Scr_SPEC> as RegisterValue<_>>::new(0)
913 }
914}
915pub mod scr {
916
917 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
918 pub struct Tie_SPEC;
919 pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
920 impl Tie {
921 #[doc = "TXI interrupt request is disabled"]
922 pub const _0: Self = Self::new(0);
923
924 #[doc = "TXI interrupt request is enabled"]
925 pub const _1: Self = Self::new(1);
926 }
927 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
928 pub struct Rie_SPEC;
929 pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
930 impl Rie {
931 #[doc = "RXI and ERI interrupt requests are disabled"]
932 pub const _0: Self = Self::new(0);
933
934 #[doc = "RXI and ERI interrupt requests are enabled"]
935 pub const _1: Self = Self::new(1);
936 }
937 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
938 pub struct Te_SPEC;
939 pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
940 impl Te {
941 #[doc = "Serial transmission is disabled"]
942 pub const _0: Self = Self::new(0);
943
944 #[doc = "Serial transmission is enabled"]
945 pub const _1: Self = Self::new(1);
946 }
947 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
948 pub struct Re_SPEC;
949 pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
950 impl Re {
951 #[doc = "Serial reception is disabled"]
952 pub const _0: Self = Self::new(0);
953
954 #[doc = "Serial reception is enabled"]
955 pub const _1: Self = Self::new(1);
956 }
957 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
958 pub struct Mpie_SPEC;
959 pub type Mpie = crate::EnumBitfieldStruct<u8, Mpie_SPEC>;
960 impl Mpie {
961 #[doc = "Normal reception"]
962 pub const _0: Self = Self::new(0);
963
964 #[doc = "When the data with the multi-processor bit set to 0 is received, the data is not read, and setting the status flags RDRF,ORER and FER in SSR to 1 is disabled. When the data with the multiprocessor bit set to 1 is received, the MPIE bit is automatically cleared to 0, and normal reception is resumed."]
965 pub const _1: Self = Self::new(1);
966 }
967 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
968 pub struct Teie_SPEC;
969 pub type Teie = crate::EnumBitfieldStruct<u8, Teie_SPEC>;
970 impl Teie {
971 #[doc = "TEI interrupt request is disabled"]
972 pub const _0: Self = Self::new(0);
973
974 #[doc = "TEI interrupt request is enabled"]
975 pub const _1: Self = Self::new(1);
976 }
977 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
978 pub struct Cke_SPEC;
979 pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
980 impl Cke {
981 #[doc = "The SCKn pin is available for use as an I/O port in accord with the I/O port settings.(Asynchronous mode) / The SCKn pin functions as the clock output pin(Clock synchronous mode)"]
982 pub const _00: Self = Self::new(0);
983
984 #[doc = "The clock with the same frequency as the bit rate is output from the SCKn pin.(Asynchronous mode) / The SCKn pin functions as the clock output pin(Clock synchronous mode)"]
985 pub const _01: Self = Self::new(1);
986 }
987}
988#[doc(hidden)]
989#[derive(Copy, Clone, Eq, PartialEq)]
990pub struct ScrSmci_SPEC;
991impl crate::sealed::RegSpec for ScrSmci_SPEC {
992 type DataType = u8;
993}
994
995#[doc = "Serial Control Register (SCMR.SMIF =1)"]
996pub type ScrSmci = crate::RegValueT<ScrSmci_SPEC>;
997
998impl ScrSmci {
999 #[doc = "Transmit Interrupt Enable"]
1000 #[inline(always)]
1001 pub fn tie(
1002 self,
1003 ) -> crate::common::RegisterField<
1004 7,
1005 0x1,
1006 1,
1007 0,
1008 scr_smci::Tie,
1009 scr_smci::Tie,
1010 ScrSmci_SPEC,
1011 crate::common::RW,
1012 > {
1013 crate::common::RegisterField::<
1014 7,
1015 0x1,
1016 1,
1017 0,
1018 scr_smci::Tie,
1019 scr_smci::Tie,
1020 ScrSmci_SPEC,
1021 crate::common::RW,
1022 >::from_register(self, 0)
1023 }
1024
1025 #[doc = "Receive Interrupt Enable"]
1026 #[inline(always)]
1027 pub fn rie(
1028 self,
1029 ) -> crate::common::RegisterField<
1030 6,
1031 0x1,
1032 1,
1033 0,
1034 scr_smci::Rie,
1035 scr_smci::Rie,
1036 ScrSmci_SPEC,
1037 crate::common::RW,
1038 > {
1039 crate::common::RegisterField::<
1040 6,
1041 0x1,
1042 1,
1043 0,
1044 scr_smci::Rie,
1045 scr_smci::Rie,
1046 ScrSmci_SPEC,
1047 crate::common::RW,
1048 >::from_register(self, 0)
1049 }
1050
1051 #[doc = "Transmit Enable"]
1052 #[inline(always)]
1053 pub fn te(
1054 self,
1055 ) -> crate::common::RegisterField<
1056 5,
1057 0x1,
1058 1,
1059 0,
1060 scr_smci::Te,
1061 scr_smci::Te,
1062 ScrSmci_SPEC,
1063 crate::common::RW,
1064 > {
1065 crate::common::RegisterField::<
1066 5,
1067 0x1,
1068 1,
1069 0,
1070 scr_smci::Te,
1071 scr_smci::Te,
1072 ScrSmci_SPEC,
1073 crate::common::RW,
1074 >::from_register(self, 0)
1075 }
1076
1077 #[doc = "Receive Enable"]
1078 #[inline(always)]
1079 pub fn re(
1080 self,
1081 ) -> crate::common::RegisterField<
1082 4,
1083 0x1,
1084 1,
1085 0,
1086 scr_smci::Re,
1087 scr_smci::Re,
1088 ScrSmci_SPEC,
1089 crate::common::RW,
1090 > {
1091 crate::common::RegisterField::<
1092 4,
1093 0x1,
1094 1,
1095 0,
1096 scr_smci::Re,
1097 scr_smci::Re,
1098 ScrSmci_SPEC,
1099 crate::common::RW,
1100 >::from_register(self, 0)
1101 }
1102
1103 #[doc = "This bit should be 0 in smart card interface mode."]
1104 #[inline(always)]
1105 pub fn mpie(
1106 self,
1107 ) -> crate::common::RegisterFieldBool<3, 1, 0, ScrSmci_SPEC, crate::common::RW> {
1108 crate::common::RegisterFieldBool::<3, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
1109 self, 0,
1110 )
1111 }
1112
1113 #[doc = "This bit should be 0 in smart card interface mode."]
1114 #[inline(always)]
1115 pub fn teie(
1116 self,
1117 ) -> crate::common::RegisterFieldBool<2, 1, 0, ScrSmci_SPEC, crate::common::RW> {
1118 crate::common::RegisterFieldBool::<2, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
1119 self, 0,
1120 )
1121 }
1122
1123 #[doc = "Clock Enable"]
1124 #[inline(always)]
1125 pub fn cke(
1126 self,
1127 ) -> crate::common::RegisterField<
1128 0,
1129 0x3,
1130 1,
1131 0,
1132 scr_smci::Cke,
1133 scr_smci::Cke,
1134 ScrSmci_SPEC,
1135 crate::common::RW,
1136 > {
1137 crate::common::RegisterField::<
1138 0,
1139 0x3,
1140 1,
1141 0,
1142 scr_smci::Cke,
1143 scr_smci::Cke,
1144 ScrSmci_SPEC,
1145 crate::common::RW,
1146 >::from_register(self, 0)
1147 }
1148}
1149impl ::core::default::Default for ScrSmci {
1150 #[inline(always)]
1151 fn default() -> ScrSmci {
1152 <crate::RegValueT<ScrSmci_SPEC> as RegisterValue<_>>::new(0)
1153 }
1154}
1155pub mod scr_smci {
1156
1157 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1158 pub struct Tie_SPEC;
1159 pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
1160 impl Tie {
1161 #[doc = "A TXI interrupt request is disabled"]
1162 pub const _0: Self = Self::new(0);
1163
1164 #[doc = "A TXI interrupt request is enabled"]
1165 pub const _1: Self = Self::new(1);
1166 }
1167 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1168 pub struct Rie_SPEC;
1169 pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
1170 impl Rie {
1171 #[doc = "RXI and ERI interrupt requests are disabled"]
1172 pub const _0: Self = Self::new(0);
1173
1174 #[doc = "RXI and ERI interrupt requests are enabled"]
1175 pub const _1: Self = Self::new(1);
1176 }
1177 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1178 pub struct Te_SPEC;
1179 pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
1180 impl Te {
1181 #[doc = "Serial transmission is disabled"]
1182 pub const _0: Self = Self::new(0);
1183
1184 #[doc = "Serial transmission is enabled"]
1185 pub const _1: Self = Self::new(1);
1186 }
1187 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1188 pub struct Re_SPEC;
1189 pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
1190 impl Re {
1191 #[doc = "Serial reception is disabled"]
1192 pub const _0: Self = Self::new(0);
1193
1194 #[doc = "Serial reception is enabled"]
1195 pub const _1: Self = Self::new(1);
1196 }
1197 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1198 pub struct Cke_SPEC;
1199 pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
1200 impl Cke {
1201 #[doc = "Output disabled(SMR_SMCI.GM=0) / Output fixed low(SMR_SMCI.GM=1)"]
1202 pub const _00: Self = Self::new(0);
1203
1204 #[doc = "Clock Output"]
1205 pub const _01: Self = Self::new(1);
1206
1207 #[doc = "Setting prohibited(SMR_SMCI.GM=0) / Output fixed High(SMR_SMCI.GM=1)"]
1208 pub const _10: Self = Self::new(2);
1209
1210 #[doc = "Setting prohibited(SMR_SMCI.GM=0) / Clock Output(SMR_SMCI.GM=1)"]
1211 pub const _11: Self = Self::new(3);
1212 }
1213}
1214#[doc(hidden)]
1215#[derive(Copy, Clone, Eq, PartialEq)]
1216pub struct Tdr_SPEC;
1217impl crate::sealed::RegSpec for Tdr_SPEC {
1218 type DataType = u8;
1219}
1220
1221#[doc = "Transmit Data Register"]
1222pub type Tdr = crate::RegValueT<Tdr_SPEC>;
1223
1224impl Tdr {
1225 #[doc = "TDR is an 8-bit register that stores transmit data."]
1226 #[inline(always)]
1227 pub fn tdr(
1228 self,
1229 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Tdr_SPEC, crate::common::RW> {
1230 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Tdr_SPEC,crate::common::RW>::from_register(self,0)
1231 }
1232}
1233impl ::core::default::Default for Tdr {
1234 #[inline(always)]
1235 fn default() -> Tdr {
1236 <crate::RegValueT<Tdr_SPEC> as RegisterValue<_>>::new(255)
1237 }
1238}
1239
1240#[doc(hidden)]
1241#[derive(Copy, Clone, Eq, PartialEq)]
1242pub struct Ssr_SPEC;
1243impl crate::sealed::RegSpec for Ssr_SPEC {
1244 type DataType = u8;
1245}
1246
1247#[doc = "Serial Status Register(SCMR.SMIF = 0 and FCR.FM=0)"]
1248pub type Ssr = crate::RegValueT<Ssr_SPEC>;
1249
1250impl Ssr {
1251 #[doc = "Transmit Data Empty Flag"]
1252 #[inline(always)]
1253 pub fn tdre(
1254 self,
1255 ) -> crate::common::RegisterField<7, 0x1, 1, 0, ssr::Tdre, ssr::Tdre, Ssr_SPEC, crate::common::RW>
1256 {
1257 crate::common::RegisterField::<
1258 7,
1259 0x1,
1260 1,
1261 0,
1262 ssr::Tdre,
1263 ssr::Tdre,
1264 Ssr_SPEC,
1265 crate::common::RW,
1266 >::from_register(self, 0)
1267 }
1268
1269 #[doc = "Receive Data Full Flag"]
1270 #[inline(always)]
1271 pub fn rdrf(
1272 self,
1273 ) -> crate::common::RegisterField<6, 0x1, 1, 0, ssr::Rdrf, ssr::Rdrf, Ssr_SPEC, crate::common::RW>
1274 {
1275 crate::common::RegisterField::<
1276 6,
1277 0x1,
1278 1,
1279 0,
1280 ssr::Rdrf,
1281 ssr::Rdrf,
1282 Ssr_SPEC,
1283 crate::common::RW,
1284 >::from_register(self, 0)
1285 }
1286
1287 #[doc = "Overrun Error Flag"]
1288 #[inline(always)]
1289 pub fn orer(
1290 self,
1291 ) -> crate::common::RegisterField<5, 0x1, 1, 0, ssr::Orer, ssr::Orer, Ssr_SPEC, crate::common::RW>
1292 {
1293 crate::common::RegisterField::<
1294 5,
1295 0x1,
1296 1,
1297 0,
1298 ssr::Orer,
1299 ssr::Orer,
1300 Ssr_SPEC,
1301 crate::common::RW,
1302 >::from_register(self, 0)
1303 }
1304
1305 #[doc = "Framing Error Flag"]
1306 #[inline(always)]
1307 pub fn fer(
1308 self,
1309 ) -> crate::common::RegisterField<4, 0x1, 1, 0, ssr::Fer, ssr::Fer, Ssr_SPEC, crate::common::RW>
1310 {
1311 crate::common::RegisterField::<4,0x1,1,0,ssr::Fer,ssr::Fer,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1312 }
1313
1314 #[doc = "Parity Error Flag"]
1315 #[inline(always)]
1316 pub fn per(
1317 self,
1318 ) -> crate::common::RegisterField<3, 0x1, 1, 0, ssr::Per, ssr::Per, Ssr_SPEC, crate::common::RW>
1319 {
1320 crate::common::RegisterField::<3,0x1,1,0,ssr::Per,ssr::Per,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1321 }
1322
1323 #[doc = "Transmit End Flag"]
1324 #[inline(always)]
1325 pub fn tend(
1326 self,
1327 ) -> crate::common::RegisterField<2, 0x1, 1, 0, ssr::Tend, ssr::Tend, Ssr_SPEC, crate::common::R>
1328 {
1329 crate::common::RegisterField::<2,0x1,1,0,ssr::Tend,ssr::Tend,Ssr_SPEC,crate::common::R>::from_register(self,0)
1330 }
1331
1332 #[doc = "Multi-Processor Bit. Value of the multi-processor bit in the reception frame"]
1333 #[inline(always)]
1334 pub fn mpb(
1335 self,
1336 ) -> crate::common::RegisterField<1, 0x1, 1, 0, ssr::Mpb, ssr::Mpb, Ssr_SPEC, crate::common::R>
1337 {
1338 crate::common::RegisterField::<1,0x1,1,0,ssr::Mpb,ssr::Mpb,Ssr_SPEC,crate::common::R>::from_register(self,0)
1339 }
1340
1341 #[doc = "Multi-Processor Bit Transfer. Sets the multi-processor bit for adding to the transmission frame"]
1342 #[inline(always)]
1343 pub fn mpbt(
1344 self,
1345 ) -> crate::common::RegisterField<0, 0x1, 1, 0, ssr::Mpbt, ssr::Mpbt, Ssr_SPEC, crate::common::RW>
1346 {
1347 crate::common::RegisterField::<
1348 0,
1349 0x1,
1350 1,
1351 0,
1352 ssr::Mpbt,
1353 ssr::Mpbt,
1354 Ssr_SPEC,
1355 crate::common::RW,
1356 >::from_register(self, 0)
1357 }
1358}
1359impl ::core::default::Default for Ssr {
1360 #[inline(always)]
1361 fn default() -> Ssr {
1362 <crate::RegValueT<Ssr_SPEC> as RegisterValue<_>>::new(132)
1363 }
1364}
1365pub mod ssr {
1366
1367 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1368 pub struct Tdre_SPEC;
1369 pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
1370 impl Tdre {
1371 #[doc = "Transmit data is in TDR register"]
1372 pub const _0: Self = Self::new(0);
1373
1374 #[doc = "No transmit data is in TDR register"]
1375 pub const _1: Self = Self::new(1);
1376 }
1377 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1378 pub struct Rdrf_SPEC;
1379 pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
1380 impl Rdrf {
1381 #[doc = "No received data is in RDR register"]
1382 pub const _0: Self = Self::new(0);
1383
1384 #[doc = "Received data is in RDR register"]
1385 pub const _1: Self = Self::new(1);
1386 }
1387 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1388 pub struct Orer_SPEC;
1389 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1390 impl Orer {
1391 #[doc = "No overrun error occurred"]
1392 pub const _0: Self = Self::new(0);
1393
1394 #[doc = "An overrun error has occurred"]
1395 pub const _1: Self = Self::new(1);
1396 }
1397 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1398 pub struct Fer_SPEC;
1399 pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
1400 impl Fer {
1401 #[doc = "No framing error occurred"]
1402 pub const _0: Self = Self::new(0);
1403
1404 #[doc = "A framing error has occurred"]
1405 pub const _1: Self = Self::new(1);
1406 }
1407 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1408 pub struct Per_SPEC;
1409 pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1410 impl Per {
1411 #[doc = "No parity error occurred"]
1412 pub const _0: Self = Self::new(0);
1413
1414 #[doc = "A parity error has occurred"]
1415 pub const _1: Self = Self::new(1);
1416 }
1417 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1418 pub struct Tend_SPEC;
1419 pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1420 impl Tend {
1421 #[doc = "A character is being transmitted."]
1422 pub const _0: Self = Self::new(0);
1423
1424 #[doc = "Character transfer has been completed."]
1425 pub const _1: Self = Self::new(1);
1426 }
1427 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1428 pub struct Mpb_SPEC;
1429 pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
1430 impl Mpb {
1431 #[doc = "Data transmission cycles"]
1432 pub const _0: Self = Self::new(0);
1433
1434 #[doc = "ID transmission cycles"]
1435 pub const _1: Self = Self::new(1);
1436 }
1437 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1438 pub struct Mpbt_SPEC;
1439 pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
1440 impl Mpbt {
1441 #[doc = "Data transmission cycles"]
1442 pub const _0: Self = Self::new(0);
1443
1444 #[doc = "ID transmission cycles"]
1445 pub const _1: Self = Self::new(1);
1446 }
1447}
1448#[doc(hidden)]
1449#[derive(Copy, Clone, Eq, PartialEq)]
1450pub struct SsrFifo_SPEC;
1451impl crate::sealed::RegSpec for SsrFifo_SPEC {
1452 type DataType = u8;
1453}
1454
1455#[doc = "Serial Status Register(SCMR.SMIF = 0 and FCR.FM=1)"]
1456pub type SsrFifo = crate::RegValueT<SsrFifo_SPEC>;
1457
1458impl SsrFifo {
1459 #[doc = "Transmit FIFO data empty flag"]
1460 #[inline(always)]
1461 pub fn tdfe(
1462 self,
1463 ) -> crate::common::RegisterField<
1464 7,
1465 0x1,
1466 1,
1467 0,
1468 ssr_fifo::Tdfe,
1469 ssr_fifo::Tdfe,
1470 SsrFifo_SPEC,
1471 crate::common::RW,
1472 > {
1473 crate::common::RegisterField::<
1474 7,
1475 0x1,
1476 1,
1477 0,
1478 ssr_fifo::Tdfe,
1479 ssr_fifo::Tdfe,
1480 SsrFifo_SPEC,
1481 crate::common::RW,
1482 >::from_register(self, 0)
1483 }
1484
1485 #[doc = "Receive FIFO data full flag"]
1486 #[inline(always)]
1487 pub fn rdf(
1488 self,
1489 ) -> crate::common::RegisterField<
1490 6,
1491 0x1,
1492 1,
1493 0,
1494 ssr_fifo::Rdf,
1495 ssr_fifo::Rdf,
1496 SsrFifo_SPEC,
1497 crate::common::RW,
1498 > {
1499 crate::common::RegisterField::<
1500 6,
1501 0x1,
1502 1,
1503 0,
1504 ssr_fifo::Rdf,
1505 ssr_fifo::Rdf,
1506 SsrFifo_SPEC,
1507 crate::common::RW,
1508 >::from_register(self, 0)
1509 }
1510
1511 #[doc = "Overrun Error Flag"]
1512 #[inline(always)]
1513 pub fn orer(
1514 self,
1515 ) -> crate::common::RegisterField<
1516 5,
1517 0x1,
1518 1,
1519 0,
1520 ssr_fifo::Orer,
1521 ssr_fifo::Orer,
1522 SsrFifo_SPEC,
1523 crate::common::RW,
1524 > {
1525 crate::common::RegisterField::<
1526 5,
1527 0x1,
1528 1,
1529 0,
1530 ssr_fifo::Orer,
1531 ssr_fifo::Orer,
1532 SsrFifo_SPEC,
1533 crate::common::RW,
1534 >::from_register(self, 0)
1535 }
1536
1537 #[doc = "Framing Error Flag"]
1538 #[inline(always)]
1539 pub fn fer(
1540 self,
1541 ) -> crate::common::RegisterField<
1542 4,
1543 0x1,
1544 1,
1545 0,
1546 ssr_fifo::Fer,
1547 ssr_fifo::Fer,
1548 SsrFifo_SPEC,
1549 crate::common::RW,
1550 > {
1551 crate::common::RegisterField::<
1552 4,
1553 0x1,
1554 1,
1555 0,
1556 ssr_fifo::Fer,
1557 ssr_fifo::Fer,
1558 SsrFifo_SPEC,
1559 crate::common::RW,
1560 >::from_register(self, 0)
1561 }
1562
1563 #[doc = "Parity Error Flag"]
1564 #[inline(always)]
1565 pub fn per(
1566 self,
1567 ) -> crate::common::RegisterField<
1568 3,
1569 0x1,
1570 1,
1571 0,
1572 ssr_fifo::Per,
1573 ssr_fifo::Per,
1574 SsrFifo_SPEC,
1575 crate::common::RW,
1576 > {
1577 crate::common::RegisterField::<
1578 3,
1579 0x1,
1580 1,
1581 0,
1582 ssr_fifo::Per,
1583 ssr_fifo::Per,
1584 SsrFifo_SPEC,
1585 crate::common::RW,
1586 >::from_register(self, 0)
1587 }
1588
1589 #[doc = "Transmit End Flag"]
1590 #[inline(always)]
1591 pub fn tend(
1592 self,
1593 ) -> crate::common::RegisterField<
1594 2,
1595 0x1,
1596 1,
1597 0,
1598 ssr_fifo::Tend,
1599 ssr_fifo::Tend,
1600 SsrFifo_SPEC,
1601 crate::common::RW,
1602 > {
1603 crate::common::RegisterField::<
1604 2,
1605 0x1,
1606 1,
1607 0,
1608 ssr_fifo::Tend,
1609 ssr_fifo::Tend,
1610 SsrFifo_SPEC,
1611 crate::common::RW,
1612 >::from_register(self, 0)
1613 }
1614
1615 #[doc = "This bit is read as 0. The write value should be 0."]
1616 #[inline(always)]
1617 pub fn reserved(
1618 self,
1619 ) -> crate::common::RegisterFieldBool<1, 1, 0, SsrFifo_SPEC, crate::common::RW> {
1620 crate::common::RegisterFieldBool::<1, 1, 0, SsrFifo_SPEC, crate::common::RW>::from_register(
1621 self, 0,
1622 )
1623 }
1624
1625 #[doc = "Receive Data Ready flag(Valid only in asynchronous mode(including multi-processor) and FIFO selected)"]
1626 #[inline(always)]
1627 pub fn dr(
1628 self,
1629 ) -> crate::common::RegisterField<
1630 0,
1631 0x1,
1632 1,
1633 0,
1634 ssr_fifo::Dr,
1635 ssr_fifo::Dr,
1636 SsrFifo_SPEC,
1637 crate::common::RW,
1638 > {
1639 crate::common::RegisterField::<
1640 0,
1641 0x1,
1642 1,
1643 0,
1644 ssr_fifo::Dr,
1645 ssr_fifo::Dr,
1646 SsrFifo_SPEC,
1647 crate::common::RW,
1648 >::from_register(self, 0)
1649 }
1650}
1651impl ::core::default::Default for SsrFifo {
1652 #[inline(always)]
1653 fn default() -> SsrFifo {
1654 <crate::RegValueT<SsrFifo_SPEC> as RegisterValue<_>>::new(128)
1655 }
1656}
1657pub mod ssr_fifo {
1658
1659 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1660 pub struct Tdfe_SPEC;
1661 pub type Tdfe = crate::EnumBitfieldStruct<u8, Tdfe_SPEC>;
1662 impl Tdfe {
1663 #[doc = "The quantity of transmit data written in FTDR exceeds the specified transmit triggering number."]
1664 pub const _0: Self = Self::new(0);
1665
1666 #[doc = "The quantity of transmit data written in FTDR is equal to or less than the specified transmit triggering number"]
1667 pub const _1: Self = Self::new(1);
1668 }
1669 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1670 pub struct Rdf_SPEC;
1671 pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
1672 impl Rdf {
1673 #[doc = "The quantity of receive data written in FRDR falls below the specified receive triggering number."]
1674 pub const _0: Self = Self::new(0);
1675
1676 #[doc = "The quantity of receive data written in FRDR is equal to or greater than the specified receive triggering number."]
1677 pub const _1: Self = Self::new(1);
1678 }
1679 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1680 pub struct Orer_SPEC;
1681 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1682 impl Orer {
1683 #[doc = "No overrun error occurred"]
1684 pub const _0: Self = Self::new(0);
1685
1686 #[doc = "An overrun error has occurred"]
1687 pub const _1: Self = Self::new(1);
1688 }
1689 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1690 pub struct Fer_SPEC;
1691 pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
1692 impl Fer {
1693 #[doc = "No framing error occurred."]
1694 pub const _0: Self = Self::new(0);
1695
1696 #[doc = "A framing error has occurred."]
1697 pub const _1: Self = Self::new(1);
1698 }
1699 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1700 pub struct Per_SPEC;
1701 pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1702 impl Per {
1703 #[doc = "No parity error occurred."]
1704 pub const _0: Self = Self::new(0);
1705
1706 #[doc = "A parity error has occurred."]
1707 pub const _1: Self = Self::new(1);
1708 }
1709 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1710 pub struct Tend_SPEC;
1711 pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1712 impl Tend {
1713 #[doc = "A character is being transmitted."]
1714 pub const _0: Self = Self::new(0);
1715
1716 #[doc = "Character transfer has been completed."]
1717 pub const _1: Self = Self::new(1);
1718 }
1719 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1720 pub struct Dr_SPEC;
1721 pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
1722 impl Dr {
1723 #[doc = "Receiving is in progress, or no received data has remained in FRDR after normally completed receiving.(receive FIFO is empty)"]
1724 pub const _0: Self = Self::new(0);
1725
1726 #[doc = "Next receive data has not been received for a period after normal completed receiving, , when data is stored in FIFO to equal or less than receive triggering number."]
1727 pub const _1: Self = Self::new(1);
1728 }
1729}
1730#[doc(hidden)]
1731#[derive(Copy, Clone, Eq, PartialEq)]
1732pub struct SsrSmci_SPEC;
1733impl crate::sealed::RegSpec for SsrSmci_SPEC {
1734 type DataType = u8;
1735}
1736
1737#[doc = "Serial Status Register(SCMR.SMIF = 1)"]
1738pub type SsrSmci = crate::RegValueT<SsrSmci_SPEC>;
1739
1740impl SsrSmci {
1741 #[doc = "Transmit Data Empty Flag"]
1742 #[inline(always)]
1743 pub fn tdre(
1744 self,
1745 ) -> crate::common::RegisterField<
1746 7,
1747 0x1,
1748 1,
1749 0,
1750 ssr_smci::Tdre,
1751 ssr_smci::Tdre,
1752 SsrSmci_SPEC,
1753 crate::common::RW,
1754 > {
1755 crate::common::RegisterField::<
1756 7,
1757 0x1,
1758 1,
1759 0,
1760 ssr_smci::Tdre,
1761 ssr_smci::Tdre,
1762 SsrSmci_SPEC,
1763 crate::common::RW,
1764 >::from_register(self, 0)
1765 }
1766
1767 #[doc = "Receive Data Full Flag"]
1768 #[inline(always)]
1769 pub fn rdrf(
1770 self,
1771 ) -> crate::common::RegisterField<
1772 6,
1773 0x1,
1774 1,
1775 0,
1776 ssr_smci::Rdrf,
1777 ssr_smci::Rdrf,
1778 SsrSmci_SPEC,
1779 crate::common::RW,
1780 > {
1781 crate::common::RegisterField::<
1782 6,
1783 0x1,
1784 1,
1785 0,
1786 ssr_smci::Rdrf,
1787 ssr_smci::Rdrf,
1788 SsrSmci_SPEC,
1789 crate::common::RW,
1790 >::from_register(self, 0)
1791 }
1792
1793 #[doc = "Overrun Error Flag"]
1794 #[inline(always)]
1795 pub fn orer(
1796 self,
1797 ) -> crate::common::RegisterField<
1798 5,
1799 0x1,
1800 1,
1801 0,
1802 ssr_smci::Orer,
1803 ssr_smci::Orer,
1804 SsrSmci_SPEC,
1805 crate::common::RW,
1806 > {
1807 crate::common::RegisterField::<
1808 5,
1809 0x1,
1810 1,
1811 0,
1812 ssr_smci::Orer,
1813 ssr_smci::Orer,
1814 SsrSmci_SPEC,
1815 crate::common::RW,
1816 >::from_register(self, 0)
1817 }
1818
1819 #[doc = "Error Signal Status Flag"]
1820 #[inline(always)]
1821 pub fn ers(
1822 self,
1823 ) -> crate::common::RegisterField<
1824 4,
1825 0x1,
1826 1,
1827 0,
1828 ssr_smci::Ers,
1829 ssr_smci::Ers,
1830 SsrSmci_SPEC,
1831 crate::common::RW,
1832 > {
1833 crate::common::RegisterField::<
1834 4,
1835 0x1,
1836 1,
1837 0,
1838 ssr_smci::Ers,
1839 ssr_smci::Ers,
1840 SsrSmci_SPEC,
1841 crate::common::RW,
1842 >::from_register(self, 0)
1843 }
1844
1845 #[doc = "Parity Error Flag"]
1846 #[inline(always)]
1847 pub fn per(
1848 self,
1849 ) -> crate::common::RegisterField<
1850 3,
1851 0x1,
1852 1,
1853 0,
1854 ssr_smci::Per,
1855 ssr_smci::Per,
1856 SsrSmci_SPEC,
1857 crate::common::RW,
1858 > {
1859 crate::common::RegisterField::<
1860 3,
1861 0x1,
1862 1,
1863 0,
1864 ssr_smci::Per,
1865 ssr_smci::Per,
1866 SsrSmci_SPEC,
1867 crate::common::RW,
1868 >::from_register(self, 0)
1869 }
1870
1871 #[doc = "Transmit End Flag"]
1872 #[inline(always)]
1873 pub fn tend(
1874 self,
1875 ) -> crate::common::RegisterField<
1876 2,
1877 0x1,
1878 1,
1879 0,
1880 ssr_smci::Tend,
1881 ssr_smci::Tend,
1882 SsrSmci_SPEC,
1883 crate::common::R,
1884 > {
1885 crate::common::RegisterField::<
1886 2,
1887 0x1,
1888 1,
1889 0,
1890 ssr_smci::Tend,
1891 ssr_smci::Tend,
1892 SsrSmci_SPEC,
1893 crate::common::R,
1894 >::from_register(self, 0)
1895 }
1896
1897 #[doc = "Multi-ProcessorThis bit should be 0 in smart card interface mode."]
1898 #[inline(always)]
1899 pub fn mpb(self) -> crate::common::RegisterFieldBool<1, 1, 0, SsrSmci_SPEC, crate::common::R> {
1900 crate::common::RegisterFieldBool::<1, 1, 0, SsrSmci_SPEC, crate::common::R>::from_register(
1901 self, 0,
1902 )
1903 }
1904
1905 #[doc = "Multi-Processor Bit TransferThis bit should be 0 in smart card interface mode."]
1906 #[inline(always)]
1907 pub fn mpbt(
1908 self,
1909 ) -> crate::common::RegisterFieldBool<0, 1, 0, SsrSmci_SPEC, crate::common::RW> {
1910 crate::common::RegisterFieldBool::<0, 1, 0, SsrSmci_SPEC, crate::common::RW>::from_register(
1911 self, 0,
1912 )
1913 }
1914}
1915impl ::core::default::Default for SsrSmci {
1916 #[inline(always)]
1917 fn default() -> SsrSmci {
1918 <crate::RegValueT<SsrSmci_SPEC> as RegisterValue<_>>::new(132)
1919 }
1920}
1921pub mod ssr_smci {
1922
1923 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1924 pub struct Tdre_SPEC;
1925 pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
1926 impl Tdre {
1927 #[doc = "Transmit data is in TDR register"]
1928 pub const _0: Self = Self::new(0);
1929
1930 #[doc = "No transmit data is in TDR register"]
1931 pub const _1: Self = Self::new(1);
1932 }
1933 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1934 pub struct Rdrf_SPEC;
1935 pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
1936 impl Rdrf {
1937 #[doc = "No received data is in RDR register"]
1938 pub const _0: Self = Self::new(0);
1939
1940 #[doc = "Received data is in RDR register"]
1941 pub const _1: Self = Self::new(1);
1942 }
1943 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1944 pub struct Orer_SPEC;
1945 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1946 impl Orer {
1947 #[doc = "No overrun error occurred"]
1948 pub const _0: Self = Self::new(0);
1949
1950 #[doc = "An overrun error has occurred"]
1951 pub const _1: Self = Self::new(1);
1952 }
1953 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1954 pub struct Ers_SPEC;
1955 pub type Ers = crate::EnumBitfieldStruct<u8, Ers_SPEC>;
1956 impl Ers {
1957 #[doc = "Low error signal not responded"]
1958 pub const _0: Self = Self::new(0);
1959
1960 #[doc = "Low error signal responded"]
1961 pub const _1: Self = Self::new(1);
1962 }
1963 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1964 pub struct Per_SPEC;
1965 pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1966 impl Per {
1967 #[doc = "No parity error occurred"]
1968 pub const _0: Self = Self::new(0);
1969
1970 #[doc = "A parity error has occurred"]
1971 pub const _1: Self = Self::new(1);
1972 }
1973 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1974 pub struct Tend_SPEC;
1975 pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1976 impl Tend {
1977 #[doc = "A character is being transmitted."]
1978 pub const _0: Self = Self::new(0);
1979
1980 #[doc = "Character transfer has been completed."]
1981 pub const _1: Self = Self::new(1);
1982 }
1983}
1984#[doc(hidden)]
1985#[derive(Copy, Clone, Eq, PartialEq)]
1986pub struct Rdr_SPEC;
1987impl crate::sealed::RegSpec for Rdr_SPEC {
1988 type DataType = u8;
1989}
1990
1991#[doc = "Receive Data Register"]
1992pub type Rdr = crate::RegValueT<Rdr_SPEC>;
1993
1994impl Rdr {
1995 #[doc = "RDR is an 8-bit register that stores receive data."]
1996 #[inline(always)]
1997 pub fn rdr(
1998 self,
1999 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Rdr_SPEC, crate::common::R> {
2000 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Rdr_SPEC,crate::common::R>::from_register(self,0)
2001 }
2002}
2003impl ::core::default::Default for Rdr {
2004 #[inline(always)]
2005 fn default() -> Rdr {
2006 <crate::RegValueT<Rdr_SPEC> as RegisterValue<_>>::new(0)
2007 }
2008}
2009
2010#[doc(hidden)]
2011#[derive(Copy, Clone, Eq, PartialEq)]
2012pub struct Scmr_SPEC;
2013impl crate::sealed::RegSpec for Scmr_SPEC {
2014 type DataType = u8;
2015}
2016
2017#[doc = "Smart Card Mode Register"]
2018pub type Scmr = crate::RegValueT<Scmr_SPEC>;
2019
2020impl Scmr {
2021 #[doc = "Base Clock Pulse 2Selects the number of base clock cycles in combination with the SMR.BCP\\[1:0\\] bits"]
2022 #[inline(always)]
2023 pub fn bcp2(
2024 self,
2025 ) -> crate::common::RegisterField<
2026 7,
2027 0x1,
2028 1,
2029 0,
2030 scmr::Bcp2,
2031 scmr::Bcp2,
2032 Scmr_SPEC,
2033 crate::common::RW,
2034 > {
2035 crate::common::RegisterField::<
2036 7,
2037 0x1,
2038 1,
2039 0,
2040 scmr::Bcp2,
2041 scmr::Bcp2,
2042 Scmr_SPEC,
2043 crate::common::RW,
2044 >::from_register(self, 0)
2045 }
2046
2047 #[doc = "Character Length 1(Only valid in asynchronous mode)"]
2048 #[inline(always)]
2049 pub fn chr1(
2050 self,
2051 ) -> crate::common::RegisterField<
2052 4,
2053 0x1,
2054 1,
2055 0,
2056 scmr::Chr1,
2057 scmr::Chr1,
2058 Scmr_SPEC,
2059 crate::common::RW,
2060 > {
2061 crate::common::RegisterField::<
2062 4,
2063 0x1,
2064 1,
2065 0,
2066 scmr::Chr1,
2067 scmr::Chr1,
2068 Scmr_SPEC,
2069 crate::common::RW,
2070 >::from_register(self, 0)
2071 }
2072
2073 #[doc = "Transmitted/Received Data Transfer DirectionNOTE: The setting is invalid and a fixed data length of 8 bits is used in modes other than asynchronous mode.Set this bit to 1 if operation is to be in simple I2C mode."]
2074 #[inline(always)]
2075 pub fn sdir(
2076 self,
2077 ) -> crate::common::RegisterField<
2078 3,
2079 0x1,
2080 1,
2081 0,
2082 scmr::Sdir,
2083 scmr::Sdir,
2084 Scmr_SPEC,
2085 crate::common::RW,
2086 > {
2087 crate::common::RegisterField::<
2088 3,
2089 0x1,
2090 1,
2091 0,
2092 scmr::Sdir,
2093 scmr::Sdir,
2094 Scmr_SPEC,
2095 crate::common::RW,
2096 >::from_register(self, 0)
2097 }
2098
2099 #[doc = "Transmitted/Received Data InvertSet this bit to 0 if operation is to be in simple I2C mode."]
2100 #[inline(always)]
2101 pub fn sinv(
2102 self,
2103 ) -> crate::common::RegisterField<
2104 2,
2105 0x1,
2106 1,
2107 0,
2108 scmr::Sinv,
2109 scmr::Sinv,
2110 Scmr_SPEC,
2111 crate::common::RW,
2112 > {
2113 crate::common::RegisterField::<
2114 2,
2115 0x1,
2116 1,
2117 0,
2118 scmr::Sinv,
2119 scmr::Sinv,
2120 Scmr_SPEC,
2121 crate::common::RW,
2122 >::from_register(self, 0)
2123 }
2124
2125 #[doc = "This bit is read as 1. The write value should be 1."]
2126 #[inline(always)]
2127 pub fn reserved(
2128 self,
2129 ) -> crate::common::RegisterFieldBool<1, 1, 0, Scmr_SPEC, crate::common::RW> {
2130 crate::common::RegisterFieldBool::<1, 1, 0, Scmr_SPEC, crate::common::RW>::from_register(
2131 self, 0,
2132 )
2133 }
2134
2135 #[doc = "Smart Card Interface Mode Select"]
2136 #[inline(always)]
2137 pub fn smif(
2138 self,
2139 ) -> crate::common::RegisterField<
2140 0,
2141 0x1,
2142 1,
2143 0,
2144 scmr::Smif,
2145 scmr::Smif,
2146 Scmr_SPEC,
2147 crate::common::RW,
2148 > {
2149 crate::common::RegisterField::<
2150 0,
2151 0x1,
2152 1,
2153 0,
2154 scmr::Smif,
2155 scmr::Smif,
2156 Scmr_SPEC,
2157 crate::common::RW,
2158 >::from_register(self, 0)
2159 }
2160}
2161impl ::core::default::Default for Scmr {
2162 #[inline(always)]
2163 fn default() -> Scmr {
2164 <crate::RegValueT<Scmr_SPEC> as RegisterValue<_>>::new(242)
2165 }
2166}
2167pub mod scmr {
2168
2169 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2170 pub struct Bcp2_SPEC;
2171 pub type Bcp2 = crate::EnumBitfieldStruct<u8, Bcp2_SPEC>;
2172 impl Bcp2 {
2173 #[doc = "S=93(SMR.BCP\\[1:0\\]=00), 128(SMR.BCP\\[1:0\\]=01), 186(SMR.BCP\\[1:0\\]=10), 512(SMR.BCP\\[1:0\\]=11)"]
2174 pub const _0: Self = Self::new(0);
2175
2176 #[doc = "S=32(SMR.BCP\\[1:0\\]=00), 64(SMR.BCP\\[1:0\\]=01), 372(SMR.BCP\\[1:0\\]=10), 256(SMR.BCP\\[1:0\\]=11)"]
2177 pub const _1: Self = Self::new(1);
2178 }
2179 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2180 pub struct Chr1_SPEC;
2181 pub type Chr1 = crate::EnumBitfieldStruct<u8, Chr1_SPEC>;
2182 impl Chr1 {
2183 #[doc = "Transmit/receive in 9-bit data length"]
2184 pub const _0: Self = Self::new(0);
2185
2186 #[doc = "Transmit/receive in 8-bit data length(SMR.CHR=0) / in 7bit data length(SMR.CHR=1)"]
2187 pub const _1: Self = Self::new(1);
2188 }
2189 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2190 pub struct Sdir_SPEC;
2191 pub type Sdir = crate::EnumBitfieldStruct<u8, Sdir_SPEC>;
2192 impl Sdir {
2193 #[doc = "Transfer with LSB first"]
2194 pub const _0: Self = Self::new(0);
2195
2196 #[doc = "Transfer with MSB first"]
2197 pub const _1: Self = Self::new(1);
2198 }
2199 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2200 pub struct Sinv_SPEC;
2201 pub type Sinv = crate::EnumBitfieldStruct<u8, Sinv_SPEC>;
2202 impl Sinv {
2203 #[doc = "TDR contents are transmitted as they are. Receive data is stored as it is in RDR."]
2204 pub const _0: Self = Self::new(0);
2205
2206 #[doc = "TDR contents are inverted before being transmitted. Receive data is stored in inverted form in RDR."]
2207 pub const _1: Self = Self::new(1);
2208 }
2209 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2210 pub struct Smif_SPEC;
2211 pub type Smif = crate::EnumBitfieldStruct<u8, Smif_SPEC>;
2212 impl Smif {
2213 #[doc = "Non-smart card interface mode(Asynchronous mode, clock synchronous mode, simple SPI mode, or simple I2C mode)"]
2214 pub const _0: Self = Self::new(0);
2215
2216 #[doc = "Smart card interface mode"]
2217 pub const _1: Self = Self::new(1);
2218 }
2219}
2220#[doc(hidden)]
2221#[derive(Copy, Clone, Eq, PartialEq)]
2222pub struct Semr_SPEC;
2223impl crate::sealed::RegSpec for Semr_SPEC {
2224 type DataType = u8;
2225}
2226
2227#[doc = "Serial Extended Mode Register"]
2228pub type Semr = crate::RegValueT<Semr_SPEC>;
2229
2230impl Semr {
2231 #[doc = "Asynchronous Start Bit Edge Detection Select(Valid only in asynchronous mode)"]
2232 #[inline(always)]
2233 pub fn rxdesel(
2234 self,
2235 ) -> crate::common::RegisterField<
2236 7,
2237 0x1,
2238 1,
2239 0,
2240 semr::Rxdesel,
2241 semr::Rxdesel,
2242 Semr_SPEC,
2243 crate::common::RW,
2244 > {
2245 crate::common::RegisterField::<
2246 7,
2247 0x1,
2248 1,
2249 0,
2250 semr::Rxdesel,
2251 semr::Rxdesel,
2252 Semr_SPEC,
2253 crate::common::RW,
2254 >::from_register(self, 0)
2255 }
2256
2257 #[doc = "Baud Rate Generator Double-Speed Mode Select(Only valid the CKE\\[1\\] bit in SCR is 0 in asynchronous mode)."]
2258 #[inline(always)]
2259 pub fn bgdm(
2260 self,
2261 ) -> crate::common::RegisterField<
2262 6,
2263 0x1,
2264 1,
2265 0,
2266 semr::Bgdm,
2267 semr::Bgdm,
2268 Semr_SPEC,
2269 crate::common::RW,
2270 > {
2271 crate::common::RegisterField::<
2272 6,
2273 0x1,
2274 1,
2275 0,
2276 semr::Bgdm,
2277 semr::Bgdm,
2278 Semr_SPEC,
2279 crate::common::RW,
2280 >::from_register(self, 0)
2281 }
2282
2283 #[doc = "Digital Noise Filter Function Enable(The NFEN bit should be 0 without simple I2C mode and asynchronous mode.)In asynchronous mode, for RXDn input only. In simple I2C mode, for RXDn/TxDn input."]
2284 #[inline(always)]
2285 pub fn nfen(
2286 self,
2287 ) -> crate::common::RegisterField<
2288 5,
2289 0x1,
2290 1,
2291 0,
2292 semr::Nfen,
2293 semr::Nfen,
2294 Semr_SPEC,
2295 crate::common::RW,
2296 > {
2297 crate::common::RegisterField::<
2298 5,
2299 0x1,
2300 1,
2301 0,
2302 semr::Nfen,
2303 semr::Nfen,
2304 Semr_SPEC,
2305 crate::common::RW,
2306 >::from_register(self, 0)
2307 }
2308
2309 #[doc = "Asynchronous Mode Base Clock Select(Valid only in asynchronous mode)"]
2310 #[inline(always)]
2311 pub fn abcs(
2312 self,
2313 ) -> crate::common::RegisterField<
2314 4,
2315 0x1,
2316 1,
2317 0,
2318 semr::Abcs,
2319 semr::Abcs,
2320 Semr_SPEC,
2321 crate::common::RW,
2322 > {
2323 crate::common::RegisterField::<
2324 4,
2325 0x1,
2326 1,
2327 0,
2328 semr::Abcs,
2329 semr::Abcs,
2330 Semr_SPEC,
2331 crate::common::RW,
2332 >::from_register(self, 0)
2333 }
2334
2335 #[doc = "Asynchronous Mode Extended Base Clock Select1(Valid only in asynchronous mode and SCR.CKE\\[1\\]=0)"]
2336 #[inline(always)]
2337 pub fn abcse(
2338 self,
2339 ) -> crate::common::RegisterField<
2340 3,
2341 0x1,
2342 1,
2343 0,
2344 semr::Abcse,
2345 semr::Abcse,
2346 Semr_SPEC,
2347 crate::common::RW,
2348 > {
2349 crate::common::RegisterField::<
2350 3,
2351 0x1,
2352 1,
2353 0,
2354 semr::Abcse,
2355 semr::Abcse,
2356 Semr_SPEC,
2357 crate::common::RW,
2358 >::from_register(self, 0)
2359 }
2360
2361 #[doc = "Bit Rate Modulation Enable"]
2362 #[inline(always)]
2363 pub fn brme(
2364 self,
2365 ) -> crate::common::RegisterField<
2366 2,
2367 0x1,
2368 1,
2369 0,
2370 semr::Brme,
2371 semr::Brme,
2372 Semr_SPEC,
2373 crate::common::RW,
2374 > {
2375 crate::common::RegisterField::<
2376 2,
2377 0x1,
2378 1,
2379 0,
2380 semr::Brme,
2381 semr::Brme,
2382 Semr_SPEC,
2383 crate::common::RW,
2384 >::from_register(self, 0)
2385 }
2386
2387 #[doc = "These bits are read as 00. The write value should be 00."]
2388 #[inline(always)]
2389 pub fn reserved(
2390 self,
2391 ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, Semr_SPEC, crate::common::RW> {
2392 crate::common::RegisterField::<0,0x3,1,0,u8,u8,Semr_SPEC,crate::common::RW>::from_register(self,0)
2393 }
2394}
2395impl ::core::default::Default for Semr {
2396 #[inline(always)]
2397 fn default() -> Semr {
2398 <crate::RegValueT<Semr_SPEC> as RegisterValue<_>>::new(0)
2399 }
2400}
2401pub mod semr {
2402
2403 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2404 pub struct Rxdesel_SPEC;
2405 pub type Rxdesel = crate::EnumBitfieldStruct<u8, Rxdesel_SPEC>;
2406 impl Rxdesel {
2407 #[doc = "The low level on the RXDn pin is detected as the start bit."]
2408 pub const _0: Self = Self::new(0);
2409
2410 #[doc = "A falling edge on the RXDn pin is detected as the start bit."]
2411 pub const _1: Self = Self::new(1);
2412 }
2413 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2414 pub struct Bgdm_SPEC;
2415 pub type Bgdm = crate::EnumBitfieldStruct<u8, Bgdm_SPEC>;
2416 impl Bgdm {
2417 #[doc = "Baud rate generator outputs the clock with normal frequency."]
2418 pub const _0: Self = Self::new(0);
2419
2420 #[doc = "Baud rate generator outputs the clock with doubled frequency."]
2421 pub const _1: Self = Self::new(1);
2422 }
2423 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2424 pub struct Nfen_SPEC;
2425 pub type Nfen = crate::EnumBitfieldStruct<u8, Nfen_SPEC>;
2426 impl Nfen {
2427 #[doc = "Noise cancellation function for the RXDn/TXDn input signal is disabled."]
2428 pub const _0: Self = Self::new(0);
2429
2430 #[doc = "Noise cancellation function for the RXDn/TXDn input signal is enabled."]
2431 pub const _1: Self = Self::new(1);
2432 }
2433 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2434 pub struct Abcs_SPEC;
2435 pub type Abcs = crate::EnumBitfieldStruct<u8, Abcs_SPEC>;
2436 impl Abcs {
2437 #[doc = "Selects 16 base clock cycles for 1-bit period."]
2438 pub const _0: Self = Self::new(0);
2439
2440 #[doc = "Selects 8 base clock cycles for 1-bit period."]
2441 pub const _1: Self = Self::new(1);
2442 }
2443 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2444 pub struct Abcse_SPEC;
2445 pub type Abcse = crate::EnumBitfieldStruct<u8, Abcse_SPEC>;
2446 impl Abcse {
2447 #[doc = "Clock cycles for 1-bit period is decided with combination between BGDM and ABCS in SEMR."]
2448 pub const _0: Self = Self::new(0);
2449
2450 #[doc = "Baud rate is 6 base clock cycles for 1-bit period and the clock of a double frequency is output from the baud rate generator."]
2451 pub const _1: Self = Self::new(1);
2452 }
2453 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2454 pub struct Brme_SPEC;
2455 pub type Brme = crate::EnumBitfieldStruct<u8, Brme_SPEC>;
2456 impl Brme {
2457 #[doc = "Bit rate modulation function is disabled."]
2458 pub const _0: Self = Self::new(0);
2459
2460 #[doc = "Bit rate modulation function is enabled."]
2461 pub const _1: Self = Self::new(1);
2462 }
2463}
2464#[doc(hidden)]
2465#[derive(Copy, Clone, Eq, PartialEq)]
2466pub struct Snfr_SPEC;
2467impl crate::sealed::RegSpec for Snfr_SPEC {
2468 type DataType = u8;
2469}
2470
2471#[doc = "Noise Filter Setting Register"]
2472pub type Snfr = crate::RegValueT<Snfr_SPEC>;
2473
2474impl Snfr {
2475 #[doc = "These bits are read as 00000. The write value should be 00000."]
2476 #[inline(always)]
2477 pub fn reserved(
2478 self,
2479 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Snfr_SPEC, crate::common::RW> {
2480 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Snfr_SPEC,crate::common::RW>::from_register(self,0)
2481 }
2482
2483 #[doc = "Noise Filter Clock Select"]
2484 #[inline(always)]
2485 pub fn nfcs(
2486 self,
2487 ) -> crate::common::RegisterField<
2488 0,
2489 0x7,
2490 1,
2491 0,
2492 snfr::Nfcs,
2493 snfr::Nfcs,
2494 Snfr_SPEC,
2495 crate::common::RW,
2496 > {
2497 crate::common::RegisterField::<
2498 0,
2499 0x7,
2500 1,
2501 0,
2502 snfr::Nfcs,
2503 snfr::Nfcs,
2504 Snfr_SPEC,
2505 crate::common::RW,
2506 >::from_register(self, 0)
2507 }
2508}
2509impl ::core::default::Default for Snfr {
2510 #[inline(always)]
2511 fn default() -> Snfr {
2512 <crate::RegValueT<Snfr_SPEC> as RegisterValue<_>>::new(0)
2513 }
2514}
2515pub mod snfr {
2516
2517 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2518 pub struct Nfcs_SPEC;
2519 pub type Nfcs = crate::EnumBitfieldStruct<u8, Nfcs_SPEC>;
2520 impl Nfcs {
2521 #[doc = "The clock signal divided by 1 is used with the noise filter.(In asynchronous mode)"]
2522 pub const _000: Self = Self::new(0);
2523
2524 #[doc = "The clock signal divided by 1 is used with the noise filter.(In simple I2C mode)"]
2525 pub const _001: Self = Self::new(1);
2526
2527 #[doc = "The clock signal divided by 2 is used with the noise filter.(In simple I2C mode)"]
2528 pub const _010: Self = Self::new(2);
2529
2530 #[doc = "The clock signal divided by 4 is used with the noise filter.(In simple I2C mode)"]
2531 pub const _011: Self = Self::new(3);
2532
2533 #[doc = "The clock signal divided by 8 is used with the noise filter.(In simple I2C mode)"]
2534 pub const _100: Self = Self::new(4);
2535 }
2536}
2537#[doc(hidden)]
2538#[derive(Copy, Clone, Eq, PartialEq)]
2539pub struct Simr1_SPEC;
2540impl crate::sealed::RegSpec for Simr1_SPEC {
2541 type DataType = u8;
2542}
2543
2544#[doc = "I2C Mode Register 1"]
2545pub type Simr1 = crate::RegValueT<Simr1_SPEC>;
2546
2547impl Simr1 {
2548 #[doc = "SSDA Delay Output SelectCycles below are of the clock signal from the on-chip baud rate generator."]
2549 #[inline(always)]
2550 pub fn iicdl(
2551 self,
2552 ) -> crate::common::RegisterField<
2553 3,
2554 0x1f,
2555 1,
2556 0,
2557 simr1::Iicdl,
2558 simr1::Iicdl,
2559 Simr1_SPEC,
2560 crate::common::RW,
2561 > {
2562 crate::common::RegisterField::<
2563 3,
2564 0x1f,
2565 1,
2566 0,
2567 simr1::Iicdl,
2568 simr1::Iicdl,
2569 Simr1_SPEC,
2570 crate::common::RW,
2571 >::from_register(self, 0)
2572 }
2573
2574 #[doc = "These bits are read as 00. The write value should be 00."]
2575 #[inline(always)]
2576 pub fn reserved(
2577 self,
2578 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Simr1_SPEC, crate::common::RW> {
2579 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Simr1_SPEC,crate::common::RW>::from_register(self,0)
2580 }
2581
2582 #[doc = "Simple I2C Mode Select"]
2583 #[inline(always)]
2584 pub fn iicm(
2585 self,
2586 ) -> crate::common::RegisterField<
2587 0,
2588 0x1,
2589 1,
2590 0,
2591 simr1::Iicm,
2592 simr1::Iicm,
2593 Simr1_SPEC,
2594 crate::common::RW,
2595 > {
2596 crate::common::RegisterField::<
2597 0,
2598 0x1,
2599 1,
2600 0,
2601 simr1::Iicm,
2602 simr1::Iicm,
2603 Simr1_SPEC,
2604 crate::common::RW,
2605 >::from_register(self, 0)
2606 }
2607}
2608impl ::core::default::Default for Simr1 {
2609 #[inline(always)]
2610 fn default() -> Simr1 {
2611 <crate::RegValueT<Simr1_SPEC> as RegisterValue<_>>::new(0)
2612 }
2613}
2614pub mod simr1 {
2615
2616 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2617 pub struct Iicdl_SPEC;
2618 pub type Iicdl = crate::EnumBitfieldStruct<u8, Iicdl_SPEC>;
2619 impl Iicdl {
2620 #[doc = "No output delay"]
2621 pub const _00000: Self = Self::new(0);
2622 }
2623 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2624 pub struct Iicm_SPEC;
2625 pub type Iicm = crate::EnumBitfieldStruct<u8, Iicm_SPEC>;
2626 impl Iicm {
2627 #[doc = "Asynchronous mode, Multi-processor mode, Clock synchronous mode(SCMR.SMIF=0) /Smart card interface mode(SCMR.SMIF=1)"]
2628 pub const _0: Self = Self::new(0);
2629
2630 #[doc = "Simple I2C mode(SCMR.SMIF=0) / Setting prohibited.(SCMR.SMIF=1)"]
2631 pub const _1: Self = Self::new(1);
2632 }
2633}
2634#[doc(hidden)]
2635#[derive(Copy, Clone, Eq, PartialEq)]
2636pub struct Simr2_SPEC;
2637impl crate::sealed::RegSpec for Simr2_SPEC {
2638 type DataType = u8;
2639}
2640
2641#[doc = "I2C Mode Register 2"]
2642pub type Simr2 = crate::RegValueT<Simr2_SPEC>;
2643
2644impl Simr2 {
2645 #[doc = "ACK Transmission Data"]
2646 #[inline(always)]
2647 pub fn iicackt(
2648 self,
2649 ) -> crate::common::RegisterField<
2650 5,
2651 0x1,
2652 1,
2653 0,
2654 simr2::Iicackt,
2655 simr2::Iicackt,
2656 Simr2_SPEC,
2657 crate::common::RW,
2658 > {
2659 crate::common::RegisterField::<
2660 5,
2661 0x1,
2662 1,
2663 0,
2664 simr2::Iicackt,
2665 simr2::Iicackt,
2666 Simr2_SPEC,
2667 crate::common::RW,
2668 >::from_register(self, 0)
2669 }
2670
2671 #[doc = "These bits are read as 000. The write value should be 000."]
2672 #[inline(always)]
2673 pub fn reserved(
2674 self,
2675 ) -> crate::common::RegisterField<2, 0x7, 1, 0, u8, u8, Simr2_SPEC, crate::common::RW> {
2676 crate::common::RegisterField::<2,0x7,1,0,u8,u8,Simr2_SPEC,crate::common::RW>::from_register(self,0)
2677 }
2678
2679 #[doc = "Clock Synchronization"]
2680 #[inline(always)]
2681 pub fn iiccsc(
2682 self,
2683 ) -> crate::common::RegisterField<
2684 1,
2685 0x1,
2686 1,
2687 0,
2688 simr2::Iiccsc,
2689 simr2::Iiccsc,
2690 Simr2_SPEC,
2691 crate::common::RW,
2692 > {
2693 crate::common::RegisterField::<
2694 1,
2695 0x1,
2696 1,
2697 0,
2698 simr2::Iiccsc,
2699 simr2::Iiccsc,
2700 Simr2_SPEC,
2701 crate::common::RW,
2702 >::from_register(self, 0)
2703 }
2704
2705 #[doc = "I2C Interrupt Mode Select"]
2706 #[inline(always)]
2707 pub fn iicintm(
2708 self,
2709 ) -> crate::common::RegisterField<
2710 0,
2711 0x1,
2712 1,
2713 0,
2714 simr2::Iicintm,
2715 simr2::Iicintm,
2716 Simr2_SPEC,
2717 crate::common::RW,
2718 > {
2719 crate::common::RegisterField::<
2720 0,
2721 0x1,
2722 1,
2723 0,
2724 simr2::Iicintm,
2725 simr2::Iicintm,
2726 Simr2_SPEC,
2727 crate::common::RW,
2728 >::from_register(self, 0)
2729 }
2730}
2731impl ::core::default::Default for Simr2 {
2732 #[inline(always)]
2733 fn default() -> Simr2 {
2734 <crate::RegValueT<Simr2_SPEC> as RegisterValue<_>>::new(0)
2735 }
2736}
2737pub mod simr2 {
2738
2739 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2740 pub struct Iicackt_SPEC;
2741 pub type Iicackt = crate::EnumBitfieldStruct<u8, Iicackt_SPEC>;
2742 impl Iicackt {
2743 #[doc = "ACK transmission"]
2744 pub const _0: Self = Self::new(0);
2745
2746 #[doc = "NACK transmission and reception of ACK/NACK"]
2747 pub const _1: Self = Self::new(1);
2748 }
2749 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2750 pub struct Iiccsc_SPEC;
2751 pub type Iiccsc = crate::EnumBitfieldStruct<u8, Iiccsc_SPEC>;
2752 impl Iiccsc {
2753 #[doc = "No synchronization with the clock signal"]
2754 pub const _0: Self = Self::new(0);
2755
2756 #[doc = "Synchronization with the clock signal"]
2757 pub const _1: Self = Self::new(1);
2758 }
2759 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2760 pub struct Iicintm_SPEC;
2761 pub type Iicintm = crate::EnumBitfieldStruct<u8, Iicintm_SPEC>;
2762 impl Iicintm {
2763 #[doc = "Use ACK/NACK interrupts."]
2764 pub const _0: Self = Self::new(0);
2765
2766 #[doc = "Use reception and transmission interrupts"]
2767 pub const _1: Self = Self::new(1);
2768 }
2769}
2770#[doc(hidden)]
2771#[derive(Copy, Clone, Eq, PartialEq)]
2772pub struct Simr3_SPEC;
2773impl crate::sealed::RegSpec for Simr3_SPEC {
2774 type DataType = u8;
2775}
2776
2777#[doc = "IIC Mode Register 3"]
2778pub type Simr3 = crate::RegValueT<Simr3_SPEC>;
2779
2780impl Simr3 {
2781 #[doc = "SCL Output Select"]
2782 #[inline(always)]
2783 pub fn iicscls(
2784 self,
2785 ) -> crate::common::RegisterField<
2786 6,
2787 0x3,
2788 1,
2789 0,
2790 simr3::Iicscls,
2791 simr3::Iicscls,
2792 Simr3_SPEC,
2793 crate::common::RW,
2794 > {
2795 crate::common::RegisterField::<
2796 6,
2797 0x3,
2798 1,
2799 0,
2800 simr3::Iicscls,
2801 simr3::Iicscls,
2802 Simr3_SPEC,
2803 crate::common::RW,
2804 >::from_register(self, 0)
2805 }
2806
2807 #[doc = "SDA Output Select"]
2808 #[inline(always)]
2809 pub fn iicsdas(
2810 self,
2811 ) -> crate::common::RegisterField<
2812 4,
2813 0x3,
2814 1,
2815 0,
2816 simr3::Iicsdas,
2817 simr3::Iicsdas,
2818 Simr3_SPEC,
2819 crate::common::RW,
2820 > {
2821 crate::common::RegisterField::<
2822 4,
2823 0x3,
2824 1,
2825 0,
2826 simr3::Iicsdas,
2827 simr3::Iicsdas,
2828 Simr3_SPEC,
2829 crate::common::RW,
2830 >::from_register(self, 0)
2831 }
2832
2833 #[doc = "Issuing of Start, Restart, or Stop Condition Completed Flag(When 0 is written to IICSTIF, it is cleared to 0.)"]
2834 #[inline(always)]
2835 pub fn iicstif(
2836 self,
2837 ) -> crate::common::RegisterField<
2838 3,
2839 0x1,
2840 1,
2841 0,
2842 simr3::Iicstif,
2843 simr3::Iicstif,
2844 Simr3_SPEC,
2845 crate::common::RW,
2846 > {
2847 crate::common::RegisterField::<
2848 3,
2849 0x1,
2850 1,
2851 0,
2852 simr3::Iicstif,
2853 simr3::Iicstif,
2854 Simr3_SPEC,
2855 crate::common::RW,
2856 >::from_register(self, 0)
2857 }
2858
2859 #[doc = "Stop Condition Generation"]
2860 #[inline(always)]
2861 pub fn iicstpreq(
2862 self,
2863 ) -> crate::common::RegisterField<
2864 2,
2865 0x1,
2866 1,
2867 0,
2868 simr3::Iicstpreq,
2869 simr3::Iicstpreq,
2870 Simr3_SPEC,
2871 crate::common::RW,
2872 > {
2873 crate::common::RegisterField::<
2874 2,
2875 0x1,
2876 1,
2877 0,
2878 simr3::Iicstpreq,
2879 simr3::Iicstpreq,
2880 Simr3_SPEC,
2881 crate::common::RW,
2882 >::from_register(self, 0)
2883 }
2884
2885 #[doc = "Restart Condition Generation"]
2886 #[inline(always)]
2887 pub fn iicrstareq(
2888 self,
2889 ) -> crate::common::RegisterField<
2890 1,
2891 0x1,
2892 1,
2893 0,
2894 simr3::Iicrstareq,
2895 simr3::Iicrstareq,
2896 Simr3_SPEC,
2897 crate::common::RW,
2898 > {
2899 crate::common::RegisterField::<
2900 1,
2901 0x1,
2902 1,
2903 0,
2904 simr3::Iicrstareq,
2905 simr3::Iicrstareq,
2906 Simr3_SPEC,
2907 crate::common::RW,
2908 >::from_register(self, 0)
2909 }
2910
2911 #[doc = "Start Condition Generation"]
2912 #[inline(always)]
2913 pub fn iicstareq(
2914 self,
2915 ) -> crate::common::RegisterField<
2916 0,
2917 0x1,
2918 1,
2919 0,
2920 simr3::Iicstareq,
2921 simr3::Iicstareq,
2922 Simr3_SPEC,
2923 crate::common::RW,
2924 > {
2925 crate::common::RegisterField::<
2926 0,
2927 0x1,
2928 1,
2929 0,
2930 simr3::Iicstareq,
2931 simr3::Iicstareq,
2932 Simr3_SPEC,
2933 crate::common::RW,
2934 >::from_register(self, 0)
2935 }
2936}
2937impl ::core::default::Default for Simr3 {
2938 #[inline(always)]
2939 fn default() -> Simr3 {
2940 <crate::RegValueT<Simr3_SPEC> as RegisterValue<_>>::new(0)
2941 }
2942}
2943pub mod simr3 {
2944
2945 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2946 pub struct Iicscls_SPEC;
2947 pub type Iicscls = crate::EnumBitfieldStruct<u8, Iicscls_SPEC>;
2948 impl Iicscls {
2949 #[doc = "Serial clock output"]
2950 pub const _00: Self = Self::new(0);
2951
2952 #[doc = "Generate a start, restart, or stop condition."]
2953 pub const _01: Self = Self::new(1);
2954
2955 #[doc = "Output the low level on the SSCLn pin."]
2956 pub const _10: Self = Self::new(2);
2957
2958 #[doc = "Place the SSCLn pin in the high-impedance state."]
2959 pub const _11: Self = Self::new(3);
2960 }
2961 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2962 pub struct Iicsdas_SPEC;
2963 pub type Iicsdas = crate::EnumBitfieldStruct<u8, Iicsdas_SPEC>;
2964 impl Iicsdas {
2965 #[doc = "Serial data output"]
2966 pub const _00: Self = Self::new(0);
2967
2968 #[doc = "Generate a start, restart, or stop condition."]
2969 pub const _01: Self = Self::new(1);
2970
2971 #[doc = "Output the low level on the SSDAn pin."]
2972 pub const _10: Self = Self::new(2);
2973
2974 #[doc = "Place the SSDAn pin in the high-impedance state."]
2975 pub const _11: Self = Self::new(3);
2976 }
2977 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2978 pub struct Iicstif_SPEC;
2979 pub type Iicstif = crate::EnumBitfieldStruct<u8, Iicstif_SPEC>;
2980 impl Iicstif {
2981 #[doc = "There are no requests for generating conditions or a condition is being generated."]
2982 pub const _0: Self = Self::new(0);
2983
2984 #[doc = "A start, restart, or stop condition is completely generated."]
2985 pub const _1: Self = Self::new(1);
2986 }
2987 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2988 pub struct Iicstpreq_SPEC;
2989 pub type Iicstpreq = crate::EnumBitfieldStruct<u8, Iicstpreq_SPEC>;
2990 impl Iicstpreq {
2991 #[doc = "A stop condition is not generated."]
2992 pub const _0: Self = Self::new(0);
2993
2994 #[doc = "A stop condition is generated."]
2995 pub const _1: Self = Self::new(1);
2996 }
2997 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2998 pub struct Iicrstareq_SPEC;
2999 pub type Iicrstareq = crate::EnumBitfieldStruct<u8, Iicrstareq_SPEC>;
3000 impl Iicrstareq {
3001 #[doc = "A restart condition is not generated."]
3002 pub const _0: Self = Self::new(0);
3003
3004 #[doc = "A restart condition is generated."]
3005 pub const _1: Self = Self::new(1);
3006 }
3007 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3008 pub struct Iicstareq_SPEC;
3009 pub type Iicstareq = crate::EnumBitfieldStruct<u8, Iicstareq_SPEC>;
3010 impl Iicstareq {
3011 #[doc = "A start condition is not generated."]
3012 pub const _0: Self = Self::new(0);
3013
3014 #[doc = "A start condition is generated."]
3015 pub const _1: Self = Self::new(1);
3016 }
3017}
3018#[doc(hidden)]
3019#[derive(Copy, Clone, Eq, PartialEq)]
3020pub struct Sisr_SPEC;
3021impl crate::sealed::RegSpec for Sisr_SPEC {
3022 type DataType = u8;
3023}
3024
3025#[doc = "IIC Status Register"]
3026pub type Sisr = crate::RegValueT<Sisr_SPEC>;
3027
3028impl Sisr {
3029 #[doc = "This bit is read as 0."]
3030 #[inline(always)]
3031 pub fn reserved(
3032 self,
3033 ) -> crate::common::RegisterFieldBool<1, 1, 0, Sisr_SPEC, crate::common::R> {
3034 crate::common::RegisterFieldBool::<1, 1, 0, Sisr_SPEC, crate::common::R>::from_register(
3035 self, 0,
3036 )
3037 }
3038
3039 #[doc = "ACK Reception Data Flag"]
3040 #[inline(always)]
3041 pub fn iicackr(
3042 self,
3043 ) -> crate::common::RegisterField<
3044 0,
3045 0x1,
3046 1,
3047 0,
3048 sisr::Iicackr,
3049 sisr::Iicackr,
3050 Sisr_SPEC,
3051 crate::common::R,
3052 > {
3053 crate::common::RegisterField::<
3054 0,
3055 0x1,
3056 1,
3057 0,
3058 sisr::Iicackr,
3059 sisr::Iicackr,
3060 Sisr_SPEC,
3061 crate::common::R,
3062 >::from_register(self, 0)
3063 }
3064}
3065impl ::core::default::Default for Sisr {
3066 #[inline(always)]
3067 fn default() -> Sisr {
3068 <crate::RegValueT<Sisr_SPEC> as RegisterValue<_>>::new(0)
3069 }
3070}
3071pub mod sisr {
3072
3073 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3074 pub struct Iicackr_SPEC;
3075 pub type Iicackr = crate::EnumBitfieldStruct<u8, Iicackr_SPEC>;
3076 impl Iicackr {
3077 #[doc = "ACK received"]
3078 pub const _0: Self = Self::new(0);
3079
3080 #[doc = "NACK received"]
3081 pub const _1: Self = Self::new(1);
3082 }
3083}
3084#[doc(hidden)]
3085#[derive(Copy, Clone, Eq, PartialEq)]
3086pub struct Spmr_SPEC;
3087impl crate::sealed::RegSpec for Spmr_SPEC {
3088 type DataType = u8;
3089}
3090
3091#[doc = "SPI Mode Register"]
3092pub type Spmr = crate::RegValueT<Spmr_SPEC>;
3093
3094impl Spmr {
3095 #[doc = "Clock Phase Select"]
3096 #[inline(always)]
3097 pub fn ckph(
3098 self,
3099 ) -> crate::common::RegisterField<
3100 7,
3101 0x1,
3102 1,
3103 0,
3104 spmr::Ckph,
3105 spmr::Ckph,
3106 Spmr_SPEC,
3107 crate::common::RW,
3108 > {
3109 crate::common::RegisterField::<
3110 7,
3111 0x1,
3112 1,
3113 0,
3114 spmr::Ckph,
3115 spmr::Ckph,
3116 Spmr_SPEC,
3117 crate::common::RW,
3118 >::from_register(self, 0)
3119 }
3120
3121 #[doc = "Clock Polarity Select"]
3122 #[inline(always)]
3123 pub fn ckpol(
3124 self,
3125 ) -> crate::common::RegisterField<
3126 6,
3127 0x1,
3128 1,
3129 0,
3130 spmr::Ckpol,
3131 spmr::Ckpol,
3132 Spmr_SPEC,
3133 crate::common::RW,
3134 > {
3135 crate::common::RegisterField::<
3136 6,
3137 0x1,
3138 1,
3139 0,
3140 spmr::Ckpol,
3141 spmr::Ckpol,
3142 Spmr_SPEC,
3143 crate::common::RW,
3144 >::from_register(self, 0)
3145 }
3146
3147 #[doc = "Mode Fault Flag"]
3148 #[inline(always)]
3149 pub fn mff(
3150 self,
3151 ) -> crate::common::RegisterField<
3152 4,
3153 0x1,
3154 1,
3155 0,
3156 spmr::Mff,
3157 spmr::Mff,
3158 Spmr_SPEC,
3159 crate::common::RW,
3160 > {
3161 crate::common::RegisterField::<
3162 4,
3163 0x1,
3164 1,
3165 0,
3166 spmr::Mff,
3167 spmr::Mff,
3168 Spmr_SPEC,
3169 crate::common::RW,
3170 >::from_register(self, 0)
3171 }
3172
3173 #[doc = "This bit is read as 0. The write value should be 0."]
3174 #[inline(always)]
3175 pub fn reserved(
3176 self,
3177 ) -> crate::common::RegisterFieldBool<3, 1, 0, Spmr_SPEC, crate::common::RW> {
3178 crate::common::RegisterFieldBool::<3, 1, 0, Spmr_SPEC, crate::common::RW>::from_register(
3179 self, 0,
3180 )
3181 }
3182
3183 #[doc = "Master Slave Select"]
3184 #[inline(always)]
3185 pub fn mss(
3186 self,
3187 ) -> crate::common::RegisterField<
3188 2,
3189 0x1,
3190 1,
3191 0,
3192 spmr::Mss,
3193 spmr::Mss,
3194 Spmr_SPEC,
3195 crate::common::RW,
3196 > {
3197 crate::common::RegisterField::<
3198 2,
3199 0x1,
3200 1,
3201 0,
3202 spmr::Mss,
3203 spmr::Mss,
3204 Spmr_SPEC,
3205 crate::common::RW,
3206 >::from_register(self, 0)
3207 }
3208
3209 #[doc = "CTS Enable"]
3210 #[inline(always)]
3211 pub fn ctse(
3212 self,
3213 ) -> crate::common::RegisterField<
3214 1,
3215 0x1,
3216 1,
3217 0,
3218 spmr::Ctse,
3219 spmr::Ctse,
3220 Spmr_SPEC,
3221 crate::common::RW,
3222 > {
3223 crate::common::RegisterField::<
3224 1,
3225 0x1,
3226 1,
3227 0,
3228 spmr::Ctse,
3229 spmr::Ctse,
3230 Spmr_SPEC,
3231 crate::common::RW,
3232 >::from_register(self, 0)
3233 }
3234
3235 #[doc = "SSn# Pin Function Enable"]
3236 #[inline(always)]
3237 pub fn sse(
3238 self,
3239 ) -> crate::common::RegisterField<
3240 0,
3241 0x1,
3242 1,
3243 0,
3244 spmr::Sse,
3245 spmr::Sse,
3246 Spmr_SPEC,
3247 crate::common::RW,
3248 > {
3249 crate::common::RegisterField::<
3250 0,
3251 0x1,
3252 1,
3253 0,
3254 spmr::Sse,
3255 spmr::Sse,
3256 Spmr_SPEC,
3257 crate::common::RW,
3258 >::from_register(self, 0)
3259 }
3260}
3261impl ::core::default::Default for Spmr {
3262 #[inline(always)]
3263 fn default() -> Spmr {
3264 <crate::RegValueT<Spmr_SPEC> as RegisterValue<_>>::new(0)
3265 }
3266}
3267pub mod spmr {
3268
3269 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3270 pub struct Ckph_SPEC;
3271 pub type Ckph = crate::EnumBitfieldStruct<u8, Ckph_SPEC>;
3272 impl Ckph {
3273 #[doc = "Clock is not delayed."]
3274 pub const _0: Self = Self::new(0);
3275
3276 #[doc = "Clock is delayed."]
3277 pub const _1: Self = Self::new(1);
3278 }
3279 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3280 pub struct Ckpol_SPEC;
3281 pub type Ckpol = crate::EnumBitfieldStruct<u8, Ckpol_SPEC>;
3282 impl Ckpol {
3283 #[doc = "Clock polarity is not inverted."]
3284 pub const _0: Self = Self::new(0);
3285
3286 #[doc = "Clock polarity is inverted"]
3287 pub const _1: Self = Self::new(1);
3288 }
3289 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3290 pub struct Mff_SPEC;
3291 pub type Mff = crate::EnumBitfieldStruct<u8, Mff_SPEC>;
3292 impl Mff {
3293 #[doc = "No mode fault error"]
3294 pub const _0: Self = Self::new(0);
3295
3296 #[doc = "Mode fault error"]
3297 pub const _1: Self = Self::new(1);
3298 }
3299 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3300 pub struct Mss_SPEC;
3301 pub type Mss = crate::EnumBitfieldStruct<u8, Mss_SPEC>;
3302 impl Mss {
3303 #[doc = "Transmission is through the TXDn pin and reception is through the RXDn pin (master mode)."]
3304 pub const _0: Self = Self::new(0);
3305
3306 #[doc = "Reception is through the TXDn pin and transmission is through the RXDn pin (slave mode)."]
3307 pub const _1: Self = Self::new(1);
3308 }
3309 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3310 pub struct Ctse_SPEC;
3311 pub type Ctse = crate::EnumBitfieldStruct<u8, Ctse_SPEC>;
3312 impl Ctse {
3313 #[doc = "CTS function is disabled (RTS output function is enabled)."]
3314 pub const _0: Self = Self::new(0);
3315
3316 #[doc = "CTS function is enabled."]
3317 pub const _1: Self = Self::new(1);
3318 }
3319 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3320 pub struct Sse_SPEC;
3321 pub type Sse = crate::EnumBitfieldStruct<u8, Sse_SPEC>;
3322 impl Sse {
3323 #[doc = "SSn# pin function is disabled."]
3324 pub const _0: Self = Self::new(0);
3325
3326 #[doc = "SSn# pin function is enabled."]
3327 pub const _1: Self = Self::new(1);
3328 }
3329}
3330#[doc(hidden)]
3331#[derive(Copy, Clone, Eq, PartialEq)]
3332pub struct Tdrhl_SPEC;
3333impl crate::sealed::RegSpec for Tdrhl_SPEC {
3334 type DataType = u16;
3335}
3336
3337#[doc = "Transmit 9-bit Data Register"]
3338pub type Tdrhl = crate::RegValueT<Tdrhl_SPEC>;
3339
3340impl Tdrhl {
3341 #[doc = "TDRHL is a 16-bit register that stores transmit data."]
3342 #[inline(always)]
3343 pub fn tdrhl(
3344 self,
3345 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Tdrhl_SPEC, crate::common::RW>
3346 {
3347 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Tdrhl_SPEC,crate::common::RW>::from_register(self,0)
3348 }
3349}
3350impl ::core::default::Default for Tdrhl {
3351 #[inline(always)]
3352 fn default() -> Tdrhl {
3353 <crate::RegValueT<Tdrhl_SPEC> as RegisterValue<_>>::new(65535)
3354 }
3355}
3356
3357#[doc(hidden)]
3358#[derive(Copy, Clone, Eq, PartialEq)]
3359pub struct Ftdrhl_SPEC;
3360impl crate::sealed::RegSpec for Ftdrhl_SPEC {
3361 type DataType = u16;
3362}
3363
3364#[doc = "Transmit FIFO Data Register HL"]
3365pub type Ftdrhl = crate::RegValueT<Ftdrhl_SPEC>;
3366
3367impl Ftdrhl {
3368 #[doc = "The write value should be 111111."]
3369 #[inline(always)]
3370 pub fn reserved(
3371 self,
3372 ) -> crate::common::RegisterField<10, 0x3f, 1, 0, u8, u8, Ftdrhl_SPEC, crate::common::W> {
3373 crate::common::RegisterField::<10,0x3f,1,0,u8,u8,Ftdrhl_SPEC,crate::common::W>::from_register(self,0)
3374 }
3375
3376 #[doc = "Multi-processor transfer bit flag(Valid only in asynchronous mode and SMR.MP=1 and FIFO selected)"]
3377 #[inline(always)]
3378 pub fn mpbt(
3379 self,
3380 ) -> crate::common::RegisterField<
3381 9,
3382 0x1,
3383 1,
3384 0,
3385 ftdrhl::Mpbt,
3386 ftdrhl::Mpbt,
3387 Ftdrhl_SPEC,
3388 crate::common::W,
3389 > {
3390 crate::common::RegisterField::<
3391 9,
3392 0x1,
3393 1,
3394 0,
3395 ftdrhl::Mpbt,
3396 ftdrhl::Mpbt,
3397 Ftdrhl_SPEC,
3398 crate::common::W,
3399 >::from_register(self, 0)
3400 }
3401
3402 #[doc = "Serial transmit data (Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
3403 #[inline(always)]
3404 pub fn tdat(
3405 self,
3406 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Ftdrhl_SPEC, crate::common::W> {
3407 crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Ftdrhl_SPEC,crate::common::W>::from_register(self,0)
3408 }
3409}
3410impl ::core::default::Default for Ftdrhl {
3411 #[inline(always)]
3412 fn default() -> Ftdrhl {
3413 <crate::RegValueT<Ftdrhl_SPEC> as RegisterValue<_>>::new(65535)
3414 }
3415}
3416pub mod ftdrhl {
3417
3418 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3419 pub struct Mpbt_SPEC;
3420 pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
3421 impl Mpbt {
3422 #[doc = "Data transmission cycles"]
3423 pub const _0: Self = Self::new(0);
3424
3425 #[doc = "ID transmission cycles"]
3426 pub const _1: Self = Self::new(1);
3427 }
3428}
3429#[doc(hidden)]
3430#[derive(Copy, Clone, Eq, PartialEq)]
3431pub struct Ftdrh_SPEC;
3432impl crate::sealed::RegSpec for Ftdrh_SPEC {
3433 type DataType = u8;
3434}
3435
3436#[doc = "Transmit FIFO Data Register H"]
3437pub type Ftdrh = crate::RegValueT<Ftdrh_SPEC>;
3438
3439impl Ftdrh {
3440 #[doc = "The write value should be 111111."]
3441 #[inline(always)]
3442 pub fn reserved(
3443 self,
3444 ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Ftdrh_SPEC, crate::common::W> {
3445 crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Ftdrh_SPEC,crate::common::W>::from_register(self,0)
3446 }
3447
3448 #[doc = "Multi-processor transfer bit flag(Valid only in asynchronous mode and SMR.MP=1 and FIFO selected)"]
3449 #[inline(always)]
3450 pub fn mpbt(
3451 self,
3452 ) -> crate::common::RegisterField<
3453 1,
3454 0x1,
3455 1,
3456 0,
3457 ftdrh::Mpbt,
3458 ftdrh::Mpbt,
3459 Ftdrh_SPEC,
3460 crate::common::W,
3461 > {
3462 crate::common::RegisterField::<
3463 1,
3464 0x1,
3465 1,
3466 0,
3467 ftdrh::Mpbt,
3468 ftdrh::Mpbt,
3469 Ftdrh_SPEC,
3470 crate::common::W,
3471 >::from_register(self, 0)
3472 }
3473
3474 #[doc = "Serial transmit data (b8) (Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
3475 #[inline(always)]
3476 pub fn tdath(self) -> crate::common::RegisterFieldBool<0, 1, 0, Ftdrh_SPEC, crate::common::W> {
3477 crate::common::RegisterFieldBool::<0, 1, 0, Ftdrh_SPEC, crate::common::W>::from_register(
3478 self, 0,
3479 )
3480 }
3481}
3482impl ::core::default::Default for Ftdrh {
3483 #[inline(always)]
3484 fn default() -> Ftdrh {
3485 <crate::RegValueT<Ftdrh_SPEC> as RegisterValue<_>>::new(255)
3486 }
3487}
3488pub mod ftdrh {
3489
3490 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3491 pub struct Mpbt_SPEC;
3492 pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
3493 impl Mpbt {
3494 #[doc = "Data transmission cycles"]
3495 pub const _0: Self = Self::new(0);
3496
3497 #[doc = "ID transmission cycles"]
3498 pub const _1: Self = Self::new(1);
3499 }
3500}
3501#[doc(hidden)]
3502#[derive(Copy, Clone, Eq, PartialEq)]
3503pub struct Ftdrl_SPEC;
3504impl crate::sealed::RegSpec for Ftdrl_SPEC {
3505 type DataType = u8;
3506}
3507
3508#[doc = "Transmit FIFO Data Register L"]
3509pub type Ftdrl = crate::RegValueT<Ftdrl_SPEC>;
3510
3511impl Ftdrl {
3512 #[doc = "Serial transmit data(b7-b0) (Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
3513 #[inline(always)]
3514 pub fn tdatl(
3515 self,
3516 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Ftdrl_SPEC, crate::common::W> {
3517 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Ftdrl_SPEC,crate::common::W>::from_register(self,0)
3518 }
3519}
3520impl ::core::default::Default for Ftdrl {
3521 #[inline(always)]
3522 fn default() -> Ftdrl {
3523 <crate::RegValueT<Ftdrl_SPEC> as RegisterValue<_>>::new(255)
3524 }
3525}
3526
3527#[doc(hidden)]
3528#[derive(Copy, Clone, Eq, PartialEq)]
3529pub struct Rdrhl_SPEC;
3530impl crate::sealed::RegSpec for Rdrhl_SPEC {
3531 type DataType = u16;
3532}
3533
3534#[doc = "Receive 9-bit Data Register"]
3535pub type Rdrhl = crate::RegValueT<Rdrhl_SPEC>;
3536
3537impl Rdrhl {
3538 #[doc = "RDRHL is an 16-bit register that stores receive data."]
3539 #[inline(always)]
3540 pub fn rdrhl(
3541 self,
3542 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Rdrhl_SPEC, crate::common::R> {
3543 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Rdrhl_SPEC,crate::common::R>::from_register(self,0)
3544 }
3545}
3546impl ::core::default::Default for Rdrhl {
3547 #[inline(always)]
3548 fn default() -> Rdrhl {
3549 <crate::RegValueT<Rdrhl_SPEC> as RegisterValue<_>>::new(0)
3550 }
3551}
3552
3553#[doc(hidden)]
3554#[derive(Copy, Clone, Eq, PartialEq)]
3555pub struct Frdrhl_SPEC;
3556impl crate::sealed::RegSpec for Frdrhl_SPEC {
3557 type DataType = u16;
3558}
3559
3560#[doc = "Receive FIFO Data Register HL"]
3561pub type Frdrhl = crate::RegValueT<Frdrhl_SPEC>;
3562
3563impl Frdrhl {
3564 #[doc = "This bit is read as 0."]
3565 #[inline(always)]
3566 pub fn reserved(
3567 self,
3568 ) -> crate::common::RegisterFieldBool<15, 1, 0, Frdrhl_SPEC, crate::common::R> {
3569 crate::common::RegisterFieldBool::<15, 1, 0, Frdrhl_SPEC, crate::common::R>::from_register(
3570 self, 0,
3571 )
3572 }
3573
3574 #[doc = "Receive FIFO data full flag(It is same as SSR.RDF)"]
3575 #[inline(always)]
3576 pub fn rdf(
3577 self,
3578 ) -> crate::common::RegisterField<
3579 14,
3580 0x1,
3581 1,
3582 0,
3583 frdrhl::Rdf,
3584 frdrhl::Rdf,
3585 Frdrhl_SPEC,
3586 crate::common::R,
3587 > {
3588 crate::common::RegisterField::<
3589 14,
3590 0x1,
3591 1,
3592 0,
3593 frdrhl::Rdf,
3594 frdrhl::Rdf,
3595 Frdrhl_SPEC,
3596 crate::common::R,
3597 >::from_register(self, 0)
3598 }
3599
3600 #[doc = "Overrun error flag(It is same as SSR.ORER)"]
3601 #[inline(always)]
3602 pub fn orer(
3603 self,
3604 ) -> crate::common::RegisterField<
3605 13,
3606 0x1,
3607 1,
3608 0,
3609 frdrhl::Orer,
3610 frdrhl::Orer,
3611 Frdrhl_SPEC,
3612 crate::common::R,
3613 > {
3614 crate::common::RegisterField::<
3615 13,
3616 0x1,
3617 1,
3618 0,
3619 frdrhl::Orer,
3620 frdrhl::Orer,
3621 Frdrhl_SPEC,
3622 crate::common::R,
3623 >::from_register(self, 0)
3624 }
3625
3626 #[doc = "Framing error flag"]
3627 #[inline(always)]
3628 pub fn fer(
3629 self,
3630 ) -> crate::common::RegisterField<
3631 12,
3632 0x1,
3633 1,
3634 0,
3635 frdrhl::Fer,
3636 frdrhl::Fer,
3637 Frdrhl_SPEC,
3638 crate::common::R,
3639 > {
3640 crate::common::RegisterField::<
3641 12,
3642 0x1,
3643 1,
3644 0,
3645 frdrhl::Fer,
3646 frdrhl::Fer,
3647 Frdrhl_SPEC,
3648 crate::common::R,
3649 >::from_register(self, 0)
3650 }
3651
3652 #[doc = "Parity error flag"]
3653 #[inline(always)]
3654 pub fn per(
3655 self,
3656 ) -> crate::common::RegisterField<
3657 11,
3658 0x1,
3659 1,
3660 0,
3661 frdrhl::Per,
3662 frdrhl::Per,
3663 Frdrhl_SPEC,
3664 crate::common::R,
3665 > {
3666 crate::common::RegisterField::<
3667 11,
3668 0x1,
3669 1,
3670 0,
3671 frdrhl::Per,
3672 frdrhl::Per,
3673 Frdrhl_SPEC,
3674 crate::common::R,
3675 >::from_register(self, 0)
3676 }
3677
3678 #[doc = "Receive data ready flag(It is same as SSR.DR)"]
3679 #[inline(always)]
3680 pub fn dr(
3681 self,
3682 ) -> crate::common::RegisterField<
3683 10,
3684 0x1,
3685 1,
3686 0,
3687 frdrhl::Dr,
3688 frdrhl::Dr,
3689 Frdrhl_SPEC,
3690 crate::common::R,
3691 > {
3692 crate::common::RegisterField::<
3693 10,
3694 0x1,
3695 1,
3696 0,
3697 frdrhl::Dr,
3698 frdrhl::Dr,
3699 Frdrhl_SPEC,
3700 crate::common::R,
3701 >::from_register(self, 0)
3702 }
3703
3704 #[doc = "Multi-processor bit flag(Valid only in asynchronous mode with SMR.MP=1 and FIFO selected) It can read multi-processor bit corresponded to serial receive data(RDATA\\[8:0\\])"]
3705 #[inline(always)]
3706 pub fn mpb(
3707 self,
3708 ) -> crate::common::RegisterField<
3709 9,
3710 0x1,
3711 1,
3712 0,
3713 frdrhl::Mpb,
3714 frdrhl::Mpb,
3715 Frdrhl_SPEC,
3716 crate::common::R,
3717 > {
3718 crate::common::RegisterField::<
3719 9,
3720 0x1,
3721 1,
3722 0,
3723 frdrhl::Mpb,
3724 frdrhl::Mpb,
3725 Frdrhl_SPEC,
3726 crate::common::R,
3727 >::from_register(self, 0)
3728 }
3729
3730 #[doc = "Serial receive data(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
3731 #[inline(always)]
3732 pub fn rdat(
3733 self,
3734 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Frdrhl_SPEC, crate::common::R> {
3735 crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Frdrhl_SPEC,crate::common::R>::from_register(self,0)
3736 }
3737}
3738impl ::core::default::Default for Frdrhl {
3739 #[inline(always)]
3740 fn default() -> Frdrhl {
3741 <crate::RegValueT<Frdrhl_SPEC> as RegisterValue<_>>::new(0)
3742 }
3743}
3744pub mod frdrhl {
3745
3746 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3747 pub struct Rdf_SPEC;
3748 pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
3749 impl Rdf {
3750 #[doc = "The quantity of receive data written in FRDRH and FRDRL falls below the specified receive triggering number."]
3751 pub const _0: Self = Self::new(0);
3752
3753 #[doc = "The quantity of receive data written in FRDRH and FRDRL is equal to or greater than the specified receive triggering number."]
3754 pub const _1: Self = Self::new(1);
3755 }
3756 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3757 pub struct Orer_SPEC;
3758 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
3759 impl Orer {
3760 #[doc = "No overrun error occurred."]
3761 pub const _0: Self = Self::new(0);
3762
3763 #[doc = "An overrun error has occurred."]
3764 pub const _1: Self = Self::new(1);
3765 }
3766 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3767 pub struct Fer_SPEC;
3768 pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
3769 impl Fer {
3770 #[doc = "No framing error occurred at the first data of FRDRH and FRDRL."]
3771 pub const _0: Self = Self::new(0);
3772
3773 #[doc = "A framing error has occurred at the first data of FRDRH and FRDRL."]
3774 pub const _1: Self = Self::new(1);
3775 }
3776 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3777 pub struct Per_SPEC;
3778 pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
3779 impl Per {
3780 #[doc = "No parity error occurred at the first data of FRDRH and FRDRL."]
3781 pub const _0: Self = Self::new(0);
3782
3783 #[doc = "A parity error has occurred at the first data of FRDRH and FRDRL."]
3784 pub const _1: Self = Self::new(1);
3785 }
3786 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3787 pub struct Dr_SPEC;
3788 pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
3789 impl Dr {
3790 #[doc = "Receiving is in progress, or no received data has remained in FRDRH and FRDRL after normally completed receiving."]
3791 pub const _0: Self = Self::new(0);
3792
3793 #[doc = "Next receive data has not been received for a period after normal completed receiving."]
3794 pub const _1: Self = Self::new(1);
3795 }
3796 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3797 pub struct Mpb_SPEC;
3798 pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
3799 impl Mpb {
3800 #[doc = "Data transmission cycles"]
3801 pub const _0: Self = Self::new(0);
3802
3803 #[doc = "ID transmission cycles"]
3804 pub const _1: Self = Self::new(1);
3805 }
3806}
3807#[doc(hidden)]
3808#[derive(Copy, Clone, Eq, PartialEq)]
3809pub struct Frdrh_SPEC;
3810impl crate::sealed::RegSpec for Frdrh_SPEC {
3811 type DataType = u8;
3812}
3813
3814#[doc = "Receive FIFO Data Register H"]
3815pub type Frdrh = crate::RegValueT<Frdrh_SPEC>;
3816
3817impl Frdrh {
3818 #[doc = "This bit is read as 0."]
3819 #[inline(always)]
3820 pub fn reserved(
3821 self,
3822 ) -> crate::common::RegisterFieldBool<7, 1, 0, Frdrh_SPEC, crate::common::R> {
3823 crate::common::RegisterFieldBool::<7, 1, 0, Frdrh_SPEC, crate::common::R>::from_register(
3824 self, 0,
3825 )
3826 }
3827
3828 #[doc = "Receive FIFO data full flag(It is same as SSR.RDF)"]
3829 #[inline(always)]
3830 pub fn rdf(
3831 self,
3832 ) -> crate::common::RegisterField<
3833 6,
3834 0x1,
3835 1,
3836 0,
3837 frdrh::Rdf,
3838 frdrh::Rdf,
3839 Frdrh_SPEC,
3840 crate::common::R,
3841 > {
3842 crate::common::RegisterField::<
3843 6,
3844 0x1,
3845 1,
3846 0,
3847 frdrh::Rdf,
3848 frdrh::Rdf,
3849 Frdrh_SPEC,
3850 crate::common::R,
3851 >::from_register(self, 0)
3852 }
3853
3854 #[doc = "Overrun error flag(It is same as SSR.ORER)"]
3855 #[inline(always)]
3856 pub fn orer(
3857 self,
3858 ) -> crate::common::RegisterField<
3859 5,
3860 0x1,
3861 1,
3862 0,
3863 frdrh::Orer,
3864 frdrh::Orer,
3865 Frdrh_SPEC,
3866 crate::common::R,
3867 > {
3868 crate::common::RegisterField::<
3869 5,
3870 0x1,
3871 1,
3872 0,
3873 frdrh::Orer,
3874 frdrh::Orer,
3875 Frdrh_SPEC,
3876 crate::common::R,
3877 >::from_register(self, 0)
3878 }
3879
3880 #[doc = "Framing error flag"]
3881 #[inline(always)]
3882 pub fn fer(
3883 self,
3884 ) -> crate::common::RegisterField<
3885 4,
3886 0x1,
3887 1,
3888 0,
3889 frdrh::Fer,
3890 frdrh::Fer,
3891 Frdrh_SPEC,
3892 crate::common::R,
3893 > {
3894 crate::common::RegisterField::<
3895 4,
3896 0x1,
3897 1,
3898 0,
3899 frdrh::Fer,
3900 frdrh::Fer,
3901 Frdrh_SPEC,
3902 crate::common::R,
3903 >::from_register(self, 0)
3904 }
3905
3906 #[doc = "Parity error flag"]
3907 #[inline(always)]
3908 pub fn per(
3909 self,
3910 ) -> crate::common::RegisterField<
3911 3,
3912 0x1,
3913 1,
3914 0,
3915 frdrh::Per,
3916 frdrh::Per,
3917 Frdrh_SPEC,
3918 crate::common::R,
3919 > {
3920 crate::common::RegisterField::<
3921 3,
3922 0x1,
3923 1,
3924 0,
3925 frdrh::Per,
3926 frdrh::Per,
3927 Frdrh_SPEC,
3928 crate::common::R,
3929 >::from_register(self, 0)
3930 }
3931
3932 #[doc = "Receive data ready flag(It is same as SSR.DR)"]
3933 #[inline(always)]
3934 pub fn dr(
3935 self,
3936 ) -> crate::common::RegisterField<
3937 2,
3938 0x1,
3939 1,
3940 0,
3941 frdrh::Dr,
3942 frdrh::Dr,
3943 Frdrh_SPEC,
3944 crate::common::R,
3945 > {
3946 crate::common::RegisterField::<
3947 2,
3948 0x1,
3949 1,
3950 0,
3951 frdrh::Dr,
3952 frdrh::Dr,
3953 Frdrh_SPEC,
3954 crate::common::R,
3955 >::from_register(self, 0)
3956 }
3957
3958 #[doc = "Multi-processor bit flag(Valid only in asynchronous mode with SMR.MP=1 and FIFO selected) It can read multi-processor bit corresponded to serial receive data(RDATA\\[8:0\\])"]
3959 #[inline(always)]
3960 pub fn mpb(
3961 self,
3962 ) -> crate::common::RegisterField<
3963 1,
3964 0x1,
3965 1,
3966 0,
3967 frdrh::Mpb,
3968 frdrh::Mpb,
3969 Frdrh_SPEC,
3970 crate::common::R,
3971 > {
3972 crate::common::RegisterField::<
3973 1,
3974 0x1,
3975 1,
3976 0,
3977 frdrh::Mpb,
3978 frdrh::Mpb,
3979 Frdrh_SPEC,
3980 crate::common::R,
3981 >::from_register(self, 0)
3982 }
3983
3984 #[doc = "Serial receive data(b8)(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
3985 #[inline(always)]
3986 pub fn rdath(self) -> crate::common::RegisterFieldBool<0, 1, 0, Frdrh_SPEC, crate::common::R> {
3987 crate::common::RegisterFieldBool::<0, 1, 0, Frdrh_SPEC, crate::common::R>::from_register(
3988 self, 0,
3989 )
3990 }
3991}
3992impl ::core::default::Default for Frdrh {
3993 #[inline(always)]
3994 fn default() -> Frdrh {
3995 <crate::RegValueT<Frdrh_SPEC> as RegisterValue<_>>::new(0)
3996 }
3997}
3998pub mod frdrh {
3999
4000 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4001 pub struct Rdf_SPEC;
4002 pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
4003 impl Rdf {
4004 #[doc = "The quantity of receive data written in FRDRH and FRDRL falls below the specified receive triggering number."]
4005 pub const _0: Self = Self::new(0);
4006
4007 #[doc = "The quantity of receive data written in FRDRH and FRDRL is equal to or greater than the specified receive triggering number."]
4008 pub const _1: Self = Self::new(1);
4009 }
4010 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4011 pub struct Orer_SPEC;
4012 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
4013 impl Orer {
4014 #[doc = "No overrun error occurred"]
4015 pub const _0: Self = Self::new(0);
4016
4017 #[doc = "An overrun error has occurred"]
4018 pub const _1: Self = Self::new(1);
4019 }
4020 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4021 pub struct Fer_SPEC;
4022 pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
4023 impl Fer {
4024 #[doc = "No framing error occurred at the first data of FRDRH and FRDRL"]
4025 pub const _0: Self = Self::new(0);
4026
4027 #[doc = "A framing error has occurred at the first data of FRDRH and FRDRL"]
4028 pub const _1: Self = Self::new(1);
4029 }
4030 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4031 pub struct Per_SPEC;
4032 pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
4033 impl Per {
4034 #[doc = "No parity error occurred at the first data of FRDRH and FRDRL"]
4035 pub const _0: Self = Self::new(0);
4036
4037 #[doc = "A parity error has occurred at the first data of FRDRH and FRDRL"]
4038 pub const _1: Self = Self::new(1);
4039 }
4040 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4041 pub struct Dr_SPEC;
4042 pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
4043 impl Dr {
4044 #[doc = "Receiving is in progress, or no received data has remained in FRDRH and FRDRL after normally completed receiving."]
4045 pub const _0: Self = Self::new(0);
4046
4047 #[doc = "Next receive data has not been received for a period after normal completed receiving."]
4048 pub const _1: Self = Self::new(1);
4049 }
4050 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4051 pub struct Mpb_SPEC;
4052 pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
4053 impl Mpb {
4054 #[doc = "Data transmission cycles"]
4055 pub const _0: Self = Self::new(0);
4056
4057 #[doc = "ID transmission cycles"]
4058 pub const _1: Self = Self::new(1);
4059 }
4060}
4061#[doc(hidden)]
4062#[derive(Copy, Clone, Eq, PartialEq)]
4063pub struct Frdrl_SPEC;
4064impl crate::sealed::RegSpec for Frdrl_SPEC {
4065 type DataType = u8;
4066}
4067
4068#[doc = "Receive FIFO Data Register L"]
4069pub type Frdrl = crate::RegValueT<Frdrl_SPEC>;
4070
4071impl Frdrl {
4072 #[doc = "Serial receive data(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)NOTE: When reading both of FRDRH register and FRDRL register, please read by an order of the FRDRH register and the FRDRL register."]
4073 #[inline(always)]
4074 pub fn rdatl(
4075 self,
4076 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Frdrl_SPEC, crate::common::R> {
4077 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Frdrl_SPEC,crate::common::R>::from_register(self,0)
4078 }
4079}
4080impl ::core::default::Default for Frdrl {
4081 #[inline(always)]
4082 fn default() -> Frdrl {
4083 <crate::RegValueT<Frdrl_SPEC> as RegisterValue<_>>::new(0)
4084 }
4085}
4086
4087#[doc(hidden)]
4088#[derive(Copy, Clone, Eq, PartialEq)]
4089pub struct Mddr_SPEC;
4090impl crate::sealed::RegSpec for Mddr_SPEC {
4091 type DataType = u8;
4092}
4093
4094#[doc = "Modulation Duty Register"]
4095pub type Mddr = crate::RegValueT<Mddr_SPEC>;
4096
4097impl Mddr {
4098 #[doc = "MDDR corrects the bit rate adjusted by the BRR register."]
4099 #[inline(always)]
4100 pub fn mddr(
4101 self,
4102 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Mddr_SPEC, crate::common::RW> {
4103 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Mddr_SPEC,crate::common::RW>::from_register(self,0)
4104 }
4105}
4106impl ::core::default::Default for Mddr {
4107 #[inline(always)]
4108 fn default() -> Mddr {
4109 <crate::RegValueT<Mddr_SPEC> as RegisterValue<_>>::new(255)
4110 }
4111}
4112
4113#[doc(hidden)]
4114#[derive(Copy, Clone, Eq, PartialEq)]
4115pub struct Dccr_SPEC;
4116impl crate::sealed::RegSpec for Dccr_SPEC {
4117 type DataType = u8;
4118}
4119
4120#[doc = "Data Compare Match Control Register"]
4121pub type Dccr = crate::RegValueT<Dccr_SPEC>;
4122
4123impl Dccr {
4124 #[doc = "Data Compare Match Enable(Valid only in asynchronous mode(including multi-processor)"]
4125 #[inline(always)]
4126 pub fn dcme(
4127 self,
4128 ) -> crate::common::RegisterField<
4129 7,
4130 0x1,
4131 1,
4132 0,
4133 dccr::Dcme,
4134 dccr::Dcme,
4135 Dccr_SPEC,
4136 crate::common::RW,
4137 > {
4138 crate::common::RegisterField::<
4139 7,
4140 0x1,
4141 1,
4142 0,
4143 dccr::Dcme,
4144 dccr::Dcme,
4145 Dccr_SPEC,
4146 crate::common::RW,
4147 >::from_register(self, 0)
4148 }
4149
4150 #[doc = "ID frame select Bit(Valid only in asynchronous mode(including multi-processor)"]
4151 #[inline(always)]
4152 pub fn idsel(
4153 self,
4154 ) -> crate::common::RegisterField<
4155 6,
4156 0x1,
4157 1,
4158 0,
4159 dccr::Idsel,
4160 dccr::Idsel,
4161 Dccr_SPEC,
4162 crate::common::RW,
4163 > {
4164 crate::common::RegisterField::<
4165 6,
4166 0x1,
4167 1,
4168 0,
4169 dccr::Idsel,
4170 dccr::Idsel,
4171 Dccr_SPEC,
4172 crate::common::RW,
4173 >::from_register(self, 0)
4174 }
4175
4176 #[doc = "Data Compare Match Framing Error Flag"]
4177 #[inline(always)]
4178 pub fn dfer(
4179 self,
4180 ) -> crate::common::RegisterField<
4181 4,
4182 0x1,
4183 1,
4184 0,
4185 dccr::Dfer,
4186 dccr::Dfer,
4187 Dccr_SPEC,
4188 crate::common::RW,
4189 > {
4190 crate::common::RegisterField::<
4191 4,
4192 0x1,
4193 1,
4194 0,
4195 dccr::Dfer,
4196 dccr::Dfer,
4197 Dccr_SPEC,
4198 crate::common::RW,
4199 >::from_register(self, 0)
4200 }
4201
4202 #[doc = "Data Compare Match Parity Error Flag"]
4203 #[inline(always)]
4204 pub fn dper(
4205 self,
4206 ) -> crate::common::RegisterField<
4207 3,
4208 0x1,
4209 1,
4210 0,
4211 dccr::Dper,
4212 dccr::Dper,
4213 Dccr_SPEC,
4214 crate::common::RW,
4215 > {
4216 crate::common::RegisterField::<
4217 3,
4218 0x1,
4219 1,
4220 0,
4221 dccr::Dper,
4222 dccr::Dper,
4223 Dccr_SPEC,
4224 crate::common::RW,
4225 >::from_register(self, 0)
4226 }
4227
4228 #[doc = "These bits are read as 00. The write value should be 00."]
4229 #[inline(always)]
4230 pub fn reserved(
4231 self,
4232 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dccr_SPEC, crate::common::RW> {
4233 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dccr_SPEC,crate::common::RW>::from_register(self,0)
4234 }
4235
4236 #[doc = "Data Compare Match Flag"]
4237 #[inline(always)]
4238 pub fn dcmf(
4239 self,
4240 ) -> crate::common::RegisterField<
4241 0,
4242 0x1,
4243 1,
4244 0,
4245 dccr::Dcmf,
4246 dccr::Dcmf,
4247 Dccr_SPEC,
4248 crate::common::RW,
4249 > {
4250 crate::common::RegisterField::<
4251 0,
4252 0x1,
4253 1,
4254 0,
4255 dccr::Dcmf,
4256 dccr::Dcmf,
4257 Dccr_SPEC,
4258 crate::common::RW,
4259 >::from_register(self, 0)
4260 }
4261}
4262impl ::core::default::Default for Dccr {
4263 #[inline(always)]
4264 fn default() -> Dccr {
4265 <crate::RegValueT<Dccr_SPEC> as RegisterValue<_>>::new(64)
4266 }
4267}
4268pub mod dccr {
4269
4270 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4271 pub struct Dcme_SPEC;
4272 pub type Dcme = crate::EnumBitfieldStruct<u8, Dcme_SPEC>;
4273 impl Dcme {
4274 #[doc = "Address match function is disabled."]
4275 pub const _0: Self = Self::new(0);
4276
4277 #[doc = "Address match function is enabled"]
4278 pub const _1: Self = Self::new(1);
4279 }
4280 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4281 pub struct Idsel_SPEC;
4282 pub type Idsel = crate::EnumBitfieldStruct<u8, Idsel_SPEC>;
4283 impl Idsel {
4284 #[doc = "Always compare data regardless of the value of the MPB bit."]
4285 pub const _0: Self = Self::new(0);
4286
4287 #[doc = "Compare data when the MPB bit is 1 (ID frame) only."]
4288 pub const _1: Self = Self::new(1);
4289 }
4290 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4291 pub struct Dfer_SPEC;
4292 pub type Dfer = crate::EnumBitfieldStruct<u8, Dfer_SPEC>;
4293 impl Dfer {
4294 #[doc = "No framing error occurred"]
4295 pub const _0: Self = Self::new(0);
4296
4297 #[doc = "A framing error has occurred"]
4298 pub const _1: Self = Self::new(1);
4299 }
4300 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4301 pub struct Dper_SPEC;
4302 pub type Dper = crate::EnumBitfieldStruct<u8, Dper_SPEC>;
4303 impl Dper {
4304 #[doc = "No parity error occurred"]
4305 pub const _0: Self = Self::new(0);
4306
4307 #[doc = "A parity error has occurred"]
4308 pub const _1: Self = Self::new(1);
4309 }
4310 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4311 pub struct Dcmf_SPEC;
4312 pub type Dcmf = crate::EnumBitfieldStruct<u8, Dcmf_SPEC>;
4313 impl Dcmf {
4314 #[doc = "No matched"]
4315 pub const _0: Self = Self::new(0);
4316
4317 #[doc = "Matched"]
4318 pub const _1: Self = Self::new(1);
4319 }
4320}
4321#[doc(hidden)]
4322#[derive(Copy, Clone, Eq, PartialEq)]
4323pub struct Fcr_SPEC;
4324impl crate::sealed::RegSpec for Fcr_SPEC {
4325 type DataType = u16;
4326}
4327
4328#[doc = "FIFO Control Register"]
4329pub type Fcr = crate::RegValueT<Fcr_SPEC>;
4330
4331impl Fcr {
4332 #[doc = "RTS# Output Active Trigger Number Select(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode)"]
4333 #[inline(always)]
4334 pub fn rstrg(
4335 self,
4336 ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4337 crate::common::RegisterField::<12,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4338 }
4339
4340 #[doc = "Receive FIFO data trigger number"]
4341 #[inline(always)]
4342 pub fn rtrg(
4343 self,
4344 ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4345 crate::common::RegisterField::<8,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4346 }
4347
4348 #[doc = "Transmit FIFO data trigger number(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode)"]
4349 #[inline(always)]
4350 pub fn ttrg(
4351 self,
4352 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4353 crate::common::RegisterField::<4,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4354 }
4355
4356 #[doc = "Receive data ready error select bit(When detecting a reception data ready, the interrupt request is selected.)"]
4357 #[inline(always)]
4358 pub fn dres(
4359 self,
4360 ) -> crate::common::RegisterField<3, 0x1, 1, 0, fcr::Dres, fcr::Dres, Fcr_SPEC, crate::common::RW>
4361 {
4362 crate::common::RegisterField::<
4363 3,
4364 0x1,
4365 1,
4366 0,
4367 fcr::Dres,
4368 fcr::Dres,
4369 Fcr_SPEC,
4370 crate::common::RW,
4371 >::from_register(self, 0)
4372 }
4373
4374 #[doc = "Transmit FIFO Data Register Reset(Valid only in FCR.FM=1)"]
4375 #[inline(always)]
4376 pub fn tfrst(
4377 self,
4378 ) -> crate::common::RegisterField<
4379 2,
4380 0x1,
4381 1,
4382 0,
4383 fcr::Tfrst,
4384 fcr::Tfrst,
4385 Fcr_SPEC,
4386 crate::common::RW,
4387 > {
4388 crate::common::RegisterField::<
4389 2,
4390 0x1,
4391 1,
4392 0,
4393 fcr::Tfrst,
4394 fcr::Tfrst,
4395 Fcr_SPEC,
4396 crate::common::RW,
4397 >::from_register(self, 0)
4398 }
4399
4400 #[doc = "Receive FIFO Data Register Reset(Valid only in FCR.FM=1)"]
4401 #[inline(always)]
4402 pub fn rfrst(
4403 self,
4404 ) -> crate::common::RegisterField<
4405 1,
4406 0x1,
4407 1,
4408 0,
4409 fcr::Rfrst,
4410 fcr::Rfrst,
4411 Fcr_SPEC,
4412 crate::common::RW,
4413 > {
4414 crate::common::RegisterField::<
4415 1,
4416 0x1,
4417 1,
4418 0,
4419 fcr::Rfrst,
4420 fcr::Rfrst,
4421 Fcr_SPEC,
4422 crate::common::RW,
4423 >::from_register(self, 0)
4424 }
4425
4426 #[doc = "FIFO Mode Select(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode)"]
4427 #[inline(always)]
4428 pub fn fm(
4429 self,
4430 ) -> crate::common::RegisterField<0, 0x1, 1, 0, fcr::Fm, fcr::Fm, Fcr_SPEC, crate::common::RW>
4431 {
4432 crate::common::RegisterField::<0,0x1,1,0,fcr::Fm,fcr::Fm,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4433 }
4434}
4435impl ::core::default::Default for Fcr {
4436 #[inline(always)]
4437 fn default() -> Fcr {
4438 <crate::RegValueT<Fcr_SPEC> as RegisterValue<_>>::new(63488)
4439 }
4440}
4441pub mod fcr {
4442
4443 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4444 pub struct Dres_SPEC;
4445 pub type Dres = crate::EnumBitfieldStruct<u8, Dres_SPEC>;
4446 impl Dres {
4447 #[doc = "Reception data full interrupt (RXIn)"]
4448 pub const _0: Self = Self::new(0);
4449
4450 #[doc = "Receive error interrupt (ERIn)"]
4451 pub const _1: Self = Self::new(1);
4452 }
4453 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4454 pub struct Tfrst_SPEC;
4455 pub type Tfrst = crate::EnumBitfieldStruct<u8, Tfrst_SPEC>;
4456 impl Tfrst {
4457 #[doc = "Not reset to FTDRHL"]
4458 pub const _0: Self = Self::new(0);
4459
4460 #[doc = "Reset to FTDRHL"]
4461 pub const _1: Self = Self::new(1);
4462 }
4463 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4464 pub struct Rfrst_SPEC;
4465 pub type Rfrst = crate::EnumBitfieldStruct<u8, Rfrst_SPEC>;
4466 impl Rfrst {
4467 #[doc = "Not reset to FRDRHL"]
4468 pub const _0: Self = Self::new(0);
4469
4470 #[doc = "Reset to FRDRHL"]
4471 pub const _1: Self = Self::new(1);
4472 }
4473 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4474 pub struct Fm_SPEC;
4475 pub type Fm = crate::EnumBitfieldStruct<u8, Fm_SPEC>;
4476 impl Fm {
4477 #[doc = "Non-FIFO mode"]
4478 pub const _0: Self = Self::new(0);
4479
4480 #[doc = "FIFO mode"]
4481 pub const _1: Self = Self::new(1);
4482 }
4483}
4484#[doc(hidden)]
4485#[derive(Copy, Clone, Eq, PartialEq)]
4486pub struct Fdr_SPEC;
4487impl crate::sealed::RegSpec for Fdr_SPEC {
4488 type DataType = u16;
4489}
4490
4491#[doc = "FIFO Data Count Register"]
4492pub type Fdr = crate::RegValueT<Fdr_SPEC>;
4493
4494impl Fdr {
4495 #[doc = "Transmit FIFO Data CountIndicate the quantity of non-transmit data stored in FTDRH and FTDRL(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, while FCR.FM=1)"]
4496 #[inline(always)]
4497 pub fn t(
4498 self,
4499 ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Fdr_SPEC, crate::common::R> {
4500 crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Fdr_SPEC,crate::common::R>::from_register(self,0)
4501 }
4502
4503 #[doc = "These bits are read as 000."]
4504 #[inline(always)]
4505 pub fn reserved(
4506 self,
4507 ) -> crate::common::RegisterField<5, 0x7, 1, 0, u8, u8, Fdr_SPEC, crate::common::R> {
4508 crate::common::RegisterField::<5,0x7,1,0,u8,u8,Fdr_SPEC,crate::common::R>::from_register(self,0)
4509 }
4510
4511 #[doc = "Receive FIFO Data CountIndicate the quantity of receive data stored in FRDRH and FRDRL(Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, while FCR.FM=1)"]
4512 #[inline(always)]
4513 pub fn r(
4514 self,
4515 ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Fdr_SPEC, crate::common::R> {
4516 crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Fdr_SPEC,crate::common::R>::from_register(self,0)
4517 }
4518}
4519impl ::core::default::Default for Fdr {
4520 #[inline(always)]
4521 fn default() -> Fdr {
4522 <crate::RegValueT<Fdr_SPEC> as RegisterValue<_>>::new(0)
4523 }
4524}
4525
4526#[doc(hidden)]
4527#[derive(Copy, Clone, Eq, PartialEq)]
4528pub struct Lsr_SPEC;
4529impl crate::sealed::RegSpec for Lsr_SPEC {
4530 type DataType = u16;
4531}
4532
4533#[doc = "Line Status Register"]
4534pub type Lsr = crate::RegValueT<Lsr_SPEC>;
4535
4536impl Lsr {
4537 #[doc = "Parity Error CountIndicates the quantity of data with a parity error among the receive data stored in the receive FIFO data register (FRDRH and FRDRL)."]
4538 #[inline(always)]
4539 pub fn pnum(
4540 self,
4541 ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Lsr_SPEC, crate::common::R> {
4542 crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Lsr_SPEC,crate::common::R>::from_register(self,0)
4543 }
4544
4545 #[doc = "Framing Error CountIndicates the quantity of data with a framing error among the receive data stored in the receive FIFO data register (FRDRH and FRDRL)."]
4546 #[inline(always)]
4547 pub fn fnum(
4548 self,
4549 ) -> crate::common::RegisterField<2, 0x1f, 1, 0, u8, u8, Lsr_SPEC, crate::common::R> {
4550 crate::common::RegisterField::<2,0x1f,1,0,u8,u8,Lsr_SPEC,crate::common::R>::from_register(self,0)
4551 }
4552
4553 #[doc = "This bit is read as 0."]
4554 #[inline(always)]
4555 pub fn reserved(self) -> crate::common::RegisterFieldBool<1, 1, 0, Lsr_SPEC, crate::common::R> {
4556 crate::common::RegisterFieldBool::<1, 1, 0, Lsr_SPEC, crate::common::R>::from_register(
4557 self, 0,
4558 )
4559 }
4560
4561 #[doc = "Overrun Error Flag (Valid only in asynchronous mode(including multi-processor) or clock synchronous mode, and FIFO selected)"]
4562 #[inline(always)]
4563 pub fn orer(
4564 self,
4565 ) -> crate::common::RegisterField<0, 0x1, 1, 0, lsr::Orer, lsr::Orer, Lsr_SPEC, crate::common::R>
4566 {
4567 crate::common::RegisterField::<0,0x1,1,0,lsr::Orer,lsr::Orer,Lsr_SPEC,crate::common::R>::from_register(self,0)
4568 }
4569}
4570impl ::core::default::Default for Lsr {
4571 #[inline(always)]
4572 fn default() -> Lsr {
4573 <crate::RegValueT<Lsr_SPEC> as RegisterValue<_>>::new(0)
4574 }
4575}
4576pub mod lsr {
4577
4578 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4579 pub struct Orer_SPEC;
4580 pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
4581 impl Orer {
4582 #[doc = "No overrun error occurred"]
4583 pub const _0: Self = Self::new(0);
4584
4585 #[doc = "An overrun error has occurred"]
4586 pub const _1: Self = Self::new(1);
4587 }
4588}
4589#[doc(hidden)]
4590#[derive(Copy, Clone, Eq, PartialEq)]
4591pub struct Cdr_SPEC;
4592impl crate::sealed::RegSpec for Cdr_SPEC {
4593 type DataType = u16;
4594}
4595
4596#[doc = "Compare Match Data Register"]
4597pub type Cdr = crate::RegValueT<Cdr_SPEC>;
4598
4599impl Cdr {
4600 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
4601 #[inline(always)]
4602 pub fn reserved(
4603 self,
4604 ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Cdr_SPEC, crate::common::RW> {
4605 crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Cdr_SPEC,crate::common::RW>::from_register(self,0)
4606 }
4607
4608 #[doc = "Compare Match DataCompare data pattern for address match wake-up function"]
4609 #[inline(always)]
4610 pub fn cmpd(
4611 self,
4612 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Cdr_SPEC, crate::common::RW> {
4613 crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Cdr_SPEC,crate::common::RW>::from_register(self,0)
4614 }
4615}
4616impl ::core::default::Default for Cdr {
4617 #[inline(always)]
4618 fn default() -> Cdr {
4619 <crate::RegValueT<Cdr_SPEC> as RegisterValue<_>>::new(0)
4620 }
4621}
4622
4623#[doc(hidden)]
4624#[derive(Copy, Clone, Eq, PartialEq)]
4625pub struct Sptr_SPEC;
4626impl crate::sealed::RegSpec for Sptr_SPEC {
4627 type DataType = u8;
4628}
4629
4630#[doc = "Serial Port Register"]
4631pub type Sptr = crate::RegValueT<Sptr_SPEC>;
4632
4633impl Sptr {
4634 #[doc = "These bits are read as 00000. The write value should be 00000."]
4635 #[inline(always)]
4636 pub fn reserved(
4637 self,
4638 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Sptr_SPEC, crate::common::RW> {
4639 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Sptr_SPEC,crate::common::RW>::from_register(self,0)
4640 }
4641
4642 #[doc = "Serial port break I/O bit(It\'s selected whether the value of SPB2DT is output to TxD terminal.)"]
4643 #[inline(always)]
4644 pub fn spb2io(
4645 self,
4646 ) -> crate::common::RegisterField<
4647 2,
4648 0x1,
4649 1,
4650 0,
4651 sptr::Spb2Io,
4652 sptr::Spb2Io,
4653 Sptr_SPEC,
4654 crate::common::RW,
4655 > {
4656 crate::common::RegisterField::<
4657 2,
4658 0x1,
4659 1,
4660 0,
4661 sptr::Spb2Io,
4662 sptr::Spb2Io,
4663 Sptr_SPEC,
4664 crate::common::RW,
4665 >::from_register(self, 0)
4666 }
4667
4668 #[doc = "Serial port break data select bit(The output level of TxD terminal is selected when SCR.TE = 0.)"]
4669 #[inline(always)]
4670 pub fn spb2dt(
4671 self,
4672 ) -> crate::common::RegisterField<
4673 1,
4674 0x1,
4675 1,
4676 0,
4677 sptr::Spb2Dt,
4678 sptr::Spb2Dt,
4679 Sptr_SPEC,
4680 crate::common::RW,
4681 > {
4682 crate::common::RegisterField::<
4683 1,
4684 0x1,
4685 1,
4686 0,
4687 sptr::Spb2Dt,
4688 sptr::Spb2Dt,
4689 Sptr_SPEC,
4690 crate::common::RW,
4691 >::from_register(self, 0)
4692 }
4693
4694 #[doc = "Serial input data monitor bit(The state of the RXD terminal is shown.)"]
4695 #[inline(always)]
4696 pub fn rxdmon(
4697 self,
4698 ) -> crate::common::RegisterField<
4699 0,
4700 0x1,
4701 1,
4702 0,
4703 sptr::Rxdmon,
4704 sptr::Rxdmon,
4705 Sptr_SPEC,
4706 crate::common::R,
4707 > {
4708 crate::common::RegisterField::<
4709 0,
4710 0x1,
4711 1,
4712 0,
4713 sptr::Rxdmon,
4714 sptr::Rxdmon,
4715 Sptr_SPEC,
4716 crate::common::R,
4717 >::from_register(self, 0)
4718 }
4719}
4720impl ::core::default::Default for Sptr {
4721 #[inline(always)]
4722 fn default() -> Sptr {
4723 <crate::RegValueT<Sptr_SPEC> as RegisterValue<_>>::new(3)
4724 }
4725}
4726pub mod sptr {
4727
4728 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4729 pub struct Spb2Io_SPEC;
4730 pub type Spb2Io = crate::EnumBitfieldStruct<u8, Spb2Io_SPEC>;
4731 impl Spb2Io {
4732 #[doc = "The value of SPB2DT bit isn\'t output in TxD terminal."]
4733 pub const _0: Self = Self::new(0);
4734
4735 #[doc = "The value of SPB2DT bit is output in TxD terminal."]
4736 pub const _1: Self = Self::new(1);
4737 }
4738 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4739 pub struct Spb2Dt_SPEC;
4740 pub type Spb2Dt = crate::EnumBitfieldStruct<u8, Spb2Dt_SPEC>;
4741 impl Spb2Dt {
4742 #[doc = "Low level is output in TxD terminal."]
4743 pub const _0: Self = Self::new(0);
4744
4745 #[doc = "High level is output in TxD terminal."]
4746 pub const _1: Self = Self::new(1);
4747 }
4748 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4749 pub struct Rxdmon_SPEC;
4750 pub type Rxdmon = crate::EnumBitfieldStruct<u8, Rxdmon_SPEC>;
4751 impl Rxdmon {
4752 #[doc = "RXD terminal is the Low level."]
4753 pub const _0: Self = Self::new(0);
4754
4755 #[doc = "RXD terminal is the High level."]
4756 pub const _1: Self = Self::new(1);
4757 }
4758}