ra2e2_pac/
sci9.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.40.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:46:37 +0000
19
20#![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::Sci9 {}
29unsafe impl ::core::marker::Sync for super::Sci9 {}
30impl super::Sci9 {
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 for Non-Smart Card Interface Mode (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 for Smart Card Interface Mode (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 for Non-Smart Card Interface Mode (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 for Smart Card Interface Mode (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 for Non-Smart Card Interface (SCMR.SMIF = 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 for Smart Card Interface Mode (SCMR.SMIF = 1)"]
112    #[inline(always)]
113    pub const fn ssr_smci(
114        &self,
115    ) -> &'static crate::common::Reg<self::SsrSmci_SPEC, crate::common::RW> {
116        unsafe {
117            crate::common::Reg::<self::SsrSmci_SPEC, crate::common::RW>::from_ptr(
118                self._svd2pac_as_ptr().add(4usize),
119            )
120        }
121    }
122
123    #[doc = "Receive Data Register"]
124    #[inline(always)]
125    pub const fn rdr(&self) -> &'static crate::common::Reg<self::Rdr_SPEC, crate::common::R> {
126        unsafe {
127            crate::common::Reg::<self::Rdr_SPEC, crate::common::R>::from_ptr(
128                self._svd2pac_as_ptr().add(5usize),
129            )
130        }
131    }
132
133    #[doc = "Smart Card Mode Register"]
134    #[inline(always)]
135    pub const fn scmr(&self) -> &'static crate::common::Reg<self::Scmr_SPEC, crate::common::RW> {
136        unsafe {
137            crate::common::Reg::<self::Scmr_SPEC, crate::common::RW>::from_ptr(
138                self._svd2pac_as_ptr().add(6usize),
139            )
140        }
141    }
142
143    #[doc = "Serial Extended Mode Register"]
144    #[inline(always)]
145    pub const fn semr(&self) -> &'static crate::common::Reg<self::Semr_SPEC, crate::common::RW> {
146        unsafe {
147            crate::common::Reg::<self::Semr_SPEC, crate::common::RW>::from_ptr(
148                self._svd2pac_as_ptr().add(7usize),
149            )
150        }
151    }
152
153    #[doc = "Noise Filter Setting Register"]
154    #[inline(always)]
155    pub const fn snfr(&self) -> &'static crate::common::Reg<self::Snfr_SPEC, crate::common::RW> {
156        unsafe {
157            crate::common::Reg::<self::Snfr_SPEC, crate::common::RW>::from_ptr(
158                self._svd2pac_as_ptr().add(8usize),
159            )
160        }
161    }
162
163    #[doc = "IIC Mode Register 1"]
164    #[inline(always)]
165    pub const fn simr1(&self) -> &'static crate::common::Reg<self::Simr1_SPEC, crate::common::RW> {
166        unsafe {
167            crate::common::Reg::<self::Simr1_SPEC, crate::common::RW>::from_ptr(
168                self._svd2pac_as_ptr().add(9usize),
169            )
170        }
171    }
172
173    #[doc = "IIC Mode Register 2"]
174    #[inline(always)]
175    pub const fn simr2(&self) -> &'static crate::common::Reg<self::Simr2_SPEC, crate::common::RW> {
176        unsafe {
177            crate::common::Reg::<self::Simr2_SPEC, crate::common::RW>::from_ptr(
178                self._svd2pac_as_ptr().add(10usize),
179            )
180        }
181    }
182
183    #[doc = "IIC Mode Register 3"]
184    #[inline(always)]
185    pub const fn simr3(&self) -> &'static crate::common::Reg<self::Simr3_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::Simr3_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(11usize),
189            )
190        }
191    }
192
193    #[doc = "IIC Status Register"]
194    #[inline(always)]
195    pub const fn sisr(&self) -> &'static crate::common::Reg<self::Sisr_SPEC, crate::common::R> {
196        unsafe {
197            crate::common::Reg::<self::Sisr_SPEC, crate::common::R>::from_ptr(
198                self._svd2pac_as_ptr().add(12usize),
199            )
200        }
201    }
202
203    #[doc = "SPI Mode Register"]
204    #[inline(always)]
205    pub const fn spmr(&self) -> &'static crate::common::Reg<self::Spmr_SPEC, crate::common::RW> {
206        unsafe {
207            crate::common::Reg::<self::Spmr_SPEC, crate::common::RW>::from_ptr(
208                self._svd2pac_as_ptr().add(13usize),
209            )
210        }
211    }
212
213    #[doc = "Transmit Data Register"]
214    #[inline(always)]
215    pub const fn tdrhl(&self) -> &'static crate::common::Reg<self::Tdrhl_SPEC, crate::common::RW> {
216        unsafe {
217            crate::common::Reg::<self::Tdrhl_SPEC, crate::common::RW>::from_ptr(
218                self._svd2pac_as_ptr().add(14usize),
219            )
220        }
221    }
222
223    #[doc = "Receive Data Register"]
224    #[inline(always)]
225    pub const fn rdrhl(&self) -> &'static crate::common::Reg<self::Rdrhl_SPEC, crate::common::R> {
226        unsafe {
227            crate::common::Reg::<self::Rdrhl_SPEC, crate::common::R>::from_ptr(
228                self._svd2pac_as_ptr().add(16usize),
229            )
230        }
231    }
232
233    #[doc = "Modulation Duty Register"]
234    #[inline(always)]
235    pub const fn mddr(&self) -> &'static crate::common::Reg<self::Mddr_SPEC, crate::common::RW> {
236        unsafe {
237            crate::common::Reg::<self::Mddr_SPEC, crate::common::RW>::from_ptr(
238                self._svd2pac_as_ptr().add(18usize),
239            )
240        }
241    }
242
243    #[doc = "Data Compare Match Control Register"]
244    #[inline(always)]
245    pub const fn dccr(&self) -> &'static crate::common::Reg<self::Dccr_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::Dccr_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(19usize),
249            )
250        }
251    }
252
253    #[doc = "Compare Match Data Register"]
254    #[inline(always)]
255    pub const fn cdr(&self) -> &'static crate::common::Reg<self::Cdr_SPEC, crate::common::RW> {
256        unsafe {
257            crate::common::Reg::<self::Cdr_SPEC, crate::common::RW>::from_ptr(
258                self._svd2pac_as_ptr().add(26usize),
259            )
260        }
261    }
262
263    #[doc = "Serial Port Register"]
264    #[inline(always)]
265    pub const fn sptr(&self) -> &'static crate::common::Reg<self::Sptr_SPEC, crate::common::RW> {
266        unsafe {
267            crate::common::Reg::<self::Sptr_SPEC, crate::common::RW>::from_ptr(
268                self._svd2pac_as_ptr().add(28usize),
269            )
270        }
271    }
272}
273#[doc(hidden)]
274#[derive(Copy, Clone, Eq, PartialEq)]
275pub struct Smr_SPEC;
276impl crate::sealed::RegSpec for Smr_SPEC {
277    type DataType = u8;
278}
279
280#[doc = "Serial Mode Register for Non-Smart Card Interface Mode (SCMR.SMIF = 0)"]
281pub type Smr = crate::RegValueT<Smr_SPEC>;
282
283impl Smr {
284    #[doc = "Clock Select"]
285    #[inline(always)]
286    pub fn cks(
287        self,
288    ) -> crate::common::RegisterField<0, 0x3, 1, 0, smr::Cks, smr::Cks, Smr_SPEC, crate::common::RW>
289    {
290        crate::common::RegisterField::<0,0x3,1,0,smr::Cks,smr::Cks,Smr_SPEC,crate::common::RW>::from_register(self,0)
291    }
292
293    #[doc = "Multi-Processor Mode"]
294    #[inline(always)]
295    pub fn mp(
296        self,
297    ) -> crate::common::RegisterField<2, 0x1, 1, 0, smr::Mp, smr::Mp, Smr_SPEC, crate::common::RW>
298    {
299        crate::common::RegisterField::<2,0x1,1,0,smr::Mp,smr::Mp,Smr_SPEC,crate::common::RW>::from_register(self,0)
300    }
301
302    #[doc = "Stop Bit Length"]
303    #[inline(always)]
304    pub fn stop(
305        self,
306    ) -> crate::common::RegisterField<3, 0x1, 1, 0, smr::Stop, smr::Stop, Smr_SPEC, crate::common::RW>
307    {
308        crate::common::RegisterField::<
309            3,
310            0x1,
311            1,
312            0,
313            smr::Stop,
314            smr::Stop,
315            Smr_SPEC,
316            crate::common::RW,
317        >::from_register(self, 0)
318    }
319
320    #[doc = "Parity Mode"]
321    #[inline(always)]
322    pub fn pm(
323        self,
324    ) -> crate::common::RegisterField<4, 0x1, 1, 0, smr::Pm, smr::Pm, Smr_SPEC, crate::common::RW>
325    {
326        crate::common::RegisterField::<4,0x1,1,0,smr::Pm,smr::Pm,Smr_SPEC,crate::common::RW>::from_register(self,0)
327    }
328
329    #[doc = "Parity Enable"]
330    #[inline(always)]
331    pub fn pe(
332        self,
333    ) -> crate::common::RegisterField<5, 0x1, 1, 0, smr::Pe, smr::Pe, Smr_SPEC, crate::common::RW>
334    {
335        crate::common::RegisterField::<5,0x1,1,0,smr::Pe,smr::Pe,Smr_SPEC,crate::common::RW>::from_register(self,0)
336    }
337
338    #[doc = "Character Length"]
339    #[inline(always)]
340    pub fn chr(
341        self,
342    ) -> crate::common::RegisterField<6, 0x1, 1, 0, smr::Chr, smr::Chr, Smr_SPEC, crate::common::RW>
343    {
344        crate::common::RegisterField::<6,0x1,1,0,smr::Chr,smr::Chr,Smr_SPEC,crate::common::RW>::from_register(self,0)
345    }
346
347    #[doc = "Communication Mode"]
348    #[inline(always)]
349    pub fn cm(
350        self,
351    ) -> crate::common::RegisterField<7, 0x1, 1, 0, smr::Cm, smr::Cm, Smr_SPEC, crate::common::RW>
352    {
353        crate::common::RegisterField::<7,0x1,1,0,smr::Cm,smr::Cm,Smr_SPEC,crate::common::RW>::from_register(self,0)
354    }
355}
356impl ::core::default::Default for Smr {
357    #[inline(always)]
358    fn default() -> Smr {
359        <crate::RegValueT<Smr_SPEC> as RegisterValue<_>>::new(0)
360    }
361}
362pub mod smr {
363
364    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
365    pub struct Cks_SPEC;
366    pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
367    impl Cks {
368        #[doc = "PCLK clock (n = 0)"]
369        pub const _00: Self = Self::new(0);
370
371        #[doc = "PCLK/4 clock (n = 1)"]
372        pub const _01: Self = Self::new(1);
373
374        #[doc = "PCLK/16 clock (n = 2)"]
375        pub const _10: Self = Self::new(2);
376
377        #[doc = "PCLK/64 clock (n = 3)"]
378        pub const _11: Self = Self::new(3);
379    }
380    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
381    pub struct Mp_SPEC;
382    pub type Mp = crate::EnumBitfieldStruct<u8, Mp_SPEC>;
383    impl Mp {
384        #[doc = "Disable multi-processor communications function"]
385        pub const _0: Self = Self::new(0);
386
387        #[doc = "Enable multi-processor communications function"]
388        pub const _1: Self = Self::new(1);
389    }
390    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
391    pub struct Stop_SPEC;
392    pub type Stop = crate::EnumBitfieldStruct<u8, Stop_SPEC>;
393    impl Stop {
394        #[doc = "1 stop bit"]
395        pub const _0: Self = Self::new(0);
396
397        #[doc = "2 stop bits"]
398        pub const _1: Self = Self::new(1);
399    }
400    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
401    pub struct Pm_SPEC;
402    pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
403    impl Pm {
404        #[doc = "Even parity"]
405        pub const _0: Self = Self::new(0);
406
407        #[doc = "Odd parity"]
408        pub const _1: Self = Self::new(1);
409    }
410    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
411    pub struct Pe_SPEC;
412    pub type Pe = crate::EnumBitfieldStruct<u8, Pe_SPEC>;
413    impl Pe {
414        #[doc = "When transmitting: Do not add parity bit When receiving: Do not check parity bit"]
415        pub const _0: Self = Self::new(0);
416
417        #[doc = "When transmitting: Add parity bit When receiving: Check parity bit"]
418        pub const _1: Self = Self::new(1);
419    }
420    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
421    pub struct Chr_SPEC;
422    pub type Chr = crate::EnumBitfieldStruct<u8, Chr_SPEC>;
423    impl Chr {
424        #[doc = "SCMR.CHR1 = 0: Transmit/receive in 9-bit data length SCMR.CHR1 = 1: Transmit/receive in 8-bit data length (initial value)"]
425        pub const _0: Self = Self::new(0);
426
427        #[doc = "SCMR.CHR1 = 0: Transmit/receive in 9-bit data length SCMR.CHR1 = 1: Transmit/receive in 7-bit data length"]
428        pub const _1: Self = Self::new(1);
429    }
430    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
431    pub struct Cm_SPEC;
432    pub type Cm = crate::EnumBitfieldStruct<u8, Cm_SPEC>;
433    impl Cm {
434        #[doc = "Asynchronous mode or simple IIC mode"]
435        pub const _0: Self = Self::new(0);
436
437        #[doc = "Clock synchronous mode or simple SPI mode"]
438        pub const _1: Self = Self::new(1);
439    }
440}
441#[doc(hidden)]
442#[derive(Copy, Clone, Eq, PartialEq)]
443pub struct SmrSmci_SPEC;
444impl crate::sealed::RegSpec for SmrSmci_SPEC {
445    type DataType = u8;
446}
447
448#[doc = "Serial Mode Register for Smart Card Interface Mode (SCMR.SMIF = 1)"]
449pub type SmrSmci = crate::RegValueT<SmrSmci_SPEC>;
450
451impl SmrSmci {
452    #[doc = "Clock Select"]
453    #[inline(always)]
454    pub fn cks(
455        self,
456    ) -> crate::common::RegisterField<
457        0,
458        0x3,
459        1,
460        0,
461        smr_smci::Cks,
462        smr_smci::Cks,
463        SmrSmci_SPEC,
464        crate::common::RW,
465    > {
466        crate::common::RegisterField::<
467            0,
468            0x3,
469            1,
470            0,
471            smr_smci::Cks,
472            smr_smci::Cks,
473            SmrSmci_SPEC,
474            crate::common::RW,
475        >::from_register(self, 0)
476    }
477
478    #[doc = "Base Clock Pulse"]
479    #[inline(always)]
480    pub fn bcp(
481        self,
482    ) -> crate::common::RegisterField<2, 0x3, 1, 0, u8, u8, SmrSmci_SPEC, crate::common::RW> {
483        crate::common::RegisterField::<2,0x3,1,0,u8,u8,SmrSmci_SPEC,crate::common::RW>::from_register(self,0)
484    }
485
486    #[doc = "Parity Mode"]
487    #[inline(always)]
488    pub fn pm(
489        self,
490    ) -> crate::common::RegisterField<
491        4,
492        0x1,
493        1,
494        0,
495        smr_smci::Pm,
496        smr_smci::Pm,
497        SmrSmci_SPEC,
498        crate::common::RW,
499    > {
500        crate::common::RegisterField::<
501            4,
502            0x1,
503            1,
504            0,
505            smr_smci::Pm,
506            smr_smci::Pm,
507            SmrSmci_SPEC,
508            crate::common::RW,
509        >::from_register(self, 0)
510    }
511
512    #[doc = "Parity Enable"]
513    #[inline(always)]
514    pub fn pe(self) -> crate::common::RegisterFieldBool<5, 1, 0, SmrSmci_SPEC, crate::common::RW> {
515        crate::common::RegisterFieldBool::<5, 1, 0, SmrSmci_SPEC, crate::common::RW>::from_register(
516            self, 0,
517        )
518    }
519
520    #[doc = "Block Transfer Mode"]
521    #[inline(always)]
522    pub fn blk(
523        self,
524    ) -> crate::common::RegisterField<
525        6,
526        0x1,
527        1,
528        0,
529        smr_smci::Blk,
530        smr_smci::Blk,
531        SmrSmci_SPEC,
532        crate::common::RW,
533    > {
534        crate::common::RegisterField::<
535            6,
536            0x1,
537            1,
538            0,
539            smr_smci::Blk,
540            smr_smci::Blk,
541            SmrSmci_SPEC,
542            crate::common::RW,
543        >::from_register(self, 0)
544    }
545
546    #[doc = "GSM Mode"]
547    #[inline(always)]
548    pub fn gm(
549        self,
550    ) -> crate::common::RegisterField<
551        7,
552        0x1,
553        1,
554        0,
555        smr_smci::Gm,
556        smr_smci::Gm,
557        SmrSmci_SPEC,
558        crate::common::RW,
559    > {
560        crate::common::RegisterField::<
561            7,
562            0x1,
563            1,
564            0,
565            smr_smci::Gm,
566            smr_smci::Gm,
567            SmrSmci_SPEC,
568            crate::common::RW,
569        >::from_register(self, 0)
570    }
571}
572impl ::core::default::Default for SmrSmci {
573    #[inline(always)]
574    fn default() -> SmrSmci {
575        <crate::RegValueT<SmrSmci_SPEC> as RegisterValue<_>>::new(0)
576    }
577}
578pub mod smr_smci {
579
580    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
581    pub struct Cks_SPEC;
582    pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
583    impl Cks {
584        #[doc = "PCLK clock (n = 0)"]
585        pub const _00: Self = Self::new(0);
586
587        #[doc = "PCLK/4 clock (n = 1)"]
588        pub const _01: Self = Self::new(1);
589
590        #[doc = "PCLK/16 clock (n = 2)"]
591        pub const _10: Self = Self::new(2);
592
593        #[doc = "PCLK/64 clock (n = 3)"]
594        pub const _11: Self = Self::new(3);
595    }
596    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
597    pub struct Pm_SPEC;
598    pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
599    impl Pm {
600        #[doc = "Even parity"]
601        pub const _0: Self = Self::new(0);
602
603        #[doc = "Odd parity"]
604        pub const _1: Self = Self::new(1);
605    }
606    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
607    pub struct Blk_SPEC;
608    pub type Blk = crate::EnumBitfieldStruct<u8, Blk_SPEC>;
609    impl Blk {
610        #[doc = "Normal mode operation"]
611        pub const _0: Self = Self::new(0);
612
613        #[doc = "Block transfer mode operation"]
614        pub const _1: Self = Self::new(1);
615    }
616    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
617    pub struct Gm_SPEC;
618    pub type Gm = crate::EnumBitfieldStruct<u8, Gm_SPEC>;
619    impl Gm {
620        #[doc = "Normal mode operation"]
621        pub const _0: Self = Self::new(0);
622
623        #[doc = "GSM mode operation"]
624        pub const _1: Self = Self::new(1);
625    }
626}
627#[doc(hidden)]
628#[derive(Copy, Clone, Eq, PartialEq)]
629pub struct Brr_SPEC;
630impl crate::sealed::RegSpec for Brr_SPEC {
631    type DataType = u8;
632}
633
634#[doc = "Bit Rate Register"]
635pub type Brr = crate::RegValueT<Brr_SPEC>;
636
637impl NoBitfieldReg<Brr_SPEC> for Brr {}
638impl ::core::default::Default for Brr {
639    #[inline(always)]
640    fn default() -> Brr {
641        <crate::RegValueT<Brr_SPEC> as RegisterValue<_>>::new(255)
642    }
643}
644
645#[doc(hidden)]
646#[derive(Copy, Clone, Eq, PartialEq)]
647pub struct Scr_SPEC;
648impl crate::sealed::RegSpec for Scr_SPEC {
649    type DataType = u8;
650}
651
652#[doc = "Serial Control Register for Non-Smart Card Interface Mode (SCMR.SMIF = 0)"]
653pub type Scr = crate::RegValueT<Scr_SPEC>;
654
655impl Scr {
656    #[doc = "Clock Enable"]
657    #[inline(always)]
658    pub fn cke(
659        self,
660    ) -> crate::common::RegisterField<0, 0x3, 1, 0, scr::Cke, scr::Cke, Scr_SPEC, crate::common::RW>
661    {
662        crate::common::RegisterField::<0,0x3,1,0,scr::Cke,scr::Cke,Scr_SPEC,crate::common::RW>::from_register(self,0)
663    }
664
665    #[doc = "Transmit End Interrupt Enable"]
666    #[inline(always)]
667    pub fn teie(
668        self,
669    ) -> crate::common::RegisterField<2, 0x1, 1, 0, scr::Teie, scr::Teie, Scr_SPEC, crate::common::RW>
670    {
671        crate::common::RegisterField::<
672            2,
673            0x1,
674            1,
675            0,
676            scr::Teie,
677            scr::Teie,
678            Scr_SPEC,
679            crate::common::RW,
680        >::from_register(self, 0)
681    }
682
683    #[doc = "Multi-Processor Interrupt Enable"]
684    #[inline(always)]
685    pub fn mpie(
686        self,
687    ) -> crate::common::RegisterField<3, 0x1, 1, 0, scr::Mpie, scr::Mpie, Scr_SPEC, crate::common::RW>
688    {
689        crate::common::RegisterField::<
690            3,
691            0x1,
692            1,
693            0,
694            scr::Mpie,
695            scr::Mpie,
696            Scr_SPEC,
697            crate::common::RW,
698        >::from_register(self, 0)
699    }
700
701    #[doc = "Receive Enable"]
702    #[inline(always)]
703    pub fn re(
704        self,
705    ) -> crate::common::RegisterField<4, 0x1, 1, 0, scr::Re, scr::Re, Scr_SPEC, crate::common::RW>
706    {
707        crate::common::RegisterField::<4,0x1,1,0,scr::Re,scr::Re,Scr_SPEC,crate::common::RW>::from_register(self,0)
708    }
709
710    #[doc = "Transmit Enable"]
711    #[inline(always)]
712    pub fn te(
713        self,
714    ) -> crate::common::RegisterField<5, 0x1, 1, 0, scr::Te, scr::Te, Scr_SPEC, crate::common::RW>
715    {
716        crate::common::RegisterField::<5,0x1,1,0,scr::Te,scr::Te,Scr_SPEC,crate::common::RW>::from_register(self,0)
717    }
718
719    #[doc = "Receive Interrupt Enable"]
720    #[inline(always)]
721    pub fn rie(
722        self,
723    ) -> crate::common::RegisterField<6, 0x1, 1, 0, scr::Rie, scr::Rie, Scr_SPEC, crate::common::RW>
724    {
725        crate::common::RegisterField::<6,0x1,1,0,scr::Rie,scr::Rie,Scr_SPEC,crate::common::RW>::from_register(self,0)
726    }
727
728    #[doc = "Transmit Interrupt Enable"]
729    #[inline(always)]
730    pub fn tie(
731        self,
732    ) -> crate::common::RegisterField<7, 0x1, 1, 0, scr::Tie, scr::Tie, Scr_SPEC, crate::common::RW>
733    {
734        crate::common::RegisterField::<7,0x1,1,0,scr::Tie,scr::Tie,Scr_SPEC,crate::common::RW>::from_register(self,0)
735    }
736}
737impl ::core::default::Default for Scr {
738    #[inline(always)]
739    fn default() -> Scr {
740        <crate::RegValueT<Scr_SPEC> as RegisterValue<_>>::new(0)
741    }
742}
743pub mod scr {
744
745    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
746    pub struct Cke_SPEC;
747    pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
748    impl Cke {
749        #[doc = "In asynchronous mode, the SCKn pin is available for use as an I/O port based on the I/O port settings. In clock synchronous mode, the SCKn pin functions as the clock output pin."]
750        pub const _00: Self = Self::new(0);
751
752        #[doc = "In asynchronous mode, a clock with the same frequency as the bit rate is output from the SCKn pin. In clock synchronous mode, the SCKn pin functions as the clock output pin."]
753        pub const _01: Self = Self::new(1);
754
755        #[doc = "In asynchronous mode, input a clock with a frequency 16 times the bit rate from the SCKn pin when the SEMR.ABCS bit is 0. Input a clock signal with a frequency eight times the bit rate when the SEMR.ABCS bit is 1. In clock synchronous mode, the SCKn pin functions as the clock input pin."]
756        pub const OTHERS: Self = Self::new(0);
757    }
758    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
759    pub struct Teie_SPEC;
760    pub type Teie = crate::EnumBitfieldStruct<u8, Teie_SPEC>;
761    impl Teie {
762        #[doc = "Disable SCIn_TEI interrupt requests"]
763        pub const _0: Self = Self::new(0);
764
765        #[doc = "Enable SCIn_TEI interrupt requests"]
766        pub const _1: Self = Self::new(1);
767    }
768    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
769    pub struct Mpie_SPEC;
770    pub type Mpie = crate::EnumBitfieldStruct<u8, Mpie_SPEC>;
771    impl Mpie {
772        #[doc = "Normal reception"]
773        pub const _0: Self = Self::new(0);
774
775        #[doc = "When 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. When data with the multi-processor bit set to 1 is received, the MPIE bit is automatically set to 0, and normal reception is resumed."]
776        pub const _1: Self = Self::new(1);
777    }
778    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
779    pub struct Re_SPEC;
780    pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
781    impl Re {
782        #[doc = "Disable serial reception"]
783        pub const _0: Self = Self::new(0);
784
785        #[doc = "Enable serial reception"]
786        pub const _1: Self = Self::new(1);
787    }
788    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
789    pub struct Te_SPEC;
790    pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
791    impl Te {
792        #[doc = "Disable serial transmission"]
793        pub const _0: Self = Self::new(0);
794
795        #[doc = "Enable serial transmission"]
796        pub const _1: Self = Self::new(1);
797    }
798    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
799    pub struct Rie_SPEC;
800    pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
801    impl Rie {
802        #[doc = "Disable SCIn_RXI and SCIn_ERI interrupt requests"]
803        pub const _0: Self = Self::new(0);
804
805        #[doc = "Enable SCIn_RXI and SCIn_ERI interrupt requests"]
806        pub const _1: Self = Self::new(1);
807    }
808    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
809    pub struct Tie_SPEC;
810    pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
811    impl Tie {
812        #[doc = "Disable SCIn_TXI interrupt requests"]
813        pub const _0: Self = Self::new(0);
814
815        #[doc = "Enable SCIn_TXI interrupt requests"]
816        pub const _1: Self = Self::new(1);
817    }
818}
819#[doc(hidden)]
820#[derive(Copy, Clone, Eq, PartialEq)]
821pub struct ScrSmci_SPEC;
822impl crate::sealed::RegSpec for ScrSmci_SPEC {
823    type DataType = u8;
824}
825
826#[doc = "Serial Control Register for Smart Card Interface Mode (SCMR.SMIF = 1)"]
827pub type ScrSmci = crate::RegValueT<ScrSmci_SPEC>;
828
829impl ScrSmci {
830    #[doc = "Clock Enable"]
831    #[inline(always)]
832    pub fn cke(
833        self,
834    ) -> crate::common::RegisterField<
835        0,
836        0x3,
837        1,
838        0,
839        scr_smci::Cke,
840        scr_smci::Cke,
841        ScrSmci_SPEC,
842        crate::common::RW,
843    > {
844        crate::common::RegisterField::<
845            0,
846            0x3,
847            1,
848            0,
849            scr_smci::Cke,
850            scr_smci::Cke,
851            ScrSmci_SPEC,
852            crate::common::RW,
853        >::from_register(self, 0)
854    }
855
856    #[doc = "Transmit End Interrupt Enable"]
857    #[inline(always)]
858    pub fn teie(
859        self,
860    ) -> crate::common::RegisterFieldBool<2, 1, 0, ScrSmci_SPEC, crate::common::RW> {
861        crate::common::RegisterFieldBool::<2, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
862            self, 0,
863        )
864    }
865
866    #[doc = "Multi-Processor Interrupt Enable"]
867    #[inline(always)]
868    pub fn mpie(
869        self,
870    ) -> crate::common::RegisterFieldBool<3, 1, 0, ScrSmci_SPEC, crate::common::RW> {
871        crate::common::RegisterFieldBool::<3, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
872            self, 0,
873        )
874    }
875
876    #[doc = "Receive Enable"]
877    #[inline(always)]
878    pub fn re(
879        self,
880    ) -> crate::common::RegisterField<
881        4,
882        0x1,
883        1,
884        0,
885        scr_smci::Re,
886        scr_smci::Re,
887        ScrSmci_SPEC,
888        crate::common::RW,
889    > {
890        crate::common::RegisterField::<
891            4,
892            0x1,
893            1,
894            0,
895            scr_smci::Re,
896            scr_smci::Re,
897            ScrSmci_SPEC,
898            crate::common::RW,
899        >::from_register(self, 0)
900    }
901
902    #[doc = "Transmit Enable"]
903    #[inline(always)]
904    pub fn te(
905        self,
906    ) -> crate::common::RegisterField<
907        5,
908        0x1,
909        1,
910        0,
911        scr_smci::Te,
912        scr_smci::Te,
913        ScrSmci_SPEC,
914        crate::common::RW,
915    > {
916        crate::common::RegisterField::<
917            5,
918            0x1,
919            1,
920            0,
921            scr_smci::Te,
922            scr_smci::Te,
923            ScrSmci_SPEC,
924            crate::common::RW,
925        >::from_register(self, 0)
926    }
927
928    #[doc = "Receive Interrupt Enable"]
929    #[inline(always)]
930    pub fn rie(
931        self,
932    ) -> crate::common::RegisterField<
933        6,
934        0x1,
935        1,
936        0,
937        scr_smci::Rie,
938        scr_smci::Rie,
939        ScrSmci_SPEC,
940        crate::common::RW,
941    > {
942        crate::common::RegisterField::<
943            6,
944            0x1,
945            1,
946            0,
947            scr_smci::Rie,
948            scr_smci::Rie,
949            ScrSmci_SPEC,
950            crate::common::RW,
951        >::from_register(self, 0)
952    }
953
954    #[doc = "Transmit Interrupt Enable"]
955    #[inline(always)]
956    pub fn tie(
957        self,
958    ) -> crate::common::RegisterField<
959        7,
960        0x1,
961        1,
962        0,
963        scr_smci::Tie,
964        scr_smci::Tie,
965        ScrSmci_SPEC,
966        crate::common::RW,
967    > {
968        crate::common::RegisterField::<
969            7,
970            0x1,
971            1,
972            0,
973            scr_smci::Tie,
974            scr_smci::Tie,
975            ScrSmci_SPEC,
976            crate::common::RW,
977        >::from_register(self, 0)
978    }
979}
980impl ::core::default::Default for ScrSmci {
981    #[inline(always)]
982    fn default() -> ScrSmci {
983        <crate::RegValueT<ScrSmci_SPEC> as RegisterValue<_>>::new(0)
984    }
985}
986pub mod scr_smci {
987
988    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
989    pub struct Cke_SPEC;
990    pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
991    impl Cke {
992        #[doc = "When SMR_SMCI.GM = 0: Disable output The SCKn pin is available for use as an I/O port if set up in the I/O port settings When SMR_SMCI.GM = 1: Fix output low"]
993        pub const _00: Self = Self::new(0);
994
995        #[doc = "When SMR_SMCI.GM = 0: Output clock When SMR_SMCI.GM = 1: Output clock"]
996        pub const _01: Self = Self::new(1);
997
998        #[doc = "When SMR_SMCI.GM = 0: Setting prohibited When SMR_SMCI.GM = 1: Fix output high"]
999        pub const _10: Self = Self::new(2);
1000
1001        #[doc = "When SMR_SMCI.GM = 0: Setting prohibited When SMR_SMCI.GM = 1: Output clock"]
1002        pub const _11: Self = Self::new(3);
1003    }
1004    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1005    pub struct Re_SPEC;
1006    pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
1007    impl Re {
1008        #[doc = "Disable serial reception"]
1009        pub const _0: Self = Self::new(0);
1010
1011        #[doc = "Enable serial reception"]
1012        pub const _1: Self = Self::new(1);
1013    }
1014    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1015    pub struct Te_SPEC;
1016    pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
1017    impl Te {
1018        #[doc = "Disable serial transmission"]
1019        pub const _0: Self = Self::new(0);
1020
1021        #[doc = "Enable serial transmission"]
1022        pub const _1: Self = Self::new(1);
1023    }
1024    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1025    pub struct Rie_SPEC;
1026    pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
1027    impl Rie {
1028        #[doc = "Disable SCIn_RXI and SCIn_ERI interrupt requests"]
1029        pub const _0: Self = Self::new(0);
1030
1031        #[doc = "Enable SCIn_RXI and SCIn_ERI interrupt requests"]
1032        pub const _1: Self = Self::new(1);
1033    }
1034    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1035    pub struct Tie_SPEC;
1036    pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
1037    impl Tie {
1038        #[doc = "Disable SCIn_TXI interrupt requests"]
1039        pub const _0: Self = Self::new(0);
1040
1041        #[doc = "Enable SCIn_TXI interrupt requests"]
1042        pub const _1: Self = Self::new(1);
1043    }
1044}
1045#[doc(hidden)]
1046#[derive(Copy, Clone, Eq, PartialEq)]
1047pub struct Tdr_SPEC;
1048impl crate::sealed::RegSpec for Tdr_SPEC {
1049    type DataType = u8;
1050}
1051
1052#[doc = "Transmit Data Register"]
1053pub type Tdr = crate::RegValueT<Tdr_SPEC>;
1054
1055impl NoBitfieldReg<Tdr_SPEC> for Tdr {}
1056impl ::core::default::Default for Tdr {
1057    #[inline(always)]
1058    fn default() -> Tdr {
1059        <crate::RegValueT<Tdr_SPEC> as RegisterValue<_>>::new(255)
1060    }
1061}
1062
1063#[doc(hidden)]
1064#[derive(Copy, Clone, Eq, PartialEq)]
1065pub struct Ssr_SPEC;
1066impl crate::sealed::RegSpec for Ssr_SPEC {
1067    type DataType = u8;
1068}
1069
1070#[doc = "Serial Status Register for Non-Smart Card Interface (SCMR.SMIF = 0)"]
1071pub type Ssr = crate::RegValueT<Ssr_SPEC>;
1072
1073impl Ssr {
1074    #[doc = "Multi-Processor Bit Transfer"]
1075    #[inline(always)]
1076    pub fn mpbt(
1077        self,
1078    ) -> crate::common::RegisterField<0, 0x1, 1, 0, ssr::Mpbt, ssr::Mpbt, Ssr_SPEC, crate::common::RW>
1079    {
1080        crate::common::RegisterField::<
1081            0,
1082            0x1,
1083            1,
1084            0,
1085            ssr::Mpbt,
1086            ssr::Mpbt,
1087            Ssr_SPEC,
1088            crate::common::RW,
1089        >::from_register(self, 0)
1090    }
1091
1092    #[doc = "Multi-Processor"]
1093    #[inline(always)]
1094    pub fn mpb(
1095        self,
1096    ) -> crate::common::RegisterField<1, 0x1, 1, 0, ssr::Mpb, ssr::Mpb, Ssr_SPEC, crate::common::R>
1097    {
1098        crate::common::RegisterField::<1,0x1,1,0,ssr::Mpb,ssr::Mpb,Ssr_SPEC,crate::common::R>::from_register(self,0)
1099    }
1100
1101    #[doc = "Transmit End Flag"]
1102    #[inline(always)]
1103    pub fn tend(
1104        self,
1105    ) -> crate::common::RegisterField<2, 0x1, 1, 0, ssr::Tend, ssr::Tend, Ssr_SPEC, crate::common::R>
1106    {
1107        crate::common::RegisterField::<2,0x1,1,0,ssr::Tend,ssr::Tend,Ssr_SPEC,crate::common::R>::from_register(self,0)
1108    }
1109
1110    #[doc = "Parity Error Flag"]
1111    #[inline(always)]
1112    pub fn per(
1113        self,
1114    ) -> crate::common::RegisterField<3, 0x1, 1, 0, ssr::Per, ssr::Per, Ssr_SPEC, crate::common::RW>
1115    {
1116        crate::common::RegisterField::<3,0x1,1,0,ssr::Per,ssr::Per,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1117    }
1118
1119    #[doc = "Framing Error Flag"]
1120    #[inline(always)]
1121    pub fn fer(
1122        self,
1123    ) -> crate::common::RegisterField<4, 0x1, 1, 0, ssr::Fer, ssr::Fer, Ssr_SPEC, crate::common::RW>
1124    {
1125        crate::common::RegisterField::<4,0x1,1,0,ssr::Fer,ssr::Fer,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1126    }
1127
1128    #[doc = "Overrun Error Flag"]
1129    #[inline(always)]
1130    pub fn orer(
1131        self,
1132    ) -> crate::common::RegisterField<5, 0x1, 1, 0, ssr::Orer, ssr::Orer, Ssr_SPEC, crate::common::RW>
1133    {
1134        crate::common::RegisterField::<
1135            5,
1136            0x1,
1137            1,
1138            0,
1139            ssr::Orer,
1140            ssr::Orer,
1141            Ssr_SPEC,
1142            crate::common::RW,
1143        >::from_register(self, 0)
1144    }
1145
1146    #[doc = "Receive Data Full Flag"]
1147    #[inline(always)]
1148    pub fn rdrf(
1149        self,
1150    ) -> crate::common::RegisterField<6, 0x1, 1, 0, ssr::Rdrf, ssr::Rdrf, Ssr_SPEC, crate::common::RW>
1151    {
1152        crate::common::RegisterField::<
1153            6,
1154            0x1,
1155            1,
1156            0,
1157            ssr::Rdrf,
1158            ssr::Rdrf,
1159            Ssr_SPEC,
1160            crate::common::RW,
1161        >::from_register(self, 0)
1162    }
1163
1164    #[doc = "Transmit Data Empty Flag"]
1165    #[inline(always)]
1166    pub fn tdre(
1167        self,
1168    ) -> crate::common::RegisterField<7, 0x1, 1, 0, ssr::Tdre, ssr::Tdre, Ssr_SPEC, crate::common::RW>
1169    {
1170        crate::common::RegisterField::<
1171            7,
1172            0x1,
1173            1,
1174            0,
1175            ssr::Tdre,
1176            ssr::Tdre,
1177            Ssr_SPEC,
1178            crate::common::RW,
1179        >::from_register(self, 0)
1180    }
1181}
1182impl ::core::default::Default for Ssr {
1183    #[inline(always)]
1184    fn default() -> Ssr {
1185        <crate::RegValueT<Ssr_SPEC> as RegisterValue<_>>::new(132)
1186    }
1187}
1188pub mod ssr {
1189
1190    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1191    pub struct Mpbt_SPEC;
1192    pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
1193    impl Mpbt {
1194        #[doc = "Data transmission cycle"]
1195        pub const _0: Self = Self::new(0);
1196
1197        #[doc = "ID transmission cycle"]
1198        pub const _1: Self = Self::new(1);
1199    }
1200    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1201    pub struct Mpb_SPEC;
1202    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
1203    impl Mpb {
1204        #[doc = "Data transmission cycle"]
1205        pub const _0: Self = Self::new(0);
1206
1207        #[doc = "ID transmission cycle"]
1208        pub const _1: Self = Self::new(1);
1209    }
1210    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1211    pub struct Tend_SPEC;
1212    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1213    impl Tend {
1214        #[doc = "A character is being transmitted"]
1215        pub const _0: Self = Self::new(0);
1216
1217        #[doc = "Character transfer is complete"]
1218        pub const _1: Self = Self::new(1);
1219    }
1220    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1221    pub struct Per_SPEC;
1222    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1223    impl Per {
1224        #[doc = "No parity error occurred"]
1225        pub const _0: Self = Self::new(0);
1226
1227        #[doc = "Parity error occurred"]
1228        pub const _1: Self = Self::new(1);
1229    }
1230    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1231    pub struct Fer_SPEC;
1232    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
1233    impl Fer {
1234        #[doc = "No framing error occurred"]
1235        pub const _0: Self = Self::new(0);
1236
1237        #[doc = "Framing error occurred"]
1238        pub const _1: Self = Self::new(1);
1239    }
1240    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1241    pub struct Orer_SPEC;
1242    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1243    impl Orer {
1244        #[doc = "No overrun error occurred"]
1245        pub const _0: Self = Self::new(0);
1246
1247        #[doc = "Overrun error occurred"]
1248        pub const _1: Self = Self::new(1);
1249    }
1250    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1251    pub struct Rdrf_SPEC;
1252    pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
1253    impl Rdrf {
1254        #[doc = "No received data in RDR register"]
1255        pub const _0: Self = Self::new(0);
1256
1257        #[doc = "Received data in RDR register"]
1258        pub const _1: Self = Self::new(1);
1259    }
1260    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1261    pub struct Tdre_SPEC;
1262    pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
1263    impl Tdre {
1264        #[doc = "Transmit data in TDR register"]
1265        pub const _0: Self = Self::new(0);
1266
1267        #[doc = "No transmit data in TDR register"]
1268        pub const _1: Self = Self::new(1);
1269    }
1270}
1271#[doc(hidden)]
1272#[derive(Copy, Clone, Eq, PartialEq)]
1273pub struct SsrSmci_SPEC;
1274impl crate::sealed::RegSpec for SsrSmci_SPEC {
1275    type DataType = u8;
1276}
1277
1278#[doc = "Serial Status Register for Smart Card Interface Mode (SCMR.SMIF = 1)"]
1279pub type SsrSmci = crate::RegValueT<SsrSmci_SPEC>;
1280
1281impl SsrSmci {
1282    #[doc = "Multi-Processor Bit Transfer"]
1283    #[inline(always)]
1284    pub fn mpbt(
1285        self,
1286    ) -> crate::common::RegisterFieldBool<0, 1, 0, SsrSmci_SPEC, crate::common::RW> {
1287        crate::common::RegisterFieldBool::<0, 1, 0, SsrSmci_SPEC, crate::common::RW>::from_register(
1288            self, 0,
1289        )
1290    }
1291
1292    #[doc = "Multi-Processor"]
1293    #[inline(always)]
1294    pub fn mpb(self) -> crate::common::RegisterFieldBool<1, 1, 0, SsrSmci_SPEC, crate::common::R> {
1295        crate::common::RegisterFieldBool::<1, 1, 0, SsrSmci_SPEC, crate::common::R>::from_register(
1296            self, 0,
1297        )
1298    }
1299
1300    #[doc = "Transmit End Flag"]
1301    #[inline(always)]
1302    pub fn tend(
1303        self,
1304    ) -> crate::common::RegisterField<
1305        2,
1306        0x1,
1307        1,
1308        0,
1309        ssr_smci::Tend,
1310        ssr_smci::Tend,
1311        SsrSmci_SPEC,
1312        crate::common::R,
1313    > {
1314        crate::common::RegisterField::<
1315            2,
1316            0x1,
1317            1,
1318            0,
1319            ssr_smci::Tend,
1320            ssr_smci::Tend,
1321            SsrSmci_SPEC,
1322            crate::common::R,
1323        >::from_register(self, 0)
1324    }
1325
1326    #[doc = "Parity Error Flag"]
1327    #[inline(always)]
1328    pub fn per(
1329        self,
1330    ) -> crate::common::RegisterField<
1331        3,
1332        0x1,
1333        1,
1334        0,
1335        ssr_smci::Per,
1336        ssr_smci::Per,
1337        SsrSmci_SPEC,
1338        crate::common::RW,
1339    > {
1340        crate::common::RegisterField::<
1341            3,
1342            0x1,
1343            1,
1344            0,
1345            ssr_smci::Per,
1346            ssr_smci::Per,
1347            SsrSmci_SPEC,
1348            crate::common::RW,
1349        >::from_register(self, 0)
1350    }
1351
1352    #[doc = "Error Signal Status Flag"]
1353    #[inline(always)]
1354    pub fn ers(
1355        self,
1356    ) -> crate::common::RegisterField<
1357        4,
1358        0x1,
1359        1,
1360        0,
1361        ssr_smci::Ers,
1362        ssr_smci::Ers,
1363        SsrSmci_SPEC,
1364        crate::common::RW,
1365    > {
1366        crate::common::RegisterField::<
1367            4,
1368            0x1,
1369            1,
1370            0,
1371            ssr_smci::Ers,
1372            ssr_smci::Ers,
1373            SsrSmci_SPEC,
1374            crate::common::RW,
1375        >::from_register(self, 0)
1376    }
1377
1378    #[doc = "Overrun Error Flag"]
1379    #[inline(always)]
1380    pub fn orer(
1381        self,
1382    ) -> crate::common::RegisterField<
1383        5,
1384        0x1,
1385        1,
1386        0,
1387        ssr_smci::Orer,
1388        ssr_smci::Orer,
1389        SsrSmci_SPEC,
1390        crate::common::RW,
1391    > {
1392        crate::common::RegisterField::<
1393            5,
1394            0x1,
1395            1,
1396            0,
1397            ssr_smci::Orer,
1398            ssr_smci::Orer,
1399            SsrSmci_SPEC,
1400            crate::common::RW,
1401        >::from_register(self, 0)
1402    }
1403
1404    #[doc = "Receive Data Full Flag"]
1405    #[inline(always)]
1406    pub fn rdrf(
1407        self,
1408    ) -> crate::common::RegisterField<
1409        6,
1410        0x1,
1411        1,
1412        0,
1413        ssr_smci::Rdrf,
1414        ssr_smci::Rdrf,
1415        SsrSmci_SPEC,
1416        crate::common::RW,
1417    > {
1418        crate::common::RegisterField::<
1419            6,
1420            0x1,
1421            1,
1422            0,
1423            ssr_smci::Rdrf,
1424            ssr_smci::Rdrf,
1425            SsrSmci_SPEC,
1426            crate::common::RW,
1427        >::from_register(self, 0)
1428    }
1429
1430    #[doc = "Transmit Data Empty Flag"]
1431    #[inline(always)]
1432    pub fn tdre(
1433        self,
1434    ) -> crate::common::RegisterField<
1435        7,
1436        0x1,
1437        1,
1438        0,
1439        ssr_smci::Tdre,
1440        ssr_smci::Tdre,
1441        SsrSmci_SPEC,
1442        crate::common::RW,
1443    > {
1444        crate::common::RegisterField::<
1445            7,
1446            0x1,
1447            1,
1448            0,
1449            ssr_smci::Tdre,
1450            ssr_smci::Tdre,
1451            SsrSmci_SPEC,
1452            crate::common::RW,
1453        >::from_register(self, 0)
1454    }
1455}
1456impl ::core::default::Default for SsrSmci {
1457    #[inline(always)]
1458    fn default() -> SsrSmci {
1459        <crate::RegValueT<SsrSmci_SPEC> as RegisterValue<_>>::new(132)
1460    }
1461}
1462pub mod ssr_smci {
1463
1464    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1465    pub struct Tend_SPEC;
1466    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1467    impl Tend {
1468        #[doc = "A character is being transmitted"]
1469        pub const _0: Self = Self::new(0);
1470
1471        #[doc = "Character transfer is complete"]
1472        pub const _1: Self = Self::new(1);
1473    }
1474    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1475    pub struct Per_SPEC;
1476    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1477    impl Per {
1478        #[doc = "No parity error occurred"]
1479        pub const _0: Self = Self::new(0);
1480
1481        #[doc = "Parity error occurred"]
1482        pub const _1: Self = Self::new(1);
1483    }
1484    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1485    pub struct Ers_SPEC;
1486    pub type Ers = crate::EnumBitfieldStruct<u8, Ers_SPEC>;
1487    impl Ers {
1488        #[doc = "No low error signal response"]
1489        pub const _0: Self = Self::new(0);
1490
1491        #[doc = "Low error signal response occurred"]
1492        pub const _1: Self = Self::new(1);
1493    }
1494    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1495    pub struct Orer_SPEC;
1496    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1497    impl Orer {
1498        #[doc = "No overrun error occurred"]
1499        pub const _0: Self = Self::new(0);
1500
1501        #[doc = "Overrun error occurred"]
1502        pub const _1: Self = Self::new(1);
1503    }
1504    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1505    pub struct Rdrf_SPEC;
1506    pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
1507    impl Rdrf {
1508        #[doc = "No received data in RDR register"]
1509        pub const _0: Self = Self::new(0);
1510
1511        #[doc = "Received data in RDR register"]
1512        pub const _1: Self = Self::new(1);
1513    }
1514    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1515    pub struct Tdre_SPEC;
1516    pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
1517    impl Tdre {
1518        #[doc = "Transmit data in TDR register"]
1519        pub const _0: Self = Self::new(0);
1520
1521        #[doc = "No transmit data in TDR register"]
1522        pub const _1: Self = Self::new(1);
1523    }
1524}
1525#[doc(hidden)]
1526#[derive(Copy, Clone, Eq, PartialEq)]
1527pub struct Rdr_SPEC;
1528impl crate::sealed::RegSpec for Rdr_SPEC {
1529    type DataType = u8;
1530}
1531
1532#[doc = "Receive Data Register"]
1533pub type Rdr = crate::RegValueT<Rdr_SPEC>;
1534
1535impl NoBitfieldReg<Rdr_SPEC> for Rdr {}
1536impl ::core::default::Default for Rdr {
1537    #[inline(always)]
1538    fn default() -> Rdr {
1539        <crate::RegValueT<Rdr_SPEC> as RegisterValue<_>>::new(0)
1540    }
1541}
1542
1543#[doc(hidden)]
1544#[derive(Copy, Clone, Eq, PartialEq)]
1545pub struct Scmr_SPEC;
1546impl crate::sealed::RegSpec for Scmr_SPEC {
1547    type DataType = u8;
1548}
1549
1550#[doc = "Smart Card Mode Register"]
1551pub type Scmr = crate::RegValueT<Scmr_SPEC>;
1552
1553impl Scmr {
1554    #[doc = "Smart Card Interface Mode Select"]
1555    #[inline(always)]
1556    pub fn smif(
1557        self,
1558    ) -> crate::common::RegisterField<
1559        0,
1560        0x1,
1561        1,
1562        0,
1563        scmr::Smif,
1564        scmr::Smif,
1565        Scmr_SPEC,
1566        crate::common::RW,
1567    > {
1568        crate::common::RegisterField::<
1569            0,
1570            0x1,
1571            1,
1572            0,
1573            scmr::Smif,
1574            scmr::Smif,
1575            Scmr_SPEC,
1576            crate::common::RW,
1577        >::from_register(self, 0)
1578    }
1579
1580    #[doc = "Transmitted/Received Data Invert"]
1581    #[inline(always)]
1582    pub fn sinv(
1583        self,
1584    ) -> crate::common::RegisterField<
1585        2,
1586        0x1,
1587        1,
1588        0,
1589        scmr::Sinv,
1590        scmr::Sinv,
1591        Scmr_SPEC,
1592        crate::common::RW,
1593    > {
1594        crate::common::RegisterField::<
1595            2,
1596            0x1,
1597            1,
1598            0,
1599            scmr::Sinv,
1600            scmr::Sinv,
1601            Scmr_SPEC,
1602            crate::common::RW,
1603        >::from_register(self, 0)
1604    }
1605
1606    #[doc = "Transmitted/Received Data Transfer Direction"]
1607    #[inline(always)]
1608    pub fn sdir(
1609        self,
1610    ) -> crate::common::RegisterField<
1611        3,
1612        0x1,
1613        1,
1614        0,
1615        scmr::Sdir,
1616        scmr::Sdir,
1617        Scmr_SPEC,
1618        crate::common::RW,
1619    > {
1620        crate::common::RegisterField::<
1621            3,
1622            0x1,
1623            1,
1624            0,
1625            scmr::Sdir,
1626            scmr::Sdir,
1627            Scmr_SPEC,
1628            crate::common::RW,
1629        >::from_register(self, 0)
1630    }
1631
1632    #[doc = "Character Length 1"]
1633    #[inline(always)]
1634    pub fn chr1(
1635        self,
1636    ) -> crate::common::RegisterField<
1637        4,
1638        0x1,
1639        1,
1640        0,
1641        scmr::Chr1,
1642        scmr::Chr1,
1643        Scmr_SPEC,
1644        crate::common::RW,
1645    > {
1646        crate::common::RegisterField::<
1647            4,
1648            0x1,
1649            1,
1650            0,
1651            scmr::Chr1,
1652            scmr::Chr1,
1653            Scmr_SPEC,
1654            crate::common::RW,
1655        >::from_register(self, 0)
1656    }
1657
1658    #[doc = "Base Clock Pulse 2"]
1659    #[inline(always)]
1660    pub fn bcp2(self) -> crate::common::RegisterFieldBool<7, 1, 0, Scmr_SPEC, crate::common::RW> {
1661        crate::common::RegisterFieldBool::<7, 1, 0, Scmr_SPEC, crate::common::RW>::from_register(
1662            self, 0,
1663        )
1664    }
1665}
1666impl ::core::default::Default for Scmr {
1667    #[inline(always)]
1668    fn default() -> Scmr {
1669        <crate::RegValueT<Scmr_SPEC> as RegisterValue<_>>::new(242)
1670    }
1671}
1672pub mod scmr {
1673
1674    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1675    pub struct Smif_SPEC;
1676    pub type Smif = crate::EnumBitfieldStruct<u8, Smif_SPEC>;
1677    impl Smif {
1678        #[doc = "Non-smart card interface mode (asynchronous mode, clock synchronous mode, simple SPI mode, or simple IIC mode)"]
1679        pub const _0: Self = Self::new(0);
1680
1681        #[doc = "Smart card interface mode"]
1682        pub const _1: Self = Self::new(1);
1683    }
1684    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1685    pub struct Sinv_SPEC;
1686    pub type Sinv = crate::EnumBitfieldStruct<u8, Sinv_SPEC>;
1687    impl Sinv {
1688        #[doc = "TDR contents are transmitted as they are. Received data is stored as received in the RDR register."]
1689        pub const _0: Self = Self::new(0);
1690
1691        #[doc = "TDR register contents are inverted before transmission. Receive data is stored in inverted form in the RDR register."]
1692        pub const _1: Self = Self::new(1);
1693    }
1694    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1695    pub struct Sdir_SPEC;
1696    pub type Sdir = crate::EnumBitfieldStruct<u8, Sdir_SPEC>;
1697    impl Sdir {
1698        #[doc = "Transfer LSB-first"]
1699        pub const _0: Self = Self::new(0);
1700
1701        #[doc = "Transfer MSB-first"]
1702        pub const _1: Self = Self::new(1);
1703    }
1704    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1705    pub struct Chr1_SPEC;
1706    pub type Chr1 = crate::EnumBitfieldStruct<u8, Chr1_SPEC>;
1707    impl Chr1 {
1708        #[doc = "SMR.CHR = 0: Transmit/receive in 9-bit data length SMR.CHR = 1: Transmit/receive in 9-bit data length"]
1709        pub const _0: Self = Self::new(0);
1710
1711        #[doc = "SMR.CHR = 0: Transmit/receive in 8-bit data length (initial value) SMR.CHR = 1: Transmit/receive in 7-bit data length"]
1712        pub const _1: Self = Self::new(1);
1713    }
1714}
1715#[doc(hidden)]
1716#[derive(Copy, Clone, Eq, PartialEq)]
1717pub struct Semr_SPEC;
1718impl crate::sealed::RegSpec for Semr_SPEC {
1719    type DataType = u8;
1720}
1721
1722#[doc = "Serial Extended Mode Register"]
1723pub type Semr = crate::RegValueT<Semr_SPEC>;
1724
1725impl Semr {
1726    #[doc = "Bit Rate Modulation Enable"]
1727    #[inline(always)]
1728    pub fn brme(
1729        self,
1730    ) -> crate::common::RegisterField<
1731        2,
1732        0x1,
1733        1,
1734        0,
1735        semr::Brme,
1736        semr::Brme,
1737        Semr_SPEC,
1738        crate::common::RW,
1739    > {
1740        crate::common::RegisterField::<
1741            2,
1742            0x1,
1743            1,
1744            0,
1745            semr::Brme,
1746            semr::Brme,
1747            Semr_SPEC,
1748            crate::common::RW,
1749        >::from_register(self, 0)
1750    }
1751
1752    #[doc = "Asynchronous Mode Extended Base Clock Select 1"]
1753    #[inline(always)]
1754    pub fn abcse(
1755        self,
1756    ) -> crate::common::RegisterField<
1757        3,
1758        0x1,
1759        1,
1760        0,
1761        semr::Abcse,
1762        semr::Abcse,
1763        Semr_SPEC,
1764        crate::common::RW,
1765    > {
1766        crate::common::RegisterField::<
1767            3,
1768            0x1,
1769            1,
1770            0,
1771            semr::Abcse,
1772            semr::Abcse,
1773            Semr_SPEC,
1774            crate::common::RW,
1775        >::from_register(self, 0)
1776    }
1777
1778    #[doc = "Asynchronous Mode Base Clock Select"]
1779    #[inline(always)]
1780    pub fn abcs(
1781        self,
1782    ) -> crate::common::RegisterField<
1783        4,
1784        0x1,
1785        1,
1786        0,
1787        semr::Abcs,
1788        semr::Abcs,
1789        Semr_SPEC,
1790        crate::common::RW,
1791    > {
1792        crate::common::RegisterField::<
1793            4,
1794            0x1,
1795            1,
1796            0,
1797            semr::Abcs,
1798            semr::Abcs,
1799            Semr_SPEC,
1800            crate::common::RW,
1801        >::from_register(self, 0)
1802    }
1803
1804    #[doc = "Digital Noise Filter Function Enable"]
1805    #[inline(always)]
1806    pub fn nfen(
1807        self,
1808    ) -> crate::common::RegisterField<
1809        5,
1810        0x1,
1811        1,
1812        0,
1813        semr::Nfen,
1814        semr::Nfen,
1815        Semr_SPEC,
1816        crate::common::RW,
1817    > {
1818        crate::common::RegisterField::<
1819            5,
1820            0x1,
1821            1,
1822            0,
1823            semr::Nfen,
1824            semr::Nfen,
1825            Semr_SPEC,
1826            crate::common::RW,
1827        >::from_register(self, 0)
1828    }
1829
1830    #[doc = "Baud Rate Generator Double-Speed Mode Select"]
1831    #[inline(always)]
1832    pub fn bgdm(
1833        self,
1834    ) -> crate::common::RegisterField<
1835        6,
1836        0x1,
1837        1,
1838        0,
1839        semr::Bgdm,
1840        semr::Bgdm,
1841        Semr_SPEC,
1842        crate::common::RW,
1843    > {
1844        crate::common::RegisterField::<
1845            6,
1846            0x1,
1847            1,
1848            0,
1849            semr::Bgdm,
1850            semr::Bgdm,
1851            Semr_SPEC,
1852            crate::common::RW,
1853        >::from_register(self, 0)
1854    }
1855
1856    #[doc = "Asynchronous Start Bit Edge Detection Select"]
1857    #[inline(always)]
1858    pub fn rxdesel(
1859        self,
1860    ) -> crate::common::RegisterField<
1861        7,
1862        0x1,
1863        1,
1864        0,
1865        semr::Rxdesel,
1866        semr::Rxdesel,
1867        Semr_SPEC,
1868        crate::common::RW,
1869    > {
1870        crate::common::RegisterField::<
1871            7,
1872            0x1,
1873            1,
1874            0,
1875            semr::Rxdesel,
1876            semr::Rxdesel,
1877            Semr_SPEC,
1878            crate::common::RW,
1879        >::from_register(self, 0)
1880    }
1881}
1882impl ::core::default::Default for Semr {
1883    #[inline(always)]
1884    fn default() -> Semr {
1885        <crate::RegValueT<Semr_SPEC> as RegisterValue<_>>::new(0)
1886    }
1887}
1888pub mod semr {
1889
1890    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1891    pub struct Brme_SPEC;
1892    pub type Brme = crate::EnumBitfieldStruct<u8, Brme_SPEC>;
1893    impl Brme {
1894        #[doc = "Disable bit rate modulation function"]
1895        pub const _0: Self = Self::new(0);
1896
1897        #[doc = "Enable bit rate modulation function"]
1898        pub const _1: Self = Self::new(1);
1899    }
1900    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1901    pub struct Abcse_SPEC;
1902    pub type Abcse = crate::EnumBitfieldStruct<u8, Abcse_SPEC>;
1903    impl Abcse {
1904        #[doc = "Clock cycles for 1-bit period determined by combination of the BGDM and ABCS bits in the SEMR register"]
1905        pub const _0: Self = Self::new(0);
1906
1907        #[doc = "Baud rate is 6 base clock cycles for 1-bit period"]
1908        pub const _1: Self = Self::new(1);
1909    }
1910    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1911    pub struct Abcs_SPEC;
1912    pub type Abcs = crate::EnumBitfieldStruct<u8, Abcs_SPEC>;
1913    impl Abcs {
1914        #[doc = "Select 16 base clock cycles for 1-bit period"]
1915        pub const _0: Self = Self::new(0);
1916
1917        #[doc = "Select 8 base clock cycles for 1-bit period"]
1918        pub const _1: Self = Self::new(1);
1919    }
1920    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1921    pub struct Nfen_SPEC;
1922    pub type Nfen = crate::EnumBitfieldStruct<u8, Nfen_SPEC>;
1923    impl Nfen {
1924        #[doc = "In asynchronous mode: Disable noise cancellation function for RXDn input signal In simple I2C mode: Disable noise cancellation function for SCLn and SDAn input signals"]
1925        pub const _0: Self = Self::new(0);
1926
1927        #[doc = "In asynchronous mode: Enable noise cancellation function for RXDn input signal In simple I2C mode: Enable noise cancellation function for SCLn and SDAn input signals"]
1928        pub const _1: Self = Self::new(1);
1929    }
1930    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1931    pub struct Bgdm_SPEC;
1932    pub type Bgdm = crate::EnumBitfieldStruct<u8, Bgdm_SPEC>;
1933    impl Bgdm {
1934        #[doc = "Output clock from baud rate generator with normal frequency"]
1935        pub const _0: Self = Self::new(0);
1936
1937        #[doc = "Output clock from baud rate generator with doubled frequency"]
1938        pub const _1: Self = Self::new(1);
1939    }
1940    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1941    pub struct Rxdesel_SPEC;
1942    pub type Rxdesel = crate::EnumBitfieldStruct<u8, Rxdesel_SPEC>;
1943    impl Rxdesel {
1944        #[doc = "Detect low level on RXDn pin as start bit"]
1945        pub const _0: Self = Self::new(0);
1946
1947        #[doc = "Detect falling edge of RXDn pin as start bit"]
1948        pub const _1: Self = Self::new(1);
1949    }
1950}
1951#[doc(hidden)]
1952#[derive(Copy, Clone, Eq, PartialEq)]
1953pub struct Snfr_SPEC;
1954impl crate::sealed::RegSpec for Snfr_SPEC {
1955    type DataType = u8;
1956}
1957
1958#[doc = "Noise Filter Setting Register"]
1959pub type Snfr = crate::RegValueT<Snfr_SPEC>;
1960
1961impl Snfr {
1962    #[doc = "Noise Filter Clock Select"]
1963    #[inline(always)]
1964    pub fn nfcs(
1965        self,
1966    ) -> crate::common::RegisterField<
1967        0,
1968        0x7,
1969        1,
1970        0,
1971        snfr::Nfcs,
1972        snfr::Nfcs,
1973        Snfr_SPEC,
1974        crate::common::RW,
1975    > {
1976        crate::common::RegisterField::<
1977            0,
1978            0x7,
1979            1,
1980            0,
1981            snfr::Nfcs,
1982            snfr::Nfcs,
1983            Snfr_SPEC,
1984            crate::common::RW,
1985        >::from_register(self, 0)
1986    }
1987}
1988impl ::core::default::Default for Snfr {
1989    #[inline(always)]
1990    fn default() -> Snfr {
1991        <crate::RegValueT<Snfr_SPEC> as RegisterValue<_>>::new(0)
1992    }
1993}
1994pub mod snfr {
1995
1996    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1997    pub struct Nfcs_SPEC;
1998    pub type Nfcs = crate::EnumBitfieldStruct<u8, Nfcs_SPEC>;
1999    impl Nfcs {
2000        #[doc = "In asynchronous mode: Use clock signal divided by 1 with noise filter In simple I2C mode: Setting prohibited"]
2001        pub const _000: Self = Self::new(0);
2002
2003        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 1 with noise filter"]
2004        pub const _001: Self = Self::new(1);
2005
2006        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 2 with noise filter"]
2007        pub const _010: Self = Self::new(2);
2008
2009        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 4 with noise filter"]
2010        pub const _011: Self = Self::new(3);
2011
2012        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 8 with noise filter"]
2013        pub const _100: Self = Self::new(4);
2014
2015        #[doc = "Setting prohibited"]
2016        pub const OTHERS: Self = Self::new(0);
2017    }
2018}
2019#[doc(hidden)]
2020#[derive(Copy, Clone, Eq, PartialEq)]
2021pub struct Simr1_SPEC;
2022impl crate::sealed::RegSpec for Simr1_SPEC {
2023    type DataType = u8;
2024}
2025
2026#[doc = "IIC Mode Register 1"]
2027pub type Simr1 = crate::RegValueT<Simr1_SPEC>;
2028
2029impl Simr1 {
2030    #[doc = "Simple IIC Mode Select"]
2031    #[inline(always)]
2032    pub fn iicm(
2033        self,
2034    ) -> crate::common::RegisterField<
2035        0,
2036        0x1,
2037        1,
2038        0,
2039        simr1::Iicm,
2040        simr1::Iicm,
2041        Simr1_SPEC,
2042        crate::common::RW,
2043    > {
2044        crate::common::RegisterField::<
2045            0,
2046            0x1,
2047            1,
2048            0,
2049            simr1::Iicm,
2050            simr1::Iicm,
2051            Simr1_SPEC,
2052            crate::common::RW,
2053        >::from_register(self, 0)
2054    }
2055
2056    #[doc = "SDAn Delay Output Select"]
2057    #[inline(always)]
2058    pub fn iicdl(
2059        self,
2060    ) -> crate::common::RegisterField<
2061        3,
2062        0x1f,
2063        1,
2064        0,
2065        simr1::Iicdl,
2066        simr1::Iicdl,
2067        Simr1_SPEC,
2068        crate::common::RW,
2069    > {
2070        crate::common::RegisterField::<
2071            3,
2072            0x1f,
2073            1,
2074            0,
2075            simr1::Iicdl,
2076            simr1::Iicdl,
2077            Simr1_SPEC,
2078            crate::common::RW,
2079        >::from_register(self, 0)
2080    }
2081}
2082impl ::core::default::Default for Simr1 {
2083    #[inline(always)]
2084    fn default() -> Simr1 {
2085        <crate::RegValueT<Simr1_SPEC> as RegisterValue<_>>::new(0)
2086    }
2087}
2088pub mod simr1 {
2089
2090    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2091    pub struct Iicm_SPEC;
2092    pub type Iicm = crate::EnumBitfieldStruct<u8, Iicm_SPEC>;
2093    impl Iicm {
2094        #[doc = "SCMR.SMIF = 0: Asynchronous mode (including multi-processor mode), clock synchronous mode, or simple SPI mode SCMR.SMIF = 1: Smart card interface mode"]
2095        pub const _0: Self = Self::new(0);
2096
2097        #[doc = "SCMR.SMIF = 0: Simple IIC mode SCMR.SMIF = 1: Setting prohibited"]
2098        pub const _1: Self = Self::new(1);
2099    }
2100    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2101    pub struct Iicdl_SPEC;
2102    pub type Iicdl = crate::EnumBitfieldStruct<u8, Iicdl_SPEC>;
2103    impl Iicdl {
2104        #[doc = "No output delay"]
2105        pub const _0_X_00: Self = Self::new(0);
2106
2107        #[doc = "(IICDL - 1) to (IICDL) cycles"]
2108        pub const OTHERS: Self = Self::new(0);
2109    }
2110}
2111#[doc(hidden)]
2112#[derive(Copy, Clone, Eq, PartialEq)]
2113pub struct Simr2_SPEC;
2114impl crate::sealed::RegSpec for Simr2_SPEC {
2115    type DataType = u8;
2116}
2117
2118#[doc = "IIC Mode Register 2"]
2119pub type Simr2 = crate::RegValueT<Simr2_SPEC>;
2120
2121impl Simr2 {
2122    #[doc = "IIC Interrupt Mode Select"]
2123    #[inline(always)]
2124    pub fn iicintm(
2125        self,
2126    ) -> crate::common::RegisterField<
2127        0,
2128        0x1,
2129        1,
2130        0,
2131        simr2::Iicintm,
2132        simr2::Iicintm,
2133        Simr2_SPEC,
2134        crate::common::RW,
2135    > {
2136        crate::common::RegisterField::<
2137            0,
2138            0x1,
2139            1,
2140            0,
2141            simr2::Iicintm,
2142            simr2::Iicintm,
2143            Simr2_SPEC,
2144            crate::common::RW,
2145        >::from_register(self, 0)
2146    }
2147
2148    #[doc = "Clock Synchronization"]
2149    #[inline(always)]
2150    pub fn iiccsc(
2151        self,
2152    ) -> crate::common::RegisterField<
2153        1,
2154        0x1,
2155        1,
2156        0,
2157        simr2::Iiccsc,
2158        simr2::Iiccsc,
2159        Simr2_SPEC,
2160        crate::common::RW,
2161    > {
2162        crate::common::RegisterField::<
2163            1,
2164            0x1,
2165            1,
2166            0,
2167            simr2::Iiccsc,
2168            simr2::Iiccsc,
2169            Simr2_SPEC,
2170            crate::common::RW,
2171        >::from_register(self, 0)
2172    }
2173
2174    #[doc = "ACK Transmission Data"]
2175    #[inline(always)]
2176    pub fn iicackt(
2177        self,
2178    ) -> crate::common::RegisterField<
2179        5,
2180        0x1,
2181        1,
2182        0,
2183        simr2::Iicackt,
2184        simr2::Iicackt,
2185        Simr2_SPEC,
2186        crate::common::RW,
2187    > {
2188        crate::common::RegisterField::<
2189            5,
2190            0x1,
2191            1,
2192            0,
2193            simr2::Iicackt,
2194            simr2::Iicackt,
2195            Simr2_SPEC,
2196            crate::common::RW,
2197        >::from_register(self, 0)
2198    }
2199}
2200impl ::core::default::Default for Simr2 {
2201    #[inline(always)]
2202    fn default() -> Simr2 {
2203        <crate::RegValueT<Simr2_SPEC> as RegisterValue<_>>::new(0)
2204    }
2205}
2206pub mod simr2 {
2207
2208    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2209    pub struct Iicintm_SPEC;
2210    pub type Iicintm = crate::EnumBitfieldStruct<u8, Iicintm_SPEC>;
2211    impl Iicintm {
2212        #[doc = "Use ACK/NACK interrupts"]
2213        pub const _0: Self = Self::new(0);
2214
2215        #[doc = "Use reception and transmission interrupts"]
2216        pub const _1: Self = Self::new(1);
2217    }
2218    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2219    pub struct Iiccsc_SPEC;
2220    pub type Iiccsc = crate::EnumBitfieldStruct<u8, Iiccsc_SPEC>;
2221    impl Iiccsc {
2222        #[doc = "Do not synchronize with clock signal"]
2223        pub const _0: Self = Self::new(0);
2224
2225        #[doc = "Synchronize with clock signal"]
2226        pub const _1: Self = Self::new(1);
2227    }
2228    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2229    pub struct Iicackt_SPEC;
2230    pub type Iicackt = crate::EnumBitfieldStruct<u8, Iicackt_SPEC>;
2231    impl Iicackt {
2232        #[doc = "ACK transmission"]
2233        pub const _0: Self = Self::new(0);
2234
2235        #[doc = "NACK transmission and ACK/NACK reception"]
2236        pub const _1: Self = Self::new(1);
2237    }
2238}
2239#[doc(hidden)]
2240#[derive(Copy, Clone, Eq, PartialEq)]
2241pub struct Simr3_SPEC;
2242impl crate::sealed::RegSpec for Simr3_SPEC {
2243    type DataType = u8;
2244}
2245
2246#[doc = "IIC Mode Register 3"]
2247pub type Simr3 = crate::RegValueT<Simr3_SPEC>;
2248
2249impl Simr3 {
2250    #[doc = "Start Condition Generation"]
2251    #[inline(always)]
2252    pub fn iicstareq(
2253        self,
2254    ) -> crate::common::RegisterField<
2255        0,
2256        0x1,
2257        1,
2258        0,
2259        simr3::Iicstareq,
2260        simr3::Iicstareq,
2261        Simr3_SPEC,
2262        crate::common::RW,
2263    > {
2264        crate::common::RegisterField::<
2265            0,
2266            0x1,
2267            1,
2268            0,
2269            simr3::Iicstareq,
2270            simr3::Iicstareq,
2271            Simr3_SPEC,
2272            crate::common::RW,
2273        >::from_register(self, 0)
2274    }
2275
2276    #[doc = "Restart Condition Generation"]
2277    #[inline(always)]
2278    pub fn iicrstareq(
2279        self,
2280    ) -> crate::common::RegisterField<
2281        1,
2282        0x1,
2283        1,
2284        0,
2285        simr3::Iicrstareq,
2286        simr3::Iicrstareq,
2287        Simr3_SPEC,
2288        crate::common::RW,
2289    > {
2290        crate::common::RegisterField::<
2291            1,
2292            0x1,
2293            1,
2294            0,
2295            simr3::Iicrstareq,
2296            simr3::Iicrstareq,
2297            Simr3_SPEC,
2298            crate::common::RW,
2299        >::from_register(self, 0)
2300    }
2301
2302    #[doc = "Stop Condition Generation"]
2303    #[inline(always)]
2304    pub fn iicstpreq(
2305        self,
2306    ) -> crate::common::RegisterField<
2307        2,
2308        0x1,
2309        1,
2310        0,
2311        simr3::Iicstpreq,
2312        simr3::Iicstpreq,
2313        Simr3_SPEC,
2314        crate::common::RW,
2315    > {
2316        crate::common::RegisterField::<
2317            2,
2318            0x1,
2319            1,
2320            0,
2321            simr3::Iicstpreq,
2322            simr3::Iicstpreq,
2323            Simr3_SPEC,
2324            crate::common::RW,
2325        >::from_register(self, 0)
2326    }
2327
2328    #[doc = "Issuing of Start, Restart, or Stop Condition Completed Flag"]
2329    #[inline(always)]
2330    pub fn iicstif(
2331        self,
2332    ) -> crate::common::RegisterField<
2333        3,
2334        0x1,
2335        1,
2336        0,
2337        simr3::Iicstif,
2338        simr3::Iicstif,
2339        Simr3_SPEC,
2340        crate::common::RW,
2341    > {
2342        crate::common::RegisterField::<
2343            3,
2344            0x1,
2345            1,
2346            0,
2347            simr3::Iicstif,
2348            simr3::Iicstif,
2349            Simr3_SPEC,
2350            crate::common::RW,
2351        >::from_register(self, 0)
2352    }
2353
2354    #[doc = "SDAn Output Select"]
2355    #[inline(always)]
2356    pub fn iicsdas(
2357        self,
2358    ) -> crate::common::RegisterField<
2359        4,
2360        0x3,
2361        1,
2362        0,
2363        simr3::Iicsdas,
2364        simr3::Iicsdas,
2365        Simr3_SPEC,
2366        crate::common::RW,
2367    > {
2368        crate::common::RegisterField::<
2369            4,
2370            0x3,
2371            1,
2372            0,
2373            simr3::Iicsdas,
2374            simr3::Iicsdas,
2375            Simr3_SPEC,
2376            crate::common::RW,
2377        >::from_register(self, 0)
2378    }
2379
2380    #[doc = "SCLn Output Select"]
2381    #[inline(always)]
2382    pub fn iicscls(
2383        self,
2384    ) -> crate::common::RegisterField<
2385        6,
2386        0x3,
2387        1,
2388        0,
2389        simr3::Iicscls,
2390        simr3::Iicscls,
2391        Simr3_SPEC,
2392        crate::common::RW,
2393    > {
2394        crate::common::RegisterField::<
2395            6,
2396            0x3,
2397            1,
2398            0,
2399            simr3::Iicscls,
2400            simr3::Iicscls,
2401            Simr3_SPEC,
2402            crate::common::RW,
2403        >::from_register(self, 0)
2404    }
2405}
2406impl ::core::default::Default for Simr3 {
2407    #[inline(always)]
2408    fn default() -> Simr3 {
2409        <crate::RegValueT<Simr3_SPEC> as RegisterValue<_>>::new(0)
2410    }
2411}
2412pub mod simr3 {
2413
2414    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2415    pub struct Iicstareq_SPEC;
2416    pub type Iicstareq = crate::EnumBitfieldStruct<u8, Iicstareq_SPEC>;
2417    impl Iicstareq {
2418        #[doc = "Do not generate start condition"]
2419        pub const _0: Self = Self::new(0);
2420
2421        #[doc = "Generate start condition"]
2422        pub const _1: Self = Self::new(1);
2423    }
2424    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2425    pub struct Iicrstareq_SPEC;
2426    pub type Iicrstareq = crate::EnumBitfieldStruct<u8, Iicrstareq_SPEC>;
2427    impl Iicrstareq {
2428        #[doc = "Do not generate restart condition"]
2429        pub const _0: Self = Self::new(0);
2430
2431        #[doc = "Generate restart condition"]
2432        pub const _1: Self = Self::new(1);
2433    }
2434    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2435    pub struct Iicstpreq_SPEC;
2436    pub type Iicstpreq = crate::EnumBitfieldStruct<u8, Iicstpreq_SPEC>;
2437    impl Iicstpreq {
2438        #[doc = "Do not generate stop condition"]
2439        pub const _0: Self = Self::new(0);
2440
2441        #[doc = "Generate stop condition"]
2442        pub const _1: Self = Self::new(1);
2443    }
2444    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2445    pub struct Iicstif_SPEC;
2446    pub type Iicstif = crate::EnumBitfieldStruct<u8, Iicstif_SPEC>;
2447    impl Iicstif {
2448        #[doc = "No requests are being made for generating conditions, or a condition is being generated"]
2449        pub const _0: Self = Self::new(0);
2450
2451        #[doc = "Generation of start, restart, or stop condition is complete. When 0 is written to IICSTIF, it is set to 0"]
2452        pub const _1: Self = Self::new(1);
2453    }
2454    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2455    pub struct Iicsdas_SPEC;
2456    pub type Iicsdas = crate::EnumBitfieldStruct<u8, Iicsdas_SPEC>;
2457    impl Iicsdas {
2458        #[doc = "Output serial data"]
2459        pub const _00: Self = Self::new(0);
2460
2461        #[doc = "Generate start, restart, or stop condition"]
2462        pub const _01: Self = Self::new(1);
2463
2464        #[doc = "Output low on SDAn pin"]
2465        pub const _10: Self = Self::new(2);
2466
2467        #[doc = "Drive SDAn pin to high-impedance state"]
2468        pub const _11: Self = Self::new(3);
2469    }
2470    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2471    pub struct Iicscls_SPEC;
2472    pub type Iicscls = crate::EnumBitfieldStruct<u8, Iicscls_SPEC>;
2473    impl Iicscls {
2474        #[doc = "Output serial clock"]
2475        pub const _00: Self = Self::new(0);
2476
2477        #[doc = "Generate start, restart, or stop condition"]
2478        pub const _01: Self = Self::new(1);
2479
2480        #[doc = "Output low on SCLn pin"]
2481        pub const _10: Self = Self::new(2);
2482
2483        #[doc = "Drive SCLn pin to high-impedance state"]
2484        pub const _11: Self = Self::new(3);
2485    }
2486}
2487#[doc(hidden)]
2488#[derive(Copy, Clone, Eq, PartialEq)]
2489pub struct Sisr_SPEC;
2490impl crate::sealed::RegSpec for Sisr_SPEC {
2491    type DataType = u8;
2492}
2493
2494#[doc = "IIC Status Register"]
2495pub type Sisr = crate::RegValueT<Sisr_SPEC>;
2496
2497impl Sisr {
2498    #[doc = "ACK Reception Data Flag"]
2499    #[inline(always)]
2500    pub fn iicackr(
2501        self,
2502    ) -> crate::common::RegisterField<
2503        0,
2504        0x1,
2505        1,
2506        0,
2507        sisr::Iicackr,
2508        sisr::Iicackr,
2509        Sisr_SPEC,
2510        crate::common::R,
2511    > {
2512        crate::common::RegisterField::<
2513            0,
2514            0x1,
2515            1,
2516            0,
2517            sisr::Iicackr,
2518            sisr::Iicackr,
2519            Sisr_SPEC,
2520            crate::common::R,
2521        >::from_register(self, 0)
2522    }
2523}
2524impl ::core::default::Default for Sisr {
2525    #[inline(always)]
2526    fn default() -> Sisr {
2527        <crate::RegValueT<Sisr_SPEC> as RegisterValue<_>>::new(0)
2528    }
2529}
2530pub mod sisr {
2531
2532    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2533    pub struct Iicackr_SPEC;
2534    pub type Iicackr = crate::EnumBitfieldStruct<u8, Iicackr_SPEC>;
2535    impl Iicackr {
2536        #[doc = "ACK received"]
2537        pub const _0: Self = Self::new(0);
2538
2539        #[doc = "NACK received"]
2540        pub const _1: Self = Self::new(1);
2541    }
2542}
2543#[doc(hidden)]
2544#[derive(Copy, Clone, Eq, PartialEq)]
2545pub struct Spmr_SPEC;
2546impl crate::sealed::RegSpec for Spmr_SPEC {
2547    type DataType = u8;
2548}
2549
2550#[doc = "SPI Mode Register"]
2551pub type Spmr = crate::RegValueT<Spmr_SPEC>;
2552
2553impl Spmr {
2554    #[doc = "SSn Pin Function Enable"]
2555    #[inline(always)]
2556    pub fn sse(
2557        self,
2558    ) -> crate::common::RegisterField<
2559        0,
2560        0x1,
2561        1,
2562        0,
2563        spmr::Sse,
2564        spmr::Sse,
2565        Spmr_SPEC,
2566        crate::common::RW,
2567    > {
2568        crate::common::RegisterField::<
2569            0,
2570            0x1,
2571            1,
2572            0,
2573            spmr::Sse,
2574            spmr::Sse,
2575            Spmr_SPEC,
2576            crate::common::RW,
2577        >::from_register(self, 0)
2578    }
2579
2580    #[doc = "CTS Enable"]
2581    #[inline(always)]
2582    pub fn ctse(
2583        self,
2584    ) -> crate::common::RegisterField<
2585        1,
2586        0x1,
2587        1,
2588        0,
2589        spmr::Ctse,
2590        spmr::Ctse,
2591        Spmr_SPEC,
2592        crate::common::RW,
2593    > {
2594        crate::common::RegisterField::<
2595            1,
2596            0x1,
2597            1,
2598            0,
2599            spmr::Ctse,
2600            spmr::Ctse,
2601            Spmr_SPEC,
2602            crate::common::RW,
2603        >::from_register(self, 0)
2604    }
2605
2606    #[doc = "Master Slave Select"]
2607    #[inline(always)]
2608    pub fn mss(
2609        self,
2610    ) -> crate::common::RegisterField<
2611        2,
2612        0x1,
2613        1,
2614        0,
2615        spmr::Mss,
2616        spmr::Mss,
2617        Spmr_SPEC,
2618        crate::common::RW,
2619    > {
2620        crate::common::RegisterField::<
2621            2,
2622            0x1,
2623            1,
2624            0,
2625            spmr::Mss,
2626            spmr::Mss,
2627            Spmr_SPEC,
2628            crate::common::RW,
2629        >::from_register(self, 0)
2630    }
2631
2632    #[doc = "Mode Fault Flag"]
2633    #[inline(always)]
2634    pub fn mff(
2635        self,
2636    ) -> crate::common::RegisterField<
2637        4,
2638        0x1,
2639        1,
2640        0,
2641        spmr::Mff,
2642        spmr::Mff,
2643        Spmr_SPEC,
2644        crate::common::RW,
2645    > {
2646        crate::common::RegisterField::<
2647            4,
2648            0x1,
2649            1,
2650            0,
2651            spmr::Mff,
2652            spmr::Mff,
2653            Spmr_SPEC,
2654            crate::common::RW,
2655        >::from_register(self, 0)
2656    }
2657
2658    #[doc = "Clock Polarity Select"]
2659    #[inline(always)]
2660    pub fn ckpol(
2661        self,
2662    ) -> crate::common::RegisterField<
2663        6,
2664        0x1,
2665        1,
2666        0,
2667        spmr::Ckpol,
2668        spmr::Ckpol,
2669        Spmr_SPEC,
2670        crate::common::RW,
2671    > {
2672        crate::common::RegisterField::<
2673            6,
2674            0x1,
2675            1,
2676            0,
2677            spmr::Ckpol,
2678            spmr::Ckpol,
2679            Spmr_SPEC,
2680            crate::common::RW,
2681        >::from_register(self, 0)
2682    }
2683
2684    #[doc = "Clock Phase Select"]
2685    #[inline(always)]
2686    pub fn ckph(
2687        self,
2688    ) -> crate::common::RegisterField<
2689        7,
2690        0x1,
2691        1,
2692        0,
2693        spmr::Ckph,
2694        spmr::Ckph,
2695        Spmr_SPEC,
2696        crate::common::RW,
2697    > {
2698        crate::common::RegisterField::<
2699            7,
2700            0x1,
2701            1,
2702            0,
2703            spmr::Ckph,
2704            spmr::Ckph,
2705            Spmr_SPEC,
2706            crate::common::RW,
2707        >::from_register(self, 0)
2708    }
2709}
2710impl ::core::default::Default for Spmr {
2711    #[inline(always)]
2712    fn default() -> Spmr {
2713        <crate::RegValueT<Spmr_SPEC> as RegisterValue<_>>::new(0)
2714    }
2715}
2716pub mod spmr {
2717
2718    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2719    pub struct Sse_SPEC;
2720    pub type Sse = crate::EnumBitfieldStruct<u8, Sse_SPEC>;
2721    impl Sse {
2722        #[doc = "Disable SSn pin function"]
2723        pub const _0: Self = Self::new(0);
2724
2725        #[doc = "Enable SSn pin function"]
2726        pub const _1: Self = Self::new(1);
2727    }
2728    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2729    pub struct Ctse_SPEC;
2730    pub type Ctse = crate::EnumBitfieldStruct<u8, Ctse_SPEC>;
2731    impl Ctse {
2732        #[doc = "Disable CTS function (enable RTS output function)"]
2733        pub const _0: Self = Self::new(0);
2734
2735        #[doc = "Enable CTS function"]
2736        pub const _1: Self = Self::new(1);
2737    }
2738    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2739    pub struct Mss_SPEC;
2740    pub type Mss = crate::EnumBitfieldStruct<u8, Mss_SPEC>;
2741    impl Mss {
2742        #[doc = "Transmit through TXDn pin and receive through RXDn pin (master mode)"]
2743        pub const _0: Self = Self::new(0);
2744
2745        #[doc = "Receive through TXDn pin and transmit through RXDn pin (slave mode)"]
2746        pub const _1: Self = Self::new(1);
2747    }
2748    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2749    pub struct Mff_SPEC;
2750    pub type Mff = crate::EnumBitfieldStruct<u8, Mff_SPEC>;
2751    impl Mff {
2752        #[doc = "No mode fault error"]
2753        pub const _0: Self = Self::new(0);
2754
2755        #[doc = "Mode fault error"]
2756        pub const _1: Self = Self::new(1);
2757    }
2758    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2759    pub struct Ckpol_SPEC;
2760    pub type Ckpol = crate::EnumBitfieldStruct<u8, Ckpol_SPEC>;
2761    impl Ckpol {
2762        #[doc = "Do not invert clock polarity"]
2763        pub const _0: Self = Self::new(0);
2764
2765        #[doc = "Invert clock polarity"]
2766        pub const _1: Self = Self::new(1);
2767    }
2768    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2769    pub struct Ckph_SPEC;
2770    pub type Ckph = crate::EnumBitfieldStruct<u8, Ckph_SPEC>;
2771    impl Ckph {
2772        #[doc = "Do not delay clock"]
2773        pub const _0: Self = Self::new(0);
2774
2775        #[doc = "Delay clock"]
2776        pub const _1: Self = Self::new(1);
2777    }
2778}
2779#[doc(hidden)]
2780#[derive(Copy, Clone, Eq, PartialEq)]
2781pub struct Tdrhl_SPEC;
2782impl crate::sealed::RegSpec for Tdrhl_SPEC {
2783    type DataType = u16;
2784}
2785
2786#[doc = "Transmit Data Register"]
2787pub type Tdrhl = crate::RegValueT<Tdrhl_SPEC>;
2788
2789impl Tdrhl {
2790    #[doc = "Serial Transmit Data"]
2791    #[inline(always)]
2792    pub fn tdat(
2793        self,
2794    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Tdrhl_SPEC, crate::common::RW> {
2795        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Tdrhl_SPEC,crate::common::RW>::from_register(self,0)
2796    }
2797}
2798impl ::core::default::Default for Tdrhl {
2799    #[inline(always)]
2800    fn default() -> Tdrhl {
2801        <crate::RegValueT<Tdrhl_SPEC> as RegisterValue<_>>::new(65535)
2802    }
2803}
2804
2805#[doc(hidden)]
2806#[derive(Copy, Clone, Eq, PartialEq)]
2807pub struct Rdrhl_SPEC;
2808impl crate::sealed::RegSpec for Rdrhl_SPEC {
2809    type DataType = u16;
2810}
2811
2812#[doc = "Receive Data Register"]
2813pub type Rdrhl = crate::RegValueT<Rdrhl_SPEC>;
2814
2815impl Rdrhl {
2816    #[doc = "Serial Receive Data"]
2817    #[inline(always)]
2818    pub fn rdat(
2819        self,
2820    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Rdrhl_SPEC, crate::common::R> {
2821        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Rdrhl_SPEC,crate::common::R>::from_register(self,0)
2822    }
2823}
2824impl ::core::default::Default for Rdrhl {
2825    #[inline(always)]
2826    fn default() -> Rdrhl {
2827        <crate::RegValueT<Rdrhl_SPEC> as RegisterValue<_>>::new(0)
2828    }
2829}
2830
2831#[doc(hidden)]
2832#[derive(Copy, Clone, Eq, PartialEq)]
2833pub struct Mddr_SPEC;
2834impl crate::sealed::RegSpec for Mddr_SPEC {
2835    type DataType = u8;
2836}
2837
2838#[doc = "Modulation Duty Register"]
2839pub type Mddr = crate::RegValueT<Mddr_SPEC>;
2840
2841impl NoBitfieldReg<Mddr_SPEC> for Mddr {}
2842impl ::core::default::Default for Mddr {
2843    #[inline(always)]
2844    fn default() -> Mddr {
2845        <crate::RegValueT<Mddr_SPEC> as RegisterValue<_>>::new(255)
2846    }
2847}
2848
2849#[doc(hidden)]
2850#[derive(Copy, Clone, Eq, PartialEq)]
2851pub struct Dccr_SPEC;
2852impl crate::sealed::RegSpec for Dccr_SPEC {
2853    type DataType = u8;
2854}
2855
2856#[doc = "Data Compare Match Control Register"]
2857pub type Dccr = crate::RegValueT<Dccr_SPEC>;
2858
2859impl Dccr {
2860    #[doc = "Data Compare Match Flag"]
2861    #[inline(always)]
2862    pub fn dcmf(
2863        self,
2864    ) -> crate::common::RegisterField<
2865        0,
2866        0x1,
2867        1,
2868        0,
2869        dccr::Dcmf,
2870        dccr::Dcmf,
2871        Dccr_SPEC,
2872        crate::common::RW,
2873    > {
2874        crate::common::RegisterField::<
2875            0,
2876            0x1,
2877            1,
2878            0,
2879            dccr::Dcmf,
2880            dccr::Dcmf,
2881            Dccr_SPEC,
2882            crate::common::RW,
2883        >::from_register(self, 0)
2884    }
2885
2886    #[doc = "Data Compare Match Parity Error Flag"]
2887    #[inline(always)]
2888    pub fn dper(
2889        self,
2890    ) -> crate::common::RegisterField<
2891        3,
2892        0x1,
2893        1,
2894        0,
2895        dccr::Dper,
2896        dccr::Dper,
2897        Dccr_SPEC,
2898        crate::common::RW,
2899    > {
2900        crate::common::RegisterField::<
2901            3,
2902            0x1,
2903            1,
2904            0,
2905            dccr::Dper,
2906            dccr::Dper,
2907            Dccr_SPEC,
2908            crate::common::RW,
2909        >::from_register(self, 0)
2910    }
2911
2912    #[doc = "Data Compare Match Framing Error Flag"]
2913    #[inline(always)]
2914    pub fn dfer(
2915        self,
2916    ) -> crate::common::RegisterField<
2917        4,
2918        0x1,
2919        1,
2920        0,
2921        dccr::Dfer,
2922        dccr::Dfer,
2923        Dccr_SPEC,
2924        crate::common::RW,
2925    > {
2926        crate::common::RegisterField::<
2927            4,
2928            0x1,
2929            1,
2930            0,
2931            dccr::Dfer,
2932            dccr::Dfer,
2933            Dccr_SPEC,
2934            crate::common::RW,
2935        >::from_register(self, 0)
2936    }
2937
2938    #[doc = "ID Frame Select"]
2939    #[inline(always)]
2940    pub fn idsel(
2941        self,
2942    ) -> crate::common::RegisterField<
2943        6,
2944        0x1,
2945        1,
2946        0,
2947        dccr::Idsel,
2948        dccr::Idsel,
2949        Dccr_SPEC,
2950        crate::common::RW,
2951    > {
2952        crate::common::RegisterField::<
2953            6,
2954            0x1,
2955            1,
2956            0,
2957            dccr::Idsel,
2958            dccr::Idsel,
2959            Dccr_SPEC,
2960            crate::common::RW,
2961        >::from_register(self, 0)
2962    }
2963
2964    #[doc = "Data Compare Match Enable"]
2965    #[inline(always)]
2966    pub fn dcme(
2967        self,
2968    ) -> crate::common::RegisterField<
2969        7,
2970        0x1,
2971        1,
2972        0,
2973        dccr::Dcme,
2974        dccr::Dcme,
2975        Dccr_SPEC,
2976        crate::common::RW,
2977    > {
2978        crate::common::RegisterField::<
2979            7,
2980            0x1,
2981            1,
2982            0,
2983            dccr::Dcme,
2984            dccr::Dcme,
2985            Dccr_SPEC,
2986            crate::common::RW,
2987        >::from_register(self, 0)
2988    }
2989}
2990impl ::core::default::Default for Dccr {
2991    #[inline(always)]
2992    fn default() -> Dccr {
2993        <crate::RegValueT<Dccr_SPEC> as RegisterValue<_>>::new(64)
2994    }
2995}
2996pub mod dccr {
2997
2998    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2999    pub struct Dcmf_SPEC;
3000    pub type Dcmf = crate::EnumBitfieldStruct<u8, Dcmf_SPEC>;
3001    impl Dcmf {
3002        #[doc = "Not matched"]
3003        pub const _0: Self = Self::new(0);
3004
3005        #[doc = "Matched"]
3006        pub const _1: Self = Self::new(1);
3007    }
3008    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3009    pub struct Dper_SPEC;
3010    pub type Dper = crate::EnumBitfieldStruct<u8, Dper_SPEC>;
3011    impl Dper {
3012        #[doc = "No parity error occurred"]
3013        pub const _0: Self = Self::new(0);
3014
3015        #[doc = "Parity error occurred"]
3016        pub const _1: Self = Self::new(1);
3017    }
3018    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3019    pub struct Dfer_SPEC;
3020    pub type Dfer = crate::EnumBitfieldStruct<u8, Dfer_SPEC>;
3021    impl Dfer {
3022        #[doc = "No framing error occurred"]
3023        pub const _0: Self = Self::new(0);
3024
3025        #[doc = "Framing error occurred"]
3026        pub const _1: Self = Self::new(1);
3027    }
3028    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3029    pub struct Idsel_SPEC;
3030    pub type Idsel = crate::EnumBitfieldStruct<u8, Idsel_SPEC>;
3031    impl Idsel {
3032        #[doc = "Always compare data regardless of the MPB bit value"]
3033        pub const _0: Self = Self::new(0);
3034
3035        #[doc = "Only compare data when MPB bit = 1 (ID frame)"]
3036        pub const _1: Self = Self::new(1);
3037    }
3038    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3039    pub struct Dcme_SPEC;
3040    pub type Dcme = crate::EnumBitfieldStruct<u8, Dcme_SPEC>;
3041    impl Dcme {
3042        #[doc = "Disable address match function"]
3043        pub const _0: Self = Self::new(0);
3044
3045        #[doc = "Enable address match function"]
3046        pub const _1: Self = Self::new(1);
3047    }
3048}
3049#[doc(hidden)]
3050#[derive(Copy, Clone, Eq, PartialEq)]
3051pub struct Cdr_SPEC;
3052impl crate::sealed::RegSpec for Cdr_SPEC {
3053    type DataType = u16;
3054}
3055
3056#[doc = "Compare Match Data Register"]
3057pub type Cdr = crate::RegValueT<Cdr_SPEC>;
3058
3059impl Cdr {
3060    #[doc = "Compare Match Data"]
3061    #[inline(always)]
3062    pub fn cmpd(
3063        self,
3064    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Cdr_SPEC, crate::common::RW> {
3065        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Cdr_SPEC,crate::common::RW>::from_register(self,0)
3066    }
3067}
3068impl ::core::default::Default for Cdr {
3069    #[inline(always)]
3070    fn default() -> Cdr {
3071        <crate::RegValueT<Cdr_SPEC> as RegisterValue<_>>::new(0)
3072    }
3073}
3074
3075#[doc(hidden)]
3076#[derive(Copy, Clone, Eq, PartialEq)]
3077pub struct Sptr_SPEC;
3078impl crate::sealed::RegSpec for Sptr_SPEC {
3079    type DataType = u8;
3080}
3081
3082#[doc = "Serial Port Register"]
3083pub type Sptr = crate::RegValueT<Sptr_SPEC>;
3084
3085impl Sptr {
3086    #[doc = "Serial Input Data Monitor"]
3087    #[inline(always)]
3088    pub fn rxdmon(self) -> crate::common::RegisterFieldBool<0, 1, 0, Sptr_SPEC, crate::common::R> {
3089        crate::common::RegisterFieldBool::<0, 1, 0, Sptr_SPEC, crate::common::R>::from_register(
3090            self, 0,
3091        )
3092    }
3093
3094    #[doc = "Serial Port Break Data Select"]
3095    #[inline(always)]
3096    pub fn spb2dt(self) -> crate::common::RegisterFieldBool<1, 1, 0, Sptr_SPEC, crate::common::RW> {
3097        crate::common::RegisterFieldBool::<1, 1, 0, Sptr_SPEC, crate::common::RW>::from_register(
3098            self, 0,
3099        )
3100    }
3101
3102    #[doc = "Serial Port Break I/O"]
3103    #[inline(always)]
3104    pub fn spb2io(
3105        self,
3106    ) -> crate::common::RegisterField<
3107        2,
3108        0x1,
3109        1,
3110        0,
3111        sptr::Spb2Io,
3112        sptr::Spb2Io,
3113        Sptr_SPEC,
3114        crate::common::RW,
3115    > {
3116        crate::common::RegisterField::<
3117            2,
3118            0x1,
3119            1,
3120            0,
3121            sptr::Spb2Io,
3122            sptr::Spb2Io,
3123            Sptr_SPEC,
3124            crate::common::RW,
3125        >::from_register(self, 0)
3126    }
3127}
3128impl ::core::default::Default for Sptr {
3129    #[inline(always)]
3130    fn default() -> Sptr {
3131        <crate::RegValueT<Sptr_SPEC> as RegisterValue<_>>::new(3)
3132    }
3133}
3134pub mod sptr {
3135
3136    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3137    pub struct Spb2Io_SPEC;
3138    pub type Spb2Io = crate::EnumBitfieldStruct<u8, Spb2Io_SPEC>;
3139    impl Spb2Io {
3140        #[doc = "Do not output value of SPB2DT bit on TXDn pin"]
3141        pub const _0: Self = Self::new(0);
3142
3143        #[doc = "Output value of SPB2DT bit on TXDn pin"]
3144        pub const _1: Self = Self::new(1);
3145    }
3146}