ra4e2_pac/
sci0.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.30.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:48:35 +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"]
28unsafe impl ::core::marker::Send for super::Sci0 {}
29unsafe impl ::core::marker::Sync for super::Sci0 {}
30impl super::Sci0 {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Serial Mode Register 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 and Non-FIFO Mode (SCMR.SMIF = 0, FCR.FM = 0, and MMR.MANEN = 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 Non-Smart Card Interface and FIFO Mode (SCMR.SMIF = 0, FCR.FM = 1, and MMR.MANEN = 0)"]
112    #[inline(always)]
113    pub const fn ssr_fifo(
114        &self,
115    ) -> &'static crate::common::Reg<self::SsrFifo_SPEC, crate::common::RW> {
116        unsafe {
117            crate::common::Reg::<self::SsrFifo_SPEC, crate::common::RW>::from_ptr(
118                self._svd2pac_as_ptr().add(4usize),
119            )
120        }
121    }
122
123    #[doc = "Serial Status Register for Manchester Mode (SCMR.SMIF = 0, and MMR.MANEN = 1)"]
124    #[inline(always)]
125    pub const fn ssr_manc(
126        &self,
127    ) -> &'static crate::common::Reg<self::SsrManc_SPEC, crate::common::RW> {
128        unsafe {
129            crate::common::Reg::<self::SsrManc_SPEC, crate::common::RW>::from_ptr(
130                self._svd2pac_as_ptr().add(4usize),
131            )
132        }
133    }
134
135    #[doc = "Serial Status Register for Smart Card Interface Mode (SCMR.SMIF = 1, and MMR.MANEN = 0)"]
136    #[inline(always)]
137    pub const fn ssr_smci(
138        &self,
139    ) -> &'static crate::common::Reg<self::SsrSmci_SPEC, crate::common::RW> {
140        unsafe {
141            crate::common::Reg::<self::SsrSmci_SPEC, crate::common::RW>::from_ptr(
142                self._svd2pac_as_ptr().add(4usize),
143            )
144        }
145    }
146
147    #[doc = "Receive Data Register"]
148    #[inline(always)]
149    pub const fn rdr(&self) -> &'static crate::common::Reg<self::Rdr_SPEC, crate::common::R> {
150        unsafe {
151            crate::common::Reg::<self::Rdr_SPEC, crate::common::R>::from_ptr(
152                self._svd2pac_as_ptr().add(5usize),
153            )
154        }
155    }
156
157    #[doc = "Smart Card Mode Register"]
158    #[inline(always)]
159    pub const fn scmr(&self) -> &'static crate::common::Reg<self::Scmr_SPEC, crate::common::RW> {
160        unsafe {
161            crate::common::Reg::<self::Scmr_SPEC, crate::common::RW>::from_ptr(
162                self._svd2pac_as_ptr().add(6usize),
163            )
164        }
165    }
166
167    #[doc = "Serial Extended Mode Register"]
168    #[inline(always)]
169    pub const fn semr(&self) -> &'static crate::common::Reg<self::Semr_SPEC, crate::common::RW> {
170        unsafe {
171            crate::common::Reg::<self::Semr_SPEC, crate::common::RW>::from_ptr(
172                self._svd2pac_as_ptr().add(7usize),
173            )
174        }
175    }
176
177    #[doc = "Noise Filter Setting Register"]
178    #[inline(always)]
179    pub const fn snfr(&self) -> &'static crate::common::Reg<self::Snfr_SPEC, crate::common::RW> {
180        unsafe {
181            crate::common::Reg::<self::Snfr_SPEC, crate::common::RW>::from_ptr(
182                self._svd2pac_as_ptr().add(8usize),
183            )
184        }
185    }
186
187    #[doc = "IIC Mode Register 1"]
188    #[inline(always)]
189    pub const fn simr1(&self) -> &'static crate::common::Reg<self::Simr1_SPEC, crate::common::RW> {
190        unsafe {
191            crate::common::Reg::<self::Simr1_SPEC, crate::common::RW>::from_ptr(
192                self._svd2pac_as_ptr().add(9usize),
193            )
194        }
195    }
196
197    #[doc = "IIC Mode Register 2"]
198    #[inline(always)]
199    pub const fn simr2(&self) -> &'static crate::common::Reg<self::Simr2_SPEC, crate::common::RW> {
200        unsafe {
201            crate::common::Reg::<self::Simr2_SPEC, crate::common::RW>::from_ptr(
202                self._svd2pac_as_ptr().add(10usize),
203            )
204        }
205    }
206
207    #[doc = "IIC Mode Register 3"]
208    #[inline(always)]
209    pub const fn simr3(&self) -> &'static crate::common::Reg<self::Simr3_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::Simr3_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(11usize),
213            )
214        }
215    }
216
217    #[doc = "IIC Status Register"]
218    #[inline(always)]
219    pub const fn sisr(&self) -> &'static crate::common::Reg<self::Sisr_SPEC, crate::common::R> {
220        unsafe {
221            crate::common::Reg::<self::Sisr_SPEC, crate::common::R>::from_ptr(
222                self._svd2pac_as_ptr().add(12usize),
223            )
224        }
225    }
226
227    #[doc = "SPI Mode Register"]
228    #[inline(always)]
229    pub const fn spmr(&self) -> &'static crate::common::Reg<self::Spmr_SPEC, crate::common::RW> {
230        unsafe {
231            crate::common::Reg::<self::Spmr_SPEC, crate::common::RW>::from_ptr(
232                self._svd2pac_as_ptr().add(13usize),
233            )
234        }
235    }
236
237    #[doc = "Transmit FIFO Data Register"]
238    #[inline(always)]
239    pub const fn ftdrhl(&self) -> &'static crate::common::Reg<self::Ftdrhl_SPEC, crate::common::W> {
240        unsafe {
241            crate::common::Reg::<self::Ftdrhl_SPEC, crate::common::W>::from_ptr(
242                self._svd2pac_as_ptr().add(14usize),
243            )
244        }
245    }
246
247    #[doc = "Transmit Data Register for Non-Manchester mode (MMR.MANEN = 0)"]
248    #[inline(always)]
249    pub const fn tdrhl(&self) -> &'static crate::common::Reg<self::Tdrhl_SPEC, crate::common::RW> {
250        unsafe {
251            crate::common::Reg::<self::Tdrhl_SPEC, crate::common::RW>::from_ptr(
252                self._svd2pac_as_ptr().add(14usize),
253            )
254        }
255    }
256
257    #[doc = "Transmit Data Register for Manchester mode (MMR.MANEN = 1)"]
258    #[inline(always)]
259    pub const fn tdrhl_man(
260        &self,
261    ) -> &'static crate::common::Reg<self::TdrhlMan_SPEC, crate::common::RW> {
262        unsafe {
263            crate::common::Reg::<self::TdrhlMan_SPEC, crate::common::RW>::from_ptr(
264                self._svd2pac_as_ptr().add(14usize),
265            )
266        }
267    }
268
269    #[doc = "Transmit FIFO Data Register"]
270    #[inline(always)]
271    pub const fn ftdrh(&self) -> &'static crate::common::Reg<self::Ftdrh_SPEC, crate::common::W> {
272        unsafe {
273            crate::common::Reg::<self::Ftdrh_SPEC, crate::common::W>::from_ptr(
274                self._svd2pac_as_ptr().add(14usize),
275            )
276        }
277    }
278
279    #[doc = "Transmit FIFO Data Register"]
280    #[inline(always)]
281    pub const fn ftdrl(&self) -> &'static crate::common::Reg<self::Ftdrl_SPEC, crate::common::W> {
282        unsafe {
283            crate::common::Reg::<self::Ftdrl_SPEC, crate::common::W>::from_ptr(
284                self._svd2pac_as_ptr().add(15usize),
285            )
286        }
287    }
288
289    #[doc = "Receive FIFO Data Register"]
290    #[inline(always)]
291    pub const fn frdrhl(&self) -> &'static crate::common::Reg<self::Frdrhl_SPEC, crate::common::R> {
292        unsafe {
293            crate::common::Reg::<self::Frdrhl_SPEC, crate::common::R>::from_ptr(
294                self._svd2pac_as_ptr().add(16usize),
295            )
296        }
297    }
298
299    #[doc = "Receive Data Register for Non-Manchester mode (MMR.MANEN = 0)"]
300    #[inline(always)]
301    pub const fn rdrhl(&self) -> &'static crate::common::Reg<self::Rdrhl_SPEC, crate::common::R> {
302        unsafe {
303            crate::common::Reg::<self::Rdrhl_SPEC, crate::common::R>::from_ptr(
304                self._svd2pac_as_ptr().add(16usize),
305            )
306        }
307    }
308
309    #[doc = "Receive Data Register for Manchester mode (MMR.MANEN = 1)"]
310    #[inline(always)]
311    pub const fn rdrhl_man(
312        &self,
313    ) -> &'static crate::common::Reg<self::RdrhlMan_SPEC, crate::common::R> {
314        unsafe {
315            crate::common::Reg::<self::RdrhlMan_SPEC, crate::common::R>::from_ptr(
316                self._svd2pac_as_ptr().add(16usize),
317            )
318        }
319    }
320
321    #[doc = "Receive FIFO Data Register"]
322    #[inline(always)]
323    pub const fn frdrh(&self) -> &'static crate::common::Reg<self::Frdrh_SPEC, crate::common::R> {
324        unsafe {
325            crate::common::Reg::<self::Frdrh_SPEC, crate::common::R>::from_ptr(
326                self._svd2pac_as_ptr().add(16usize),
327            )
328        }
329    }
330
331    #[doc = "Receive FIFO Data Register"]
332    #[inline(always)]
333    pub const fn frdrl(&self) -> &'static crate::common::Reg<self::Frdrl_SPEC, crate::common::R> {
334        unsafe {
335            crate::common::Reg::<self::Frdrl_SPEC, crate::common::R>::from_ptr(
336                self._svd2pac_as_ptr().add(17usize),
337            )
338        }
339    }
340
341    #[doc = "Modulation Duty Register"]
342    #[inline(always)]
343    pub const fn mddr(&self) -> &'static crate::common::Reg<self::Mddr_SPEC, crate::common::RW> {
344        unsafe {
345            crate::common::Reg::<self::Mddr_SPEC, crate::common::RW>::from_ptr(
346                self._svd2pac_as_ptr().add(18usize),
347            )
348        }
349    }
350
351    #[doc = "Data Compare Match Control Register"]
352    #[inline(always)]
353    pub const fn dccr(&self) -> &'static crate::common::Reg<self::Dccr_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::Dccr_SPEC, crate::common::RW>::from_ptr(
356                self._svd2pac_as_ptr().add(19usize),
357            )
358        }
359    }
360
361    #[doc = "FIFO Control Register"]
362    #[inline(always)]
363    pub const fn fcr(&self) -> &'static crate::common::Reg<self::Fcr_SPEC, crate::common::RW> {
364        unsafe {
365            crate::common::Reg::<self::Fcr_SPEC, crate::common::RW>::from_ptr(
366                self._svd2pac_as_ptr().add(20usize),
367            )
368        }
369    }
370
371    #[doc = "FIFO Data Count Register"]
372    #[inline(always)]
373    pub const fn fdr(&self) -> &'static crate::common::Reg<self::Fdr_SPEC, crate::common::R> {
374        unsafe {
375            crate::common::Reg::<self::Fdr_SPEC, crate::common::R>::from_ptr(
376                self._svd2pac_as_ptr().add(22usize),
377            )
378        }
379    }
380
381    #[doc = "Line Status Register"]
382    #[inline(always)]
383    pub const fn lsr(&self) -> &'static crate::common::Reg<self::Lsr_SPEC, crate::common::R> {
384        unsafe {
385            crate::common::Reg::<self::Lsr_SPEC, crate::common::R>::from_ptr(
386                self._svd2pac_as_ptr().add(24usize),
387            )
388        }
389    }
390
391    #[doc = "Compare Match Data Register"]
392    #[inline(always)]
393    pub const fn cdr(&self) -> &'static crate::common::Reg<self::Cdr_SPEC, crate::common::RW> {
394        unsafe {
395            crate::common::Reg::<self::Cdr_SPEC, crate::common::RW>::from_ptr(
396                self._svd2pac_as_ptr().add(26usize),
397            )
398        }
399    }
400
401    #[doc = "Serial Port Register"]
402    #[inline(always)]
403    pub const fn sptr(&self) -> &'static crate::common::Reg<self::Sptr_SPEC, crate::common::RW> {
404        unsafe {
405            crate::common::Reg::<self::Sptr_SPEC, crate::common::RW>::from_ptr(
406                self._svd2pac_as_ptr().add(28usize),
407            )
408        }
409    }
410
411    #[doc = "Adjustment Communication Timing Register"]
412    #[inline(always)]
413    pub const fn actr(&self) -> &'static crate::common::Reg<self::Actr_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::Actr_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(29usize),
417            )
418        }
419    }
420
421    #[doc = "Manchester Mode Register"]
422    #[inline(always)]
423    pub const fn mmr(&self) -> &'static crate::common::Reg<self::Mmr_SPEC, crate::common::RW> {
424        unsafe {
425            crate::common::Reg::<self::Mmr_SPEC, crate::common::RW>::from_ptr(
426                self._svd2pac_as_ptr().add(32usize),
427            )
428        }
429    }
430
431    #[doc = "Transmit Manchester Preface Setting Register"]
432    #[inline(always)]
433    pub const fn tmpr(&self) -> &'static crate::common::Reg<self::Tmpr_SPEC, crate::common::RW> {
434        unsafe {
435            crate::common::Reg::<self::Tmpr_SPEC, crate::common::RW>::from_ptr(
436                self._svd2pac_as_ptr().add(34usize),
437            )
438        }
439    }
440
441    #[doc = "Receive Manchester Preface Setting Register"]
442    #[inline(always)]
443    pub const fn rmpr(&self) -> &'static crate::common::Reg<self::Rmpr_SPEC, crate::common::RW> {
444        unsafe {
445            crate::common::Reg::<self::Rmpr_SPEC, crate::common::RW>::from_ptr(
446                self._svd2pac_as_ptr().add(35usize),
447            )
448        }
449    }
450
451    #[doc = "Manchester Extended Error Status Register"]
452    #[inline(always)]
453    pub const fn mesr(&self) -> &'static crate::common::Reg<self::Mesr_SPEC, crate::common::RW> {
454        unsafe {
455            crate::common::Reg::<self::Mesr_SPEC, crate::common::RW>::from_ptr(
456                self._svd2pac_as_ptr().add(36usize),
457            )
458        }
459    }
460
461    #[doc = "Manchester Extended Error Control Register"]
462    #[inline(always)]
463    pub const fn mecr(&self) -> &'static crate::common::Reg<self::Mecr_SPEC, crate::common::RW> {
464        unsafe {
465            crate::common::Reg::<self::Mecr_SPEC, crate::common::RW>::from_ptr(
466                self._svd2pac_as_ptr().add(37usize),
467            )
468        }
469    }
470}
471#[doc(hidden)]
472#[derive(Copy, Clone, Eq, PartialEq)]
473pub struct Smr_SPEC;
474impl crate::sealed::RegSpec for Smr_SPEC {
475    type DataType = u8;
476}
477
478#[doc = "Serial Mode Register for Non-Smart Card Interface Mode (SCMR.SMIF = 0)"]
479pub type Smr = crate::RegValueT<Smr_SPEC>;
480
481impl Smr {
482    #[doc = "Clock Select"]
483    #[inline(always)]
484    pub fn cks(
485        self,
486    ) -> crate::common::RegisterField<0, 0x3, 1, 0, smr::Cks, smr::Cks, Smr_SPEC, crate::common::RW>
487    {
488        crate::common::RegisterField::<0,0x3,1,0,smr::Cks,smr::Cks,Smr_SPEC,crate::common::RW>::from_register(self,0)
489    }
490
491    #[doc = "Multi-Processor Mode"]
492    #[inline(always)]
493    pub fn mp(
494        self,
495    ) -> crate::common::RegisterField<2, 0x1, 1, 0, smr::Mp, smr::Mp, Smr_SPEC, crate::common::RW>
496    {
497        crate::common::RegisterField::<2,0x1,1,0,smr::Mp,smr::Mp,Smr_SPEC,crate::common::RW>::from_register(self,0)
498    }
499
500    #[doc = "Stop Bit Length"]
501    #[inline(always)]
502    pub fn stop(
503        self,
504    ) -> crate::common::RegisterField<3, 0x1, 1, 0, smr::Stop, smr::Stop, Smr_SPEC, crate::common::RW>
505    {
506        crate::common::RegisterField::<
507            3,
508            0x1,
509            1,
510            0,
511            smr::Stop,
512            smr::Stop,
513            Smr_SPEC,
514            crate::common::RW,
515        >::from_register(self, 0)
516    }
517
518    #[doc = "Parity Mode"]
519    #[inline(always)]
520    pub fn pm(
521        self,
522    ) -> crate::common::RegisterField<4, 0x1, 1, 0, smr::Pm, smr::Pm, Smr_SPEC, crate::common::RW>
523    {
524        crate::common::RegisterField::<4,0x1,1,0,smr::Pm,smr::Pm,Smr_SPEC,crate::common::RW>::from_register(self,0)
525    }
526
527    #[doc = "Parity Enable"]
528    #[inline(always)]
529    pub fn pe(
530        self,
531    ) -> crate::common::RegisterField<5, 0x1, 1, 0, smr::Pe, smr::Pe, Smr_SPEC, crate::common::RW>
532    {
533        crate::common::RegisterField::<5,0x1,1,0,smr::Pe,smr::Pe,Smr_SPEC,crate::common::RW>::from_register(self,0)
534    }
535
536    #[doc = "Character Length"]
537    #[inline(always)]
538    pub fn chr(
539        self,
540    ) -> crate::common::RegisterField<6, 0x1, 1, 0, smr::Chr, smr::Chr, Smr_SPEC, crate::common::RW>
541    {
542        crate::common::RegisterField::<6,0x1,1,0,smr::Chr,smr::Chr,Smr_SPEC,crate::common::RW>::from_register(self,0)
543    }
544
545    #[doc = "Communication Mode"]
546    #[inline(always)]
547    pub fn cm(
548        self,
549    ) -> crate::common::RegisterField<7, 0x1, 1, 0, smr::Cm, smr::Cm, Smr_SPEC, crate::common::RW>
550    {
551        crate::common::RegisterField::<7,0x1,1,0,smr::Cm,smr::Cm,Smr_SPEC,crate::common::RW>::from_register(self,0)
552    }
553}
554impl ::core::default::Default for Smr {
555    #[inline(always)]
556    fn default() -> Smr {
557        <crate::RegValueT<Smr_SPEC> as RegisterValue<_>>::new(0)
558    }
559}
560pub mod smr {
561
562    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
563    pub struct Cks_SPEC;
564    pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
565    impl Cks {
566        #[doc = "PCLK clock (n = 0)"]
567        pub const _00: Self = Self::new(0);
568
569        #[doc = "PCLK/4 clock (n = 1)"]
570        pub const _01: Self = Self::new(1);
571
572        #[doc = "PCLK/16 clock (n = 2)"]
573        pub const _10: Self = Self::new(2);
574
575        #[doc = "PCLK/64 clock (n = 3)"]
576        pub const _11: Self = Self::new(3);
577    }
578    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
579    pub struct Mp_SPEC;
580    pub type Mp = crate::EnumBitfieldStruct<u8, Mp_SPEC>;
581    impl Mp {
582        #[doc = "Disable multi-processor communications function"]
583        pub const _0: Self = Self::new(0);
584
585        #[doc = "Enable multi-processor communications function"]
586        pub const _1: Self = Self::new(1);
587    }
588    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
589    pub struct Stop_SPEC;
590    pub type Stop = crate::EnumBitfieldStruct<u8, Stop_SPEC>;
591    impl Stop {
592        #[doc = "1 stop bit"]
593        pub const _0: Self = Self::new(0);
594
595        #[doc = "2 stop bits"]
596        pub const _1: Self = Self::new(1);
597    }
598    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
599    pub struct Pm_SPEC;
600    pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
601    impl Pm {
602        #[doc = "Even parity"]
603        pub const _0: Self = Self::new(0);
604
605        #[doc = "Odd parity"]
606        pub const _1: Self = Self::new(1);
607    }
608    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
609    pub struct Pe_SPEC;
610    pub type Pe = crate::EnumBitfieldStruct<u8, Pe_SPEC>;
611    impl Pe {
612        #[doc = "When transmitting: Do not add parity bit When receiving: Do not check parity bit"]
613        pub const _0: Self = Self::new(0);
614
615        #[doc = "When transmitting: Add parity bit When receiving: Check parity bit"]
616        pub const _1: Self = Self::new(1);
617    }
618    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
619    pub struct Chr_SPEC;
620    pub type Chr = crate::EnumBitfieldStruct<u8, Chr_SPEC>;
621    impl Chr {
622        #[doc = "SCMR.CHR1 = 0: Transmit/receive in 9-bit data length SCMR.CHR1 = 1: Transmit/receive in 8-bit data length (initial value)"]
623        pub const _0: Self = Self::new(0);
624
625        #[doc = "SCMR.CHR1 = 0: Transmit/receive in 9-bit data length SCMR.CHR1 = 1: Transmit/receive in 7-bit data length"]
626        pub const _1: Self = Self::new(1);
627    }
628    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
629    pub struct Cm_SPEC;
630    pub type Cm = crate::EnumBitfieldStruct<u8, Cm_SPEC>;
631    impl Cm {
632        #[doc = "Asynchronous mode or simple IIC mode"]
633        pub const _0: Self = Self::new(0);
634
635        #[doc = "Clock synchronous mode or simple SPI mode"]
636        pub const _1: Self = Self::new(1);
637    }
638}
639#[doc(hidden)]
640#[derive(Copy, Clone, Eq, PartialEq)]
641pub struct SmrSmci_SPEC;
642impl crate::sealed::RegSpec for SmrSmci_SPEC {
643    type DataType = u8;
644}
645
646#[doc = "Serial Mode Register for Smart Card Interface Mode (SCMR.SMIF = 1)"]
647pub type SmrSmci = crate::RegValueT<SmrSmci_SPEC>;
648
649impl SmrSmci {
650    #[doc = "Clock Select"]
651    #[inline(always)]
652    pub fn cks(
653        self,
654    ) -> crate::common::RegisterField<
655        0,
656        0x3,
657        1,
658        0,
659        smr_smci::Cks,
660        smr_smci::Cks,
661        SmrSmci_SPEC,
662        crate::common::RW,
663    > {
664        crate::common::RegisterField::<
665            0,
666            0x3,
667            1,
668            0,
669            smr_smci::Cks,
670            smr_smci::Cks,
671            SmrSmci_SPEC,
672            crate::common::RW,
673        >::from_register(self, 0)
674    }
675
676    #[doc = "Base Clock Pulse"]
677    #[inline(always)]
678    pub fn bcp(
679        self,
680    ) -> crate::common::RegisterField<2, 0x3, 1, 0, u8, u8, SmrSmci_SPEC, crate::common::RW> {
681        crate::common::RegisterField::<2,0x3,1,0,u8,u8,SmrSmci_SPEC,crate::common::RW>::from_register(self,0)
682    }
683
684    #[doc = "Parity Mode"]
685    #[inline(always)]
686    pub fn pm(
687        self,
688    ) -> crate::common::RegisterField<
689        4,
690        0x1,
691        1,
692        0,
693        smr_smci::Pm,
694        smr_smci::Pm,
695        SmrSmci_SPEC,
696        crate::common::RW,
697    > {
698        crate::common::RegisterField::<
699            4,
700            0x1,
701            1,
702            0,
703            smr_smci::Pm,
704            smr_smci::Pm,
705            SmrSmci_SPEC,
706            crate::common::RW,
707        >::from_register(self, 0)
708    }
709
710    #[doc = "Parity Enable"]
711    #[inline(always)]
712    pub fn pe(self) -> crate::common::RegisterFieldBool<5, 1, 0, SmrSmci_SPEC, crate::common::RW> {
713        crate::common::RegisterFieldBool::<5, 1, 0, SmrSmci_SPEC, crate::common::RW>::from_register(
714            self, 0,
715        )
716    }
717
718    #[doc = "Block Transfer Mode"]
719    #[inline(always)]
720    pub fn blk(
721        self,
722    ) -> crate::common::RegisterField<
723        6,
724        0x1,
725        1,
726        0,
727        smr_smci::Blk,
728        smr_smci::Blk,
729        SmrSmci_SPEC,
730        crate::common::RW,
731    > {
732        crate::common::RegisterField::<
733            6,
734            0x1,
735            1,
736            0,
737            smr_smci::Blk,
738            smr_smci::Blk,
739            SmrSmci_SPEC,
740            crate::common::RW,
741        >::from_register(self, 0)
742    }
743
744    #[doc = "GSM Mode"]
745    #[inline(always)]
746    pub fn gm(
747        self,
748    ) -> crate::common::RegisterField<
749        7,
750        0x1,
751        1,
752        0,
753        smr_smci::Gm,
754        smr_smci::Gm,
755        SmrSmci_SPEC,
756        crate::common::RW,
757    > {
758        crate::common::RegisterField::<
759            7,
760            0x1,
761            1,
762            0,
763            smr_smci::Gm,
764            smr_smci::Gm,
765            SmrSmci_SPEC,
766            crate::common::RW,
767        >::from_register(self, 0)
768    }
769}
770impl ::core::default::Default for SmrSmci {
771    #[inline(always)]
772    fn default() -> SmrSmci {
773        <crate::RegValueT<SmrSmci_SPEC> as RegisterValue<_>>::new(0)
774    }
775}
776pub mod smr_smci {
777
778    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
779    pub struct Cks_SPEC;
780    pub type Cks = crate::EnumBitfieldStruct<u8, Cks_SPEC>;
781    impl Cks {
782        #[doc = "PCLK clock (n = 0)"]
783        pub const _00: Self = Self::new(0);
784
785        #[doc = "PCLK/4 clock (n = 1)"]
786        pub const _01: Self = Self::new(1);
787
788        #[doc = "PCLK/16 clock (n = 2)"]
789        pub const _10: Self = Self::new(2);
790
791        #[doc = "PCLK/64 clock (n = 3)"]
792        pub const _11: Self = Self::new(3);
793    }
794    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
795    pub struct Pm_SPEC;
796    pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
797    impl Pm {
798        #[doc = "Even parity"]
799        pub const _0: Self = Self::new(0);
800
801        #[doc = "Odd parity"]
802        pub const _1: Self = Self::new(1);
803    }
804    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
805    pub struct Blk_SPEC;
806    pub type Blk = crate::EnumBitfieldStruct<u8, Blk_SPEC>;
807    impl Blk {
808        #[doc = "Normal mode operation"]
809        pub const _0: Self = Self::new(0);
810
811        #[doc = "Block transfer mode operation"]
812        pub const _1: Self = Self::new(1);
813    }
814    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
815    pub struct Gm_SPEC;
816    pub type Gm = crate::EnumBitfieldStruct<u8, Gm_SPEC>;
817    impl Gm {
818        #[doc = "Normal mode operation"]
819        pub const _0: Self = Self::new(0);
820
821        #[doc = "GSM mode operation"]
822        pub const _1: Self = Self::new(1);
823    }
824}
825#[doc(hidden)]
826#[derive(Copy, Clone, Eq, PartialEq)]
827pub struct Brr_SPEC;
828impl crate::sealed::RegSpec for Brr_SPEC {
829    type DataType = u8;
830}
831
832#[doc = "Bit Rate Register"]
833pub type Brr = crate::RegValueT<Brr_SPEC>;
834
835impl NoBitfieldReg<Brr_SPEC> for Brr {}
836impl ::core::default::Default for Brr {
837    #[inline(always)]
838    fn default() -> Brr {
839        <crate::RegValueT<Brr_SPEC> as RegisterValue<_>>::new(255)
840    }
841}
842
843#[doc(hidden)]
844#[derive(Copy, Clone, Eq, PartialEq)]
845pub struct Scr_SPEC;
846impl crate::sealed::RegSpec for Scr_SPEC {
847    type DataType = u8;
848}
849
850#[doc = "Serial Control Register for Non-Smart Card Interface Mode (SCMR.SMIF = 0)"]
851pub type Scr = crate::RegValueT<Scr_SPEC>;
852
853impl Scr {
854    #[doc = "Clock Enable"]
855    #[inline(always)]
856    pub fn cke(
857        self,
858    ) -> crate::common::RegisterField<0, 0x3, 1, 0, scr::Cke, scr::Cke, Scr_SPEC, crate::common::RW>
859    {
860        crate::common::RegisterField::<0,0x3,1,0,scr::Cke,scr::Cke,Scr_SPEC,crate::common::RW>::from_register(self,0)
861    }
862
863    #[doc = "Transmit End Interrupt Enable"]
864    #[inline(always)]
865    pub fn teie(
866        self,
867    ) -> crate::common::RegisterField<2, 0x1, 1, 0, scr::Teie, scr::Teie, Scr_SPEC, crate::common::RW>
868    {
869        crate::common::RegisterField::<
870            2,
871            0x1,
872            1,
873            0,
874            scr::Teie,
875            scr::Teie,
876            Scr_SPEC,
877            crate::common::RW,
878        >::from_register(self, 0)
879    }
880
881    #[doc = "Multi-Processor Interrupt Enable"]
882    #[inline(always)]
883    pub fn mpie(
884        self,
885    ) -> crate::common::RegisterField<3, 0x1, 1, 0, scr::Mpie, scr::Mpie, Scr_SPEC, crate::common::RW>
886    {
887        crate::common::RegisterField::<
888            3,
889            0x1,
890            1,
891            0,
892            scr::Mpie,
893            scr::Mpie,
894            Scr_SPEC,
895            crate::common::RW,
896        >::from_register(self, 0)
897    }
898
899    #[doc = "Receive Enable"]
900    #[inline(always)]
901    pub fn re(
902        self,
903    ) -> crate::common::RegisterField<4, 0x1, 1, 0, scr::Re, scr::Re, Scr_SPEC, crate::common::RW>
904    {
905        crate::common::RegisterField::<4,0x1,1,0,scr::Re,scr::Re,Scr_SPEC,crate::common::RW>::from_register(self,0)
906    }
907
908    #[doc = "Transmit Enable"]
909    #[inline(always)]
910    pub fn te(
911        self,
912    ) -> crate::common::RegisterField<5, 0x1, 1, 0, scr::Te, scr::Te, Scr_SPEC, crate::common::RW>
913    {
914        crate::common::RegisterField::<5,0x1,1,0,scr::Te,scr::Te,Scr_SPEC,crate::common::RW>::from_register(self,0)
915    }
916
917    #[doc = "Receive Interrupt Enable"]
918    #[inline(always)]
919    pub fn rie(
920        self,
921    ) -> crate::common::RegisterField<6, 0x1, 1, 0, scr::Rie, scr::Rie, Scr_SPEC, crate::common::RW>
922    {
923        crate::common::RegisterField::<6,0x1,1,0,scr::Rie,scr::Rie,Scr_SPEC,crate::common::RW>::from_register(self,0)
924    }
925
926    #[doc = "Transmit Interrupt Enable"]
927    #[inline(always)]
928    pub fn tie(
929        self,
930    ) -> crate::common::RegisterField<7, 0x1, 1, 0, scr::Tie, scr::Tie, Scr_SPEC, crate::common::RW>
931    {
932        crate::common::RegisterField::<7,0x1,1,0,scr::Tie,scr::Tie,Scr_SPEC,crate::common::RW>::from_register(self,0)
933    }
934}
935impl ::core::default::Default for Scr {
936    #[inline(always)]
937    fn default() -> Scr {
938        <crate::RegValueT<Scr_SPEC> as RegisterValue<_>>::new(0)
939    }
940}
941pub mod scr {
942
943    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
944    pub struct Cke_SPEC;
945    pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
946    impl Cke {
947        #[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."]
948        pub const _00: Self = Self::new(0);
949
950        #[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."]
951        pub const _01: Self = Self::new(1);
952
953        #[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 8 times the bit rate when the SEMR.ABCS bit is 1. In clock synchronous mode, the SCKn pin functions as the clock input pin."]
954        pub const OTHERS: Self = Self::new(0);
955    }
956    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
957    pub struct Teie_SPEC;
958    pub type Teie = crate::EnumBitfieldStruct<u8, Teie_SPEC>;
959    impl Teie {
960        #[doc = "Disable SCIn_TEI interrupt requests"]
961        pub const _0: Self = Self::new(0);
962
963        #[doc = "Enable SCIn_TEI interrupt requests"]
964        pub const _1: Self = Self::new(1);
965    }
966    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
967    pub struct Mpie_SPEC;
968    pub type Mpie = crate::EnumBitfieldStruct<u8, Mpie_SPEC>;
969    impl Mpie {
970        #[doc = "Normal reception"]
971        pub const _0: Self = Self::new(0);
972
973        #[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 and the status flags SYER, PFER, and SBER in MESR are disabled. 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."]
974        pub const _1: Self = Self::new(1);
975    }
976    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
977    pub struct Re_SPEC;
978    pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
979    impl Re {
980        #[doc = "Disable serial reception"]
981        pub const _0: Self = Self::new(0);
982
983        #[doc = "Enable serial reception"]
984        pub const _1: Self = Self::new(1);
985    }
986    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
987    pub struct Te_SPEC;
988    pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
989    impl Te {
990        #[doc = "Disable serial transmission"]
991        pub const _0: Self = Self::new(0);
992
993        #[doc = "Enable serial transmission"]
994        pub const _1: Self = Self::new(1);
995    }
996    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
997    pub struct Rie_SPEC;
998    pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
999    impl Rie {
1000        #[doc = "Disable SCIn_RXI and SCIn_ERI interrupt requests"]
1001        pub const _0: Self = Self::new(0);
1002
1003        #[doc = "Enable SCIn_RXI and SCIn_ERI interrupt requests"]
1004        pub const _1: Self = Self::new(1);
1005    }
1006    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1007    pub struct Tie_SPEC;
1008    pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
1009    impl Tie {
1010        #[doc = "Disable SCIn_TXI interrupt requests"]
1011        pub const _0: Self = Self::new(0);
1012
1013        #[doc = "Enable SCIn_TXI interrupt requests"]
1014        pub const _1: Self = Self::new(1);
1015    }
1016}
1017#[doc(hidden)]
1018#[derive(Copy, Clone, Eq, PartialEq)]
1019pub struct ScrSmci_SPEC;
1020impl crate::sealed::RegSpec for ScrSmci_SPEC {
1021    type DataType = u8;
1022}
1023
1024#[doc = "Serial Control Register for Smart Card Interface Mode (SCMR.SMIF = 1)"]
1025pub type ScrSmci = crate::RegValueT<ScrSmci_SPEC>;
1026
1027impl ScrSmci {
1028    #[doc = "Clock Enable"]
1029    #[inline(always)]
1030    pub fn cke(
1031        self,
1032    ) -> crate::common::RegisterField<
1033        0,
1034        0x3,
1035        1,
1036        0,
1037        scr_smci::Cke,
1038        scr_smci::Cke,
1039        ScrSmci_SPEC,
1040        crate::common::RW,
1041    > {
1042        crate::common::RegisterField::<
1043            0,
1044            0x3,
1045            1,
1046            0,
1047            scr_smci::Cke,
1048            scr_smci::Cke,
1049            ScrSmci_SPEC,
1050            crate::common::RW,
1051        >::from_register(self, 0)
1052    }
1053
1054    #[doc = "Transmit End Interrupt Enable"]
1055    #[inline(always)]
1056    pub fn teie(
1057        self,
1058    ) -> crate::common::RegisterFieldBool<2, 1, 0, ScrSmci_SPEC, crate::common::RW> {
1059        crate::common::RegisterFieldBool::<2, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
1060            self, 0,
1061        )
1062    }
1063
1064    #[doc = "Multi-Processor Interrupt Enable"]
1065    #[inline(always)]
1066    pub fn mpie(
1067        self,
1068    ) -> crate::common::RegisterFieldBool<3, 1, 0, ScrSmci_SPEC, crate::common::RW> {
1069        crate::common::RegisterFieldBool::<3, 1, 0, ScrSmci_SPEC, crate::common::RW>::from_register(
1070            self, 0,
1071        )
1072    }
1073
1074    #[doc = "Receive Enable"]
1075    #[inline(always)]
1076    pub fn re(
1077        self,
1078    ) -> crate::common::RegisterField<
1079        4,
1080        0x1,
1081        1,
1082        0,
1083        scr_smci::Re,
1084        scr_smci::Re,
1085        ScrSmci_SPEC,
1086        crate::common::RW,
1087    > {
1088        crate::common::RegisterField::<
1089            4,
1090            0x1,
1091            1,
1092            0,
1093            scr_smci::Re,
1094            scr_smci::Re,
1095            ScrSmci_SPEC,
1096            crate::common::RW,
1097        >::from_register(self, 0)
1098    }
1099
1100    #[doc = "Transmit Enable"]
1101    #[inline(always)]
1102    pub fn te(
1103        self,
1104    ) -> crate::common::RegisterField<
1105        5,
1106        0x1,
1107        1,
1108        0,
1109        scr_smci::Te,
1110        scr_smci::Te,
1111        ScrSmci_SPEC,
1112        crate::common::RW,
1113    > {
1114        crate::common::RegisterField::<
1115            5,
1116            0x1,
1117            1,
1118            0,
1119            scr_smci::Te,
1120            scr_smci::Te,
1121            ScrSmci_SPEC,
1122            crate::common::RW,
1123        >::from_register(self, 0)
1124    }
1125
1126    #[doc = "Receive Interrupt Enable"]
1127    #[inline(always)]
1128    pub fn rie(
1129        self,
1130    ) -> crate::common::RegisterField<
1131        6,
1132        0x1,
1133        1,
1134        0,
1135        scr_smci::Rie,
1136        scr_smci::Rie,
1137        ScrSmci_SPEC,
1138        crate::common::RW,
1139    > {
1140        crate::common::RegisterField::<
1141            6,
1142            0x1,
1143            1,
1144            0,
1145            scr_smci::Rie,
1146            scr_smci::Rie,
1147            ScrSmci_SPEC,
1148            crate::common::RW,
1149        >::from_register(self, 0)
1150    }
1151
1152    #[doc = "Transmit Interrupt Enable"]
1153    #[inline(always)]
1154    pub fn tie(
1155        self,
1156    ) -> crate::common::RegisterField<
1157        7,
1158        0x1,
1159        1,
1160        0,
1161        scr_smci::Tie,
1162        scr_smci::Tie,
1163        ScrSmci_SPEC,
1164        crate::common::RW,
1165    > {
1166        crate::common::RegisterField::<
1167            7,
1168            0x1,
1169            1,
1170            0,
1171            scr_smci::Tie,
1172            scr_smci::Tie,
1173            ScrSmci_SPEC,
1174            crate::common::RW,
1175        >::from_register(self, 0)
1176    }
1177}
1178impl ::core::default::Default for ScrSmci {
1179    #[inline(always)]
1180    fn default() -> ScrSmci {
1181        <crate::RegValueT<ScrSmci_SPEC> as RegisterValue<_>>::new(0)
1182    }
1183}
1184pub mod scr_smci {
1185
1186    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1187    pub struct Cke_SPEC;
1188    pub type Cke = crate::EnumBitfieldStruct<u8, Cke_SPEC>;
1189    impl Cke {
1190        #[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"]
1191        pub const _00: Self = Self::new(0);
1192
1193        #[doc = "When SMR_SMCI.GM = 0: Output clock When SMR_SMCI.GM = 1: Output clock"]
1194        pub const _01: Self = Self::new(1);
1195
1196        #[doc = "When SMR_SMCI.GM = 0: Setting prohibited When SMR_SMCI.GM = 1: Fix output high"]
1197        pub const _10: Self = Self::new(2);
1198
1199        #[doc = "When SMR_SMCI.GM = 0: Setting prohibited When SMR_SMCI.GM = 1: Output clock"]
1200        pub const _11: Self = Self::new(3);
1201    }
1202    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1203    pub struct Re_SPEC;
1204    pub type Re = crate::EnumBitfieldStruct<u8, Re_SPEC>;
1205    impl Re {
1206        #[doc = "Disable serial reception"]
1207        pub const _0: Self = Self::new(0);
1208
1209        #[doc = "Enable serial reception"]
1210        pub const _1: Self = Self::new(1);
1211    }
1212    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1213    pub struct Te_SPEC;
1214    pub type Te = crate::EnumBitfieldStruct<u8, Te_SPEC>;
1215    impl Te {
1216        #[doc = "Disable serial transmission"]
1217        pub const _0: Self = Self::new(0);
1218
1219        #[doc = "Enable serial transmission"]
1220        pub const _1: Self = Self::new(1);
1221    }
1222    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1223    pub struct Rie_SPEC;
1224    pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
1225    impl Rie {
1226        #[doc = "Disable SCIn_RXI and SCIn_ERI interrupt requests"]
1227        pub const _0: Self = Self::new(0);
1228
1229        #[doc = "Enable SCIn_RXI and SCIn_ERI interrupt requests"]
1230        pub const _1: Self = Self::new(1);
1231    }
1232    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1233    pub struct Tie_SPEC;
1234    pub type Tie = crate::EnumBitfieldStruct<u8, Tie_SPEC>;
1235    impl Tie {
1236        #[doc = "Disable SCIn_TXI interrupt requests"]
1237        pub const _0: Self = Self::new(0);
1238
1239        #[doc = "Enable SCIn_TXI interrupt requests"]
1240        pub const _1: Self = Self::new(1);
1241    }
1242}
1243#[doc(hidden)]
1244#[derive(Copy, Clone, Eq, PartialEq)]
1245pub struct Tdr_SPEC;
1246impl crate::sealed::RegSpec for Tdr_SPEC {
1247    type DataType = u8;
1248}
1249
1250#[doc = "Transmit Data Register"]
1251pub type Tdr = crate::RegValueT<Tdr_SPEC>;
1252
1253impl NoBitfieldReg<Tdr_SPEC> for Tdr {}
1254impl ::core::default::Default for Tdr {
1255    #[inline(always)]
1256    fn default() -> Tdr {
1257        <crate::RegValueT<Tdr_SPEC> as RegisterValue<_>>::new(255)
1258    }
1259}
1260
1261#[doc(hidden)]
1262#[derive(Copy, Clone, Eq, PartialEq)]
1263pub struct Ssr_SPEC;
1264impl crate::sealed::RegSpec for Ssr_SPEC {
1265    type DataType = u8;
1266}
1267
1268#[doc = "Serial Status Register for Non-Smart Card Interface and Non-FIFO Mode (SCMR.SMIF = 0, FCR.FM = 0, and MMR.MANEN = 0)"]
1269pub type Ssr = crate::RegValueT<Ssr_SPEC>;
1270
1271impl Ssr {
1272    #[doc = "Multi-Processor Bit Transfer"]
1273    #[inline(always)]
1274    pub fn mpbt(
1275        self,
1276    ) -> crate::common::RegisterField<0, 0x1, 1, 0, ssr::Mpbt, ssr::Mpbt, Ssr_SPEC, crate::common::RW>
1277    {
1278        crate::common::RegisterField::<
1279            0,
1280            0x1,
1281            1,
1282            0,
1283            ssr::Mpbt,
1284            ssr::Mpbt,
1285            Ssr_SPEC,
1286            crate::common::RW,
1287        >::from_register(self, 0)
1288    }
1289
1290    #[doc = "Multi-Processor"]
1291    #[inline(always)]
1292    pub fn mpb(
1293        self,
1294    ) -> crate::common::RegisterField<1, 0x1, 1, 0, ssr::Mpb, ssr::Mpb, Ssr_SPEC, crate::common::R>
1295    {
1296        crate::common::RegisterField::<1,0x1,1,0,ssr::Mpb,ssr::Mpb,Ssr_SPEC,crate::common::R>::from_register(self,0)
1297    }
1298
1299    #[doc = "Transmit End Flag"]
1300    #[inline(always)]
1301    pub fn tend(
1302        self,
1303    ) -> crate::common::RegisterField<2, 0x1, 1, 0, ssr::Tend, ssr::Tend, Ssr_SPEC, crate::common::R>
1304    {
1305        crate::common::RegisterField::<2,0x1,1,0,ssr::Tend,ssr::Tend,Ssr_SPEC,crate::common::R>::from_register(self,0)
1306    }
1307
1308    #[doc = "Parity Error Flag"]
1309    #[inline(always)]
1310    pub fn per(
1311        self,
1312    ) -> crate::common::RegisterField<3, 0x1, 1, 0, ssr::Per, ssr::Per, Ssr_SPEC, crate::common::RW>
1313    {
1314        crate::common::RegisterField::<3,0x1,1,0,ssr::Per,ssr::Per,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1315    }
1316
1317    #[doc = "Framing Error Flag"]
1318    #[inline(always)]
1319    pub fn fer(
1320        self,
1321    ) -> crate::common::RegisterField<4, 0x1, 1, 0, ssr::Fer, ssr::Fer, Ssr_SPEC, crate::common::RW>
1322    {
1323        crate::common::RegisterField::<4,0x1,1,0,ssr::Fer,ssr::Fer,Ssr_SPEC,crate::common::RW>::from_register(self,0)
1324    }
1325
1326    #[doc = "Overrun Error Flag"]
1327    #[inline(always)]
1328    pub fn orer(
1329        self,
1330    ) -> crate::common::RegisterField<5, 0x1, 1, 0, ssr::Orer, ssr::Orer, Ssr_SPEC, crate::common::RW>
1331    {
1332        crate::common::RegisterField::<
1333            5,
1334            0x1,
1335            1,
1336            0,
1337            ssr::Orer,
1338            ssr::Orer,
1339            Ssr_SPEC,
1340            crate::common::RW,
1341        >::from_register(self, 0)
1342    }
1343
1344    #[doc = "Receive Data Full Flag"]
1345    #[inline(always)]
1346    pub fn rdrf(
1347        self,
1348    ) -> crate::common::RegisterField<6, 0x1, 1, 0, ssr::Rdrf, ssr::Rdrf, Ssr_SPEC, crate::common::RW>
1349    {
1350        crate::common::RegisterField::<
1351            6,
1352            0x1,
1353            1,
1354            0,
1355            ssr::Rdrf,
1356            ssr::Rdrf,
1357            Ssr_SPEC,
1358            crate::common::RW,
1359        >::from_register(self, 0)
1360    }
1361
1362    #[doc = "Transmit Data Empty Flag"]
1363    #[inline(always)]
1364    pub fn tdre(
1365        self,
1366    ) -> crate::common::RegisterField<7, 0x1, 1, 0, ssr::Tdre, ssr::Tdre, Ssr_SPEC, crate::common::RW>
1367    {
1368        crate::common::RegisterField::<
1369            7,
1370            0x1,
1371            1,
1372            0,
1373            ssr::Tdre,
1374            ssr::Tdre,
1375            Ssr_SPEC,
1376            crate::common::RW,
1377        >::from_register(self, 0)
1378    }
1379}
1380impl ::core::default::Default for Ssr {
1381    #[inline(always)]
1382    fn default() -> Ssr {
1383        <crate::RegValueT<Ssr_SPEC> as RegisterValue<_>>::new(132)
1384    }
1385}
1386pub mod ssr {
1387
1388    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1389    pub struct Mpbt_SPEC;
1390    pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
1391    impl Mpbt {
1392        #[doc = "Data transmission cycle"]
1393        pub const _0: Self = Self::new(0);
1394
1395        #[doc = "ID transmission cycle"]
1396        pub const _1: Self = Self::new(1);
1397    }
1398    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1399    pub struct Mpb_SPEC;
1400    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
1401    impl Mpb {
1402        #[doc = "Data transmission cycle"]
1403        pub const _0: Self = Self::new(0);
1404
1405        #[doc = "ID transmission cycle"]
1406        pub const _1: Self = Self::new(1);
1407    }
1408    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1409    pub struct Tend_SPEC;
1410    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1411    impl Tend {
1412        #[doc = "A character is being transmitted"]
1413        pub const _0: Self = Self::new(0);
1414
1415        #[doc = "Character transfer is complete"]
1416        pub const _1: Self = Self::new(1);
1417    }
1418    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1419    pub struct Per_SPEC;
1420    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1421    impl Per {
1422        #[doc = "No parity error occurred"]
1423        pub const _0: Self = Self::new(0);
1424
1425        #[doc = "Parity error occurred"]
1426        pub const _1: Self = Self::new(1);
1427    }
1428    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1429    pub struct Fer_SPEC;
1430    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
1431    impl Fer {
1432        #[doc = "No framing error occurred"]
1433        pub const _0: Self = Self::new(0);
1434
1435        #[doc = "Framing error occurred"]
1436        pub const _1: Self = Self::new(1);
1437    }
1438    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1439    pub struct Orer_SPEC;
1440    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1441    impl Orer {
1442        #[doc = "No overrun error occurred"]
1443        pub const _0: Self = Self::new(0);
1444
1445        #[doc = "Overrun error occurred"]
1446        pub const _1: Self = Self::new(1);
1447    }
1448    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1449    pub struct Rdrf_SPEC;
1450    pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
1451    impl Rdrf {
1452        #[doc = "No received data in RDR register"]
1453        pub const _0: Self = Self::new(0);
1454
1455        #[doc = "Received data in RDR register"]
1456        pub const _1: Self = Self::new(1);
1457    }
1458    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1459    pub struct Tdre_SPEC;
1460    pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
1461    impl Tdre {
1462        #[doc = "Transmit data in TDR register"]
1463        pub const _0: Self = Self::new(0);
1464
1465        #[doc = "No transmit data in TDR register"]
1466        pub const _1: Self = Self::new(1);
1467    }
1468}
1469#[doc(hidden)]
1470#[derive(Copy, Clone, Eq, PartialEq)]
1471pub struct SsrFifo_SPEC;
1472impl crate::sealed::RegSpec for SsrFifo_SPEC {
1473    type DataType = u8;
1474}
1475
1476#[doc = "Serial Status Register for Non-Smart Card Interface and FIFO Mode (SCMR.SMIF = 0, FCR.FM = 1, and MMR.MANEN = 0)"]
1477pub type SsrFifo = crate::RegValueT<SsrFifo_SPEC>;
1478
1479impl SsrFifo {
1480    #[doc = "Receive Data Ready Flag"]
1481    #[inline(always)]
1482    pub fn dr(
1483        self,
1484    ) -> crate::common::RegisterField<
1485        0,
1486        0x1,
1487        1,
1488        0,
1489        ssr_fifo::Dr,
1490        ssr_fifo::Dr,
1491        SsrFifo_SPEC,
1492        crate::common::RW,
1493    > {
1494        crate::common::RegisterField::<
1495            0,
1496            0x1,
1497            1,
1498            0,
1499            ssr_fifo::Dr,
1500            ssr_fifo::Dr,
1501            SsrFifo_SPEC,
1502            crate::common::RW,
1503        >::from_register(self, 0)
1504    }
1505
1506    #[doc = "Transmit End Flag"]
1507    #[inline(always)]
1508    pub fn tend(
1509        self,
1510    ) -> crate::common::RegisterField<
1511        2,
1512        0x1,
1513        1,
1514        0,
1515        ssr_fifo::Tend,
1516        ssr_fifo::Tend,
1517        SsrFifo_SPEC,
1518        crate::common::RW,
1519    > {
1520        crate::common::RegisterField::<
1521            2,
1522            0x1,
1523            1,
1524            0,
1525            ssr_fifo::Tend,
1526            ssr_fifo::Tend,
1527            SsrFifo_SPEC,
1528            crate::common::RW,
1529        >::from_register(self, 0)
1530    }
1531
1532    #[doc = "Parity Error Flag"]
1533    #[inline(always)]
1534    pub fn per(
1535        self,
1536    ) -> crate::common::RegisterField<
1537        3,
1538        0x1,
1539        1,
1540        0,
1541        ssr_fifo::Per,
1542        ssr_fifo::Per,
1543        SsrFifo_SPEC,
1544        crate::common::RW,
1545    > {
1546        crate::common::RegisterField::<
1547            3,
1548            0x1,
1549            1,
1550            0,
1551            ssr_fifo::Per,
1552            ssr_fifo::Per,
1553            SsrFifo_SPEC,
1554            crate::common::RW,
1555        >::from_register(self, 0)
1556    }
1557
1558    #[doc = "Framing Error Flag"]
1559    #[inline(always)]
1560    pub fn fer(
1561        self,
1562    ) -> crate::common::RegisterField<
1563        4,
1564        0x1,
1565        1,
1566        0,
1567        ssr_fifo::Fer,
1568        ssr_fifo::Fer,
1569        SsrFifo_SPEC,
1570        crate::common::RW,
1571    > {
1572        crate::common::RegisterField::<
1573            4,
1574            0x1,
1575            1,
1576            0,
1577            ssr_fifo::Fer,
1578            ssr_fifo::Fer,
1579            SsrFifo_SPEC,
1580            crate::common::RW,
1581        >::from_register(self, 0)
1582    }
1583
1584    #[doc = "Overrun Error Flag"]
1585    #[inline(always)]
1586    pub fn orer(
1587        self,
1588    ) -> crate::common::RegisterField<
1589        5,
1590        0x1,
1591        1,
1592        0,
1593        ssr_fifo::Orer,
1594        ssr_fifo::Orer,
1595        SsrFifo_SPEC,
1596        crate::common::RW,
1597    > {
1598        crate::common::RegisterField::<
1599            5,
1600            0x1,
1601            1,
1602            0,
1603            ssr_fifo::Orer,
1604            ssr_fifo::Orer,
1605            SsrFifo_SPEC,
1606            crate::common::RW,
1607        >::from_register(self, 0)
1608    }
1609
1610    #[doc = "Receive FIFO Data Full Flag"]
1611    #[inline(always)]
1612    pub fn rdf(
1613        self,
1614    ) -> crate::common::RegisterField<
1615        6,
1616        0x1,
1617        1,
1618        0,
1619        ssr_fifo::Rdf,
1620        ssr_fifo::Rdf,
1621        SsrFifo_SPEC,
1622        crate::common::RW,
1623    > {
1624        crate::common::RegisterField::<
1625            6,
1626            0x1,
1627            1,
1628            0,
1629            ssr_fifo::Rdf,
1630            ssr_fifo::Rdf,
1631            SsrFifo_SPEC,
1632            crate::common::RW,
1633        >::from_register(self, 0)
1634    }
1635
1636    #[doc = "Transmit FIFO Data Empty Flag"]
1637    #[inline(always)]
1638    pub fn tdfe(
1639        self,
1640    ) -> crate::common::RegisterField<
1641        7,
1642        0x1,
1643        1,
1644        0,
1645        ssr_fifo::Tdfe,
1646        ssr_fifo::Tdfe,
1647        SsrFifo_SPEC,
1648        crate::common::RW,
1649    > {
1650        crate::common::RegisterField::<
1651            7,
1652            0x1,
1653            1,
1654            0,
1655            ssr_fifo::Tdfe,
1656            ssr_fifo::Tdfe,
1657            SsrFifo_SPEC,
1658            crate::common::RW,
1659        >::from_register(self, 0)
1660    }
1661}
1662impl ::core::default::Default for SsrFifo {
1663    #[inline(always)]
1664    fn default() -> SsrFifo {
1665        <crate::RegValueT<SsrFifo_SPEC> as RegisterValue<_>>::new(128)
1666    }
1667}
1668pub mod ssr_fifo {
1669
1670    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1671    pub struct Dr_SPEC;
1672    pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
1673    impl Dr {
1674        #[doc = "Receiving is in progress, or no received data remains in FRDRHL after successfully completed reception (receive FIFO empty)"]
1675        pub const _0: Self = Self::new(0);
1676
1677        #[doc = "Next receive data is not received for a period after normal receiving is complete, when the amount of data stored in the FIFO is equal to or less than the receive triggering number"]
1678        pub const _1: Self = Self::new(1);
1679    }
1680    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1681    pub struct Tend_SPEC;
1682    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1683    impl Tend {
1684        #[doc = "A character is being transmitted"]
1685        pub const _0: Self = Self::new(0);
1686
1687        #[doc = "Character transfer is complete"]
1688        pub const _1: Self = Self::new(1);
1689    }
1690    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1691    pub struct Per_SPEC;
1692    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
1693    impl Per {
1694        #[doc = "No parity error occurred"]
1695        pub const _0: Self = Self::new(0);
1696
1697        #[doc = "Parity error occurred"]
1698        pub const _1: Self = Self::new(1);
1699    }
1700    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1701    pub struct Fer_SPEC;
1702    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
1703    impl Fer {
1704        #[doc = "No framing error occurred"]
1705        pub const _0: Self = Self::new(0);
1706
1707        #[doc = "Framing error occurred"]
1708        pub const _1: Self = Self::new(1);
1709    }
1710    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1711    pub struct Orer_SPEC;
1712    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
1713    impl Orer {
1714        #[doc = "No overrun error occurred"]
1715        pub const _0: Self = Self::new(0);
1716
1717        #[doc = "Overrun error occurred"]
1718        pub const _1: Self = Self::new(1);
1719    }
1720    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1721    pub struct Rdf_SPEC;
1722    pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
1723    impl Rdf {
1724        #[doc = "The amount of receive data written in FRDRHL is less than the specified receive triggering number"]
1725        pub const _0: Self = Self::new(0);
1726
1727        #[doc = "The amount of receive data written in FRDRHL is equal to or greater than the specified receive triggering number"]
1728        pub const _1: Self = Self::new(1);
1729    }
1730    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1731    pub struct Tdfe_SPEC;
1732    pub type Tdfe = crate::EnumBitfieldStruct<u8, Tdfe_SPEC>;
1733    impl Tdfe {
1734        #[doc = "The amount of transmit data written in FTDRHL exceeds the specified transmit triggering number"]
1735        pub const _0: Self = Self::new(0);
1736
1737        #[doc = "The amount of transmit data written in FTDRHL is equal to or less than the specified transmit triggering number"]
1738        pub const _1: Self = Self::new(1);
1739    }
1740}
1741#[doc(hidden)]
1742#[derive(Copy, Clone, Eq, PartialEq)]
1743pub struct SsrManc_SPEC;
1744impl crate::sealed::RegSpec for SsrManc_SPEC {
1745    type DataType = u8;
1746}
1747
1748#[doc = "Serial Status Register for Manchester Mode (SCMR.SMIF = 0, and MMR.MANEN = 1)"]
1749pub type SsrManc = crate::RegValueT<SsrManc_SPEC>;
1750
1751impl SsrManc {
1752    #[doc = "Manchester Error Flag"]
1753    #[inline(always)]
1754    pub fn mer(
1755        self,
1756    ) -> crate::common::RegisterField<
1757        0,
1758        0x1,
1759        1,
1760        0,
1761        ssr_manc::Mer,
1762        ssr_manc::Mer,
1763        SsrManc_SPEC,
1764        crate::common::RW,
1765    > {
1766        crate::common::RegisterField::<
1767            0,
1768            0x1,
1769            1,
1770            0,
1771            ssr_manc::Mer,
1772            ssr_manc::Mer,
1773            SsrManc_SPEC,
1774            crate::common::RW,
1775        >::from_register(self, 0)
1776    }
1777
1778    #[doc = "Multi-Processor"]
1779    #[inline(always)]
1780    pub fn mpb(
1781        self,
1782    ) -> crate::common::RegisterField<
1783        1,
1784        0x1,
1785        1,
1786        0,
1787        ssr_manc::Mpb,
1788        ssr_manc::Mpb,
1789        SsrManc_SPEC,
1790        crate::common::R,
1791    > {
1792        crate::common::RegisterField::<
1793            1,
1794            0x1,
1795            1,
1796            0,
1797            ssr_manc::Mpb,
1798            ssr_manc::Mpb,
1799            SsrManc_SPEC,
1800            crate::common::R,
1801        >::from_register(self, 0)
1802    }
1803
1804    #[doc = "Transmit End Flag"]
1805    #[inline(always)]
1806    pub fn tend(
1807        self,
1808    ) -> crate::common::RegisterField<
1809        2,
1810        0x1,
1811        1,
1812        0,
1813        ssr_manc::Tend,
1814        ssr_manc::Tend,
1815        SsrManc_SPEC,
1816        crate::common::R,
1817    > {
1818        crate::common::RegisterField::<
1819            2,
1820            0x1,
1821            1,
1822            0,
1823            ssr_manc::Tend,
1824            ssr_manc::Tend,
1825            SsrManc_SPEC,
1826            crate::common::R,
1827        >::from_register(self, 0)
1828    }
1829
1830    #[doc = "Parity Error Flag"]
1831    #[inline(always)]
1832    pub fn per(
1833        self,
1834    ) -> crate::common::RegisterField<
1835        3,
1836        0x1,
1837        1,
1838        0,
1839        ssr_manc::Per,
1840        ssr_manc::Per,
1841        SsrManc_SPEC,
1842        crate::common::RW,
1843    > {
1844        crate::common::RegisterField::<
1845            3,
1846            0x1,
1847            1,
1848            0,
1849            ssr_manc::Per,
1850            ssr_manc::Per,
1851            SsrManc_SPEC,
1852            crate::common::RW,
1853        >::from_register(self, 0)
1854    }
1855
1856    #[doc = "Framing Error Flag"]
1857    #[inline(always)]
1858    pub fn fer(
1859        self,
1860    ) -> crate::common::RegisterField<
1861        4,
1862        0x1,
1863        1,
1864        0,
1865        ssr_manc::Fer,
1866        ssr_manc::Fer,
1867        SsrManc_SPEC,
1868        crate::common::RW,
1869    > {
1870        crate::common::RegisterField::<
1871            4,
1872            0x1,
1873            1,
1874            0,
1875            ssr_manc::Fer,
1876            ssr_manc::Fer,
1877            SsrManc_SPEC,
1878            crate::common::RW,
1879        >::from_register(self, 0)
1880    }
1881
1882    #[doc = "Overrun Error Flag"]
1883    #[inline(always)]
1884    pub fn orer(
1885        self,
1886    ) -> crate::common::RegisterField<
1887        5,
1888        0x1,
1889        1,
1890        0,
1891        ssr_manc::Orer,
1892        ssr_manc::Orer,
1893        SsrManc_SPEC,
1894        crate::common::RW,
1895    > {
1896        crate::common::RegisterField::<
1897            5,
1898            0x1,
1899            1,
1900            0,
1901            ssr_manc::Orer,
1902            ssr_manc::Orer,
1903            SsrManc_SPEC,
1904            crate::common::RW,
1905        >::from_register(self, 0)
1906    }
1907
1908    #[doc = "Receive Data Full Flag"]
1909    #[inline(always)]
1910    pub fn rdrf(
1911        self,
1912    ) -> crate::common::RegisterField<
1913        6,
1914        0x1,
1915        1,
1916        0,
1917        ssr_manc::Rdrf,
1918        ssr_manc::Rdrf,
1919        SsrManc_SPEC,
1920        crate::common::RW,
1921    > {
1922        crate::common::RegisterField::<
1923            6,
1924            0x1,
1925            1,
1926            0,
1927            ssr_manc::Rdrf,
1928            ssr_manc::Rdrf,
1929            SsrManc_SPEC,
1930            crate::common::RW,
1931        >::from_register(self, 0)
1932    }
1933
1934    #[doc = "Transmit Data Empty Flag"]
1935    #[inline(always)]
1936    pub fn tdre(
1937        self,
1938    ) -> crate::common::RegisterField<
1939        7,
1940        0x1,
1941        1,
1942        0,
1943        ssr_manc::Tdre,
1944        ssr_manc::Tdre,
1945        SsrManc_SPEC,
1946        crate::common::RW,
1947    > {
1948        crate::common::RegisterField::<
1949            7,
1950            0x1,
1951            1,
1952            0,
1953            ssr_manc::Tdre,
1954            ssr_manc::Tdre,
1955            SsrManc_SPEC,
1956            crate::common::RW,
1957        >::from_register(self, 0)
1958    }
1959}
1960impl ::core::default::Default for SsrManc {
1961    #[inline(always)]
1962    fn default() -> SsrManc {
1963        <crate::RegValueT<SsrManc_SPEC> as RegisterValue<_>>::new(132)
1964    }
1965}
1966pub mod ssr_manc {
1967
1968    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1969    pub struct Mer_SPEC;
1970    pub type Mer = crate::EnumBitfieldStruct<u8, Mer_SPEC>;
1971    impl Mer {
1972        #[doc = "No Manchester error occurred"]
1973        pub const _0: Self = Self::new(0);
1974
1975        #[doc = "Manchester error has occurred"]
1976        pub const _1: Self = Self::new(1);
1977    }
1978    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1979    pub struct Mpb_SPEC;
1980    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
1981    impl Mpb {
1982        #[doc = "Data transmission cycles"]
1983        pub const _0: Self = Self::new(0);
1984
1985        #[doc = "ID transmission cycles"]
1986        pub const _1: Self = Self::new(1);
1987    }
1988    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1989    pub struct Tend_SPEC;
1990    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
1991    impl Tend {
1992        #[doc = "A character is being transmitted"]
1993        pub const _0: Self = Self::new(0);
1994
1995        #[doc = "Character transfer has been completed."]
1996        pub const _1: Self = Self::new(1);
1997    }
1998    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1999    pub struct Per_SPEC;
2000    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
2001    impl Per {
2002        #[doc = "No parity error occurred"]
2003        pub const _0: Self = Self::new(0);
2004
2005        #[doc = "A parity error has occurred"]
2006        pub const _1: Self = Self::new(1);
2007    }
2008    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2009    pub struct Fer_SPEC;
2010    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
2011    impl Fer {
2012        #[doc = "No framing error occurred"]
2013        pub const _0: Self = Self::new(0);
2014
2015        #[doc = "A framing error has occurred"]
2016        pub const _1: Self = Self::new(1);
2017    }
2018    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2019    pub struct Orer_SPEC;
2020    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
2021    impl Orer {
2022        #[doc = "No overrun error occurred"]
2023        pub const _0: Self = Self::new(0);
2024
2025        #[doc = "An overrun error has occurred"]
2026        pub const _1: Self = Self::new(1);
2027    }
2028    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2029    pub struct Rdrf_SPEC;
2030    pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
2031    impl Rdrf {
2032        #[doc = "No received data is in RDR register"]
2033        pub const _0: Self = Self::new(0);
2034
2035        #[doc = "Received data is in RDR register"]
2036        pub const _1: Self = Self::new(1);
2037    }
2038    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2039    pub struct Tdre_SPEC;
2040    pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
2041    impl Tdre {
2042        #[doc = "Transmit data is in TDR register"]
2043        pub const _0: Self = Self::new(0);
2044
2045        #[doc = "No transmit data is in TDR register"]
2046        pub const _1: Self = Self::new(1);
2047    }
2048}
2049#[doc(hidden)]
2050#[derive(Copy, Clone, Eq, PartialEq)]
2051pub struct SsrSmci_SPEC;
2052impl crate::sealed::RegSpec for SsrSmci_SPEC {
2053    type DataType = u8;
2054}
2055
2056#[doc = "Serial Status Register for Smart Card Interface Mode (SCMR.SMIF = 1, and MMR.MANEN = 0)"]
2057pub type SsrSmci = crate::RegValueT<SsrSmci_SPEC>;
2058
2059impl SsrSmci {
2060    #[doc = "Multi-Processor Bit Transfer"]
2061    #[inline(always)]
2062    pub fn mpbt(
2063        self,
2064    ) -> crate::common::RegisterFieldBool<0, 1, 0, SsrSmci_SPEC, crate::common::RW> {
2065        crate::common::RegisterFieldBool::<0, 1, 0, SsrSmci_SPEC, crate::common::RW>::from_register(
2066            self, 0,
2067        )
2068    }
2069
2070    #[doc = "Multi-Processor"]
2071    #[inline(always)]
2072    pub fn mpb(self) -> crate::common::RegisterFieldBool<1, 1, 0, SsrSmci_SPEC, crate::common::R> {
2073        crate::common::RegisterFieldBool::<1, 1, 0, SsrSmci_SPEC, crate::common::R>::from_register(
2074            self, 0,
2075        )
2076    }
2077
2078    #[doc = "Transmit End Flag"]
2079    #[inline(always)]
2080    pub fn tend(
2081        self,
2082    ) -> crate::common::RegisterField<
2083        2,
2084        0x1,
2085        1,
2086        0,
2087        ssr_smci::Tend,
2088        ssr_smci::Tend,
2089        SsrSmci_SPEC,
2090        crate::common::R,
2091    > {
2092        crate::common::RegisterField::<
2093            2,
2094            0x1,
2095            1,
2096            0,
2097            ssr_smci::Tend,
2098            ssr_smci::Tend,
2099            SsrSmci_SPEC,
2100            crate::common::R,
2101        >::from_register(self, 0)
2102    }
2103
2104    #[doc = "Parity Error Flag"]
2105    #[inline(always)]
2106    pub fn per(
2107        self,
2108    ) -> crate::common::RegisterField<
2109        3,
2110        0x1,
2111        1,
2112        0,
2113        ssr_smci::Per,
2114        ssr_smci::Per,
2115        SsrSmci_SPEC,
2116        crate::common::RW,
2117    > {
2118        crate::common::RegisterField::<
2119            3,
2120            0x1,
2121            1,
2122            0,
2123            ssr_smci::Per,
2124            ssr_smci::Per,
2125            SsrSmci_SPEC,
2126            crate::common::RW,
2127        >::from_register(self, 0)
2128    }
2129
2130    #[doc = "Error Signal Status Flag"]
2131    #[inline(always)]
2132    pub fn ers(
2133        self,
2134    ) -> crate::common::RegisterField<
2135        4,
2136        0x1,
2137        1,
2138        0,
2139        ssr_smci::Ers,
2140        ssr_smci::Ers,
2141        SsrSmci_SPEC,
2142        crate::common::RW,
2143    > {
2144        crate::common::RegisterField::<
2145            4,
2146            0x1,
2147            1,
2148            0,
2149            ssr_smci::Ers,
2150            ssr_smci::Ers,
2151            SsrSmci_SPEC,
2152            crate::common::RW,
2153        >::from_register(self, 0)
2154    }
2155
2156    #[doc = "Overrun Error Flag"]
2157    #[inline(always)]
2158    pub fn orer(
2159        self,
2160    ) -> crate::common::RegisterField<
2161        5,
2162        0x1,
2163        1,
2164        0,
2165        ssr_smci::Orer,
2166        ssr_smci::Orer,
2167        SsrSmci_SPEC,
2168        crate::common::RW,
2169    > {
2170        crate::common::RegisterField::<
2171            5,
2172            0x1,
2173            1,
2174            0,
2175            ssr_smci::Orer,
2176            ssr_smci::Orer,
2177            SsrSmci_SPEC,
2178            crate::common::RW,
2179        >::from_register(self, 0)
2180    }
2181
2182    #[doc = "Receive Data Full Flag"]
2183    #[inline(always)]
2184    pub fn rdrf(
2185        self,
2186    ) -> crate::common::RegisterField<
2187        6,
2188        0x1,
2189        1,
2190        0,
2191        ssr_smci::Rdrf,
2192        ssr_smci::Rdrf,
2193        SsrSmci_SPEC,
2194        crate::common::RW,
2195    > {
2196        crate::common::RegisterField::<
2197            6,
2198            0x1,
2199            1,
2200            0,
2201            ssr_smci::Rdrf,
2202            ssr_smci::Rdrf,
2203            SsrSmci_SPEC,
2204            crate::common::RW,
2205        >::from_register(self, 0)
2206    }
2207
2208    #[doc = "Transmit Data Empty Flag"]
2209    #[inline(always)]
2210    pub fn tdre(
2211        self,
2212    ) -> crate::common::RegisterField<
2213        7,
2214        0x1,
2215        1,
2216        0,
2217        ssr_smci::Tdre,
2218        ssr_smci::Tdre,
2219        SsrSmci_SPEC,
2220        crate::common::RW,
2221    > {
2222        crate::common::RegisterField::<
2223            7,
2224            0x1,
2225            1,
2226            0,
2227            ssr_smci::Tdre,
2228            ssr_smci::Tdre,
2229            SsrSmci_SPEC,
2230            crate::common::RW,
2231        >::from_register(self, 0)
2232    }
2233}
2234impl ::core::default::Default for SsrSmci {
2235    #[inline(always)]
2236    fn default() -> SsrSmci {
2237        <crate::RegValueT<SsrSmci_SPEC> as RegisterValue<_>>::new(132)
2238    }
2239}
2240pub mod ssr_smci {
2241
2242    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2243    pub struct Tend_SPEC;
2244    pub type Tend = crate::EnumBitfieldStruct<u8, Tend_SPEC>;
2245    impl Tend {
2246        #[doc = "A character is being transmitted"]
2247        pub const _0: Self = Self::new(0);
2248
2249        #[doc = "Character transfer is complete"]
2250        pub const _1: Self = Self::new(1);
2251    }
2252    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2253    pub struct Per_SPEC;
2254    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
2255    impl Per {
2256        #[doc = "No parity error occurred"]
2257        pub const _0: Self = Self::new(0);
2258
2259        #[doc = "Parity error occurred"]
2260        pub const _1: Self = Self::new(1);
2261    }
2262    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2263    pub struct Ers_SPEC;
2264    pub type Ers = crate::EnumBitfieldStruct<u8, Ers_SPEC>;
2265    impl Ers {
2266        #[doc = "No low error signal response"]
2267        pub const _0: Self = Self::new(0);
2268
2269        #[doc = "Low error signal response occurred"]
2270        pub const _1: Self = Self::new(1);
2271    }
2272    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2273    pub struct Orer_SPEC;
2274    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
2275    impl Orer {
2276        #[doc = "No overrun error occurred"]
2277        pub const _0: Self = Self::new(0);
2278
2279        #[doc = "Overrun error occurred"]
2280        pub const _1: Self = Self::new(1);
2281    }
2282    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2283    pub struct Rdrf_SPEC;
2284    pub type Rdrf = crate::EnumBitfieldStruct<u8, Rdrf_SPEC>;
2285    impl Rdrf {
2286        #[doc = "No received data in RDR register"]
2287        pub const _0: Self = Self::new(0);
2288
2289        #[doc = "Received data in RDR register"]
2290        pub const _1: Self = Self::new(1);
2291    }
2292    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2293    pub struct Tdre_SPEC;
2294    pub type Tdre = crate::EnumBitfieldStruct<u8, Tdre_SPEC>;
2295    impl Tdre {
2296        #[doc = "Transmit data in TDR register"]
2297        pub const _0: Self = Self::new(0);
2298
2299        #[doc = "No transmit data in TDR register"]
2300        pub const _1: Self = Self::new(1);
2301    }
2302}
2303#[doc(hidden)]
2304#[derive(Copy, Clone, Eq, PartialEq)]
2305pub struct Rdr_SPEC;
2306impl crate::sealed::RegSpec for Rdr_SPEC {
2307    type DataType = u8;
2308}
2309
2310#[doc = "Receive Data Register"]
2311pub type Rdr = crate::RegValueT<Rdr_SPEC>;
2312
2313impl NoBitfieldReg<Rdr_SPEC> for Rdr {}
2314impl ::core::default::Default for Rdr {
2315    #[inline(always)]
2316    fn default() -> Rdr {
2317        <crate::RegValueT<Rdr_SPEC> as RegisterValue<_>>::new(0)
2318    }
2319}
2320
2321#[doc(hidden)]
2322#[derive(Copy, Clone, Eq, PartialEq)]
2323pub struct Scmr_SPEC;
2324impl crate::sealed::RegSpec for Scmr_SPEC {
2325    type DataType = u8;
2326}
2327
2328#[doc = "Smart Card Mode Register"]
2329pub type Scmr = crate::RegValueT<Scmr_SPEC>;
2330
2331impl Scmr {
2332    #[doc = "Smart Card Interface Mode Select"]
2333    #[inline(always)]
2334    pub fn smif(
2335        self,
2336    ) -> crate::common::RegisterField<
2337        0,
2338        0x1,
2339        1,
2340        0,
2341        scmr::Smif,
2342        scmr::Smif,
2343        Scmr_SPEC,
2344        crate::common::RW,
2345    > {
2346        crate::common::RegisterField::<
2347            0,
2348            0x1,
2349            1,
2350            0,
2351            scmr::Smif,
2352            scmr::Smif,
2353            Scmr_SPEC,
2354            crate::common::RW,
2355        >::from_register(self, 0)
2356    }
2357
2358    #[doc = "Transmitted/Received Data Invert"]
2359    #[inline(always)]
2360    pub fn sinv(
2361        self,
2362    ) -> crate::common::RegisterField<
2363        2,
2364        0x1,
2365        1,
2366        0,
2367        scmr::Sinv,
2368        scmr::Sinv,
2369        Scmr_SPEC,
2370        crate::common::RW,
2371    > {
2372        crate::common::RegisterField::<
2373            2,
2374            0x1,
2375            1,
2376            0,
2377            scmr::Sinv,
2378            scmr::Sinv,
2379            Scmr_SPEC,
2380            crate::common::RW,
2381        >::from_register(self, 0)
2382    }
2383
2384    #[doc = "Transmitted/Received Data Transfer Direction"]
2385    #[inline(always)]
2386    pub fn sdir(
2387        self,
2388    ) -> crate::common::RegisterField<
2389        3,
2390        0x1,
2391        1,
2392        0,
2393        scmr::Sdir,
2394        scmr::Sdir,
2395        Scmr_SPEC,
2396        crate::common::RW,
2397    > {
2398        crate::common::RegisterField::<
2399            3,
2400            0x1,
2401            1,
2402            0,
2403            scmr::Sdir,
2404            scmr::Sdir,
2405            Scmr_SPEC,
2406            crate::common::RW,
2407        >::from_register(self, 0)
2408    }
2409
2410    #[doc = "Character Length 1"]
2411    #[inline(always)]
2412    pub fn chr1(
2413        self,
2414    ) -> crate::common::RegisterField<
2415        4,
2416        0x1,
2417        1,
2418        0,
2419        scmr::Chr1,
2420        scmr::Chr1,
2421        Scmr_SPEC,
2422        crate::common::RW,
2423    > {
2424        crate::common::RegisterField::<
2425            4,
2426            0x1,
2427            1,
2428            0,
2429            scmr::Chr1,
2430            scmr::Chr1,
2431            Scmr_SPEC,
2432            crate::common::RW,
2433        >::from_register(self, 0)
2434    }
2435
2436    #[doc = "Base Clock Pulse 2"]
2437    #[inline(always)]
2438    pub fn bcp2(self) -> crate::common::RegisterFieldBool<7, 1, 0, Scmr_SPEC, crate::common::RW> {
2439        crate::common::RegisterFieldBool::<7, 1, 0, Scmr_SPEC, crate::common::RW>::from_register(
2440            self, 0,
2441        )
2442    }
2443}
2444impl ::core::default::Default for Scmr {
2445    #[inline(always)]
2446    fn default() -> Scmr {
2447        <crate::RegValueT<Scmr_SPEC> as RegisterValue<_>>::new(242)
2448    }
2449}
2450pub mod scmr {
2451
2452    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2453    pub struct Smif_SPEC;
2454    pub type Smif = crate::EnumBitfieldStruct<u8, Smif_SPEC>;
2455    impl Smif {
2456        #[doc = "Non-smart card interface mode (asynchronous mode, clock synchronous mode, simple SPI mode, or simple IIC mode)"]
2457        pub const _0: Self = Self::new(0);
2458
2459        #[doc = "Smart card interface mode"]
2460        pub const _1: Self = Self::new(1);
2461    }
2462    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2463    pub struct Sinv_SPEC;
2464    pub type Sinv = crate::EnumBitfieldStruct<u8, Sinv_SPEC>;
2465    impl Sinv {
2466        #[doc = "TDR contents are transmitted as they are. Received data is stored as received in the RDR register."]
2467        pub const _0: Self = Self::new(0);
2468
2469        #[doc = "TDR register contents are inverted before transmission. Receive data is stored in inverted form in the RDR register."]
2470        pub const _1: Self = Self::new(1);
2471    }
2472    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2473    pub struct Sdir_SPEC;
2474    pub type Sdir = crate::EnumBitfieldStruct<u8, Sdir_SPEC>;
2475    impl Sdir {
2476        #[doc = "Transfer LSB-first"]
2477        pub const _0: Self = Self::new(0);
2478
2479        #[doc = "Transfer MSB-first"]
2480        pub const _1: Self = Self::new(1);
2481    }
2482    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2483    pub struct Chr1_SPEC;
2484    pub type Chr1 = crate::EnumBitfieldStruct<u8, Chr1_SPEC>;
2485    impl Chr1 {
2486        #[doc = "SMR.CHR = 0: Transmit/receive in 9-bit data length SMR.CHR = 1: Transmit/receive in 9-bit data length"]
2487        pub const _0: Self = Self::new(0);
2488
2489        #[doc = "SMR.CHR = 0: Transmit/receive in 8-bit data length (initial value) SMR.CHR = 1: Transmit/receive in 7-bit data length"]
2490        pub const _1: Self = Self::new(1);
2491    }
2492}
2493#[doc(hidden)]
2494#[derive(Copy, Clone, Eq, PartialEq)]
2495pub struct Semr_SPEC;
2496impl crate::sealed::RegSpec for Semr_SPEC {
2497    type DataType = u8;
2498}
2499
2500#[doc = "Serial Extended Mode Register"]
2501pub type Semr = crate::RegValueT<Semr_SPEC>;
2502
2503impl Semr {
2504    #[doc = "Preamble function Disable"]
2505    #[inline(always)]
2506    pub fn padis(
2507        self,
2508    ) -> crate::common::RegisterField<
2509        1,
2510        0x1,
2511        1,
2512        0,
2513        semr::Padis,
2514        semr::Padis,
2515        Semr_SPEC,
2516        crate::common::RW,
2517    > {
2518        crate::common::RegisterField::<
2519            1,
2520            0x1,
2521            1,
2522            0,
2523            semr::Padis,
2524            semr::Padis,
2525            Semr_SPEC,
2526            crate::common::RW,
2527        >::from_register(self, 0)
2528    }
2529
2530    #[doc = "Bit Rate Modulation Enable"]
2531    #[inline(always)]
2532    pub fn brme(
2533        self,
2534    ) -> crate::common::RegisterField<
2535        2,
2536        0x1,
2537        1,
2538        0,
2539        semr::Brme,
2540        semr::Brme,
2541        Semr_SPEC,
2542        crate::common::RW,
2543    > {
2544        crate::common::RegisterField::<
2545            2,
2546            0x1,
2547            1,
2548            0,
2549            semr::Brme,
2550            semr::Brme,
2551            Semr_SPEC,
2552            crate::common::RW,
2553        >::from_register(self, 0)
2554    }
2555
2556    #[doc = "Asynchronous Mode Extended Base Clock Select 1"]
2557    #[inline(always)]
2558    pub fn abcse(
2559        self,
2560    ) -> crate::common::RegisterField<
2561        3,
2562        0x1,
2563        1,
2564        0,
2565        semr::Abcse,
2566        semr::Abcse,
2567        Semr_SPEC,
2568        crate::common::RW,
2569    > {
2570        crate::common::RegisterField::<
2571            3,
2572            0x1,
2573            1,
2574            0,
2575            semr::Abcse,
2576            semr::Abcse,
2577            Semr_SPEC,
2578            crate::common::RW,
2579        >::from_register(self, 0)
2580    }
2581
2582    #[doc = "Asynchronous Mode Base Clock Select"]
2583    #[inline(always)]
2584    pub fn abcs(
2585        self,
2586    ) -> crate::common::RegisterField<
2587        4,
2588        0x1,
2589        1,
2590        0,
2591        semr::Abcs,
2592        semr::Abcs,
2593        Semr_SPEC,
2594        crate::common::RW,
2595    > {
2596        crate::common::RegisterField::<
2597            4,
2598            0x1,
2599            1,
2600            0,
2601            semr::Abcs,
2602            semr::Abcs,
2603            Semr_SPEC,
2604            crate::common::RW,
2605        >::from_register(self, 0)
2606    }
2607
2608    #[doc = "Digital Noise Filter Function Enable"]
2609    #[inline(always)]
2610    pub fn nfen(
2611        self,
2612    ) -> crate::common::RegisterField<
2613        5,
2614        0x1,
2615        1,
2616        0,
2617        semr::Nfen,
2618        semr::Nfen,
2619        Semr_SPEC,
2620        crate::common::RW,
2621    > {
2622        crate::common::RegisterField::<
2623            5,
2624            0x1,
2625            1,
2626            0,
2627            semr::Nfen,
2628            semr::Nfen,
2629            Semr_SPEC,
2630            crate::common::RW,
2631        >::from_register(self, 0)
2632    }
2633
2634    #[doc = "Baud Rate Generator Double-Speed Mode Select"]
2635    #[inline(always)]
2636    pub fn bgdm(
2637        self,
2638    ) -> crate::common::RegisterField<
2639        6,
2640        0x1,
2641        1,
2642        0,
2643        semr::Bgdm,
2644        semr::Bgdm,
2645        Semr_SPEC,
2646        crate::common::RW,
2647    > {
2648        crate::common::RegisterField::<
2649            6,
2650            0x1,
2651            1,
2652            0,
2653            semr::Bgdm,
2654            semr::Bgdm,
2655            Semr_SPEC,
2656            crate::common::RW,
2657        >::from_register(self, 0)
2658    }
2659
2660    #[doc = "Asynchronous Start Bit Edge Detection Select"]
2661    #[inline(always)]
2662    pub fn rxdesel(
2663        self,
2664    ) -> crate::common::RegisterField<
2665        7,
2666        0x1,
2667        1,
2668        0,
2669        semr::Rxdesel,
2670        semr::Rxdesel,
2671        Semr_SPEC,
2672        crate::common::RW,
2673    > {
2674        crate::common::RegisterField::<
2675            7,
2676            0x1,
2677            1,
2678            0,
2679            semr::Rxdesel,
2680            semr::Rxdesel,
2681            Semr_SPEC,
2682            crate::common::RW,
2683        >::from_register(self, 0)
2684    }
2685}
2686impl ::core::default::Default for Semr {
2687    #[inline(always)]
2688    fn default() -> Semr {
2689        <crate::RegValueT<Semr_SPEC> as RegisterValue<_>>::new(0)
2690    }
2691}
2692pub mod semr {
2693
2694    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2695    pub struct Padis_SPEC;
2696    pub type Padis = crate::EnumBitfieldStruct<u8, Padis_SPEC>;
2697    impl Padis {
2698        #[doc = "Preamble output function is enabled"]
2699        pub const _0: Self = Self::new(0);
2700
2701        #[doc = "Preamble output function is disabled"]
2702        pub const _1: Self = Self::new(1);
2703    }
2704    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2705    pub struct Brme_SPEC;
2706    pub type Brme = crate::EnumBitfieldStruct<u8, Brme_SPEC>;
2707    impl Brme {
2708        #[doc = "Disable bit rate modulation function"]
2709        pub const _0: Self = Self::new(0);
2710
2711        #[doc = "Enable bit rate modulation function"]
2712        pub const _1: Self = Self::new(1);
2713    }
2714    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2715    pub struct Abcse_SPEC;
2716    pub type Abcse = crate::EnumBitfieldStruct<u8, Abcse_SPEC>;
2717    impl Abcse {
2718        #[doc = "Clock cycles for 1-bit period determined by combination of the BGDM and ABCS bits in the SEMR register"]
2719        pub const _0: Self = Self::new(0);
2720
2721        #[doc = "Baud rate is 6 base clock cycles for 1-bit period"]
2722        pub const _1: Self = Self::new(1);
2723    }
2724    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2725    pub struct Abcs_SPEC;
2726    pub type Abcs = crate::EnumBitfieldStruct<u8, Abcs_SPEC>;
2727    impl Abcs {
2728        #[doc = "Select 16 base clock cycles for 1-bit period"]
2729        pub const _0: Self = Self::new(0);
2730
2731        #[doc = "Select 8 base clock cycles for 1-bit period"]
2732        pub const _1: Self = Self::new(1);
2733    }
2734    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2735    pub struct Nfen_SPEC;
2736    pub type Nfen = crate::EnumBitfieldStruct<u8, Nfen_SPEC>;
2737    impl Nfen {
2738        #[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"]
2739        pub const _0: Self = Self::new(0);
2740
2741        #[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"]
2742        pub const _1: Self = Self::new(1);
2743    }
2744    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2745    pub struct Bgdm_SPEC;
2746    pub type Bgdm = crate::EnumBitfieldStruct<u8, Bgdm_SPEC>;
2747    impl Bgdm {
2748        #[doc = "Output clock from baud rate generator with normal frequency"]
2749        pub const _0: Self = Self::new(0);
2750
2751        #[doc = "Output clock from baud rate generator with doubled frequency"]
2752        pub const _1: Self = Self::new(1);
2753    }
2754    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2755    pub struct Rxdesel_SPEC;
2756    pub type Rxdesel = crate::EnumBitfieldStruct<u8, Rxdesel_SPEC>;
2757    impl Rxdesel {
2758        #[doc = "Detect low level on RXDn pin as start bit"]
2759        pub const _0: Self = Self::new(0);
2760
2761        #[doc = "Detect falling edge of RXDn pin as start bit"]
2762        pub const _1: Self = Self::new(1);
2763    }
2764}
2765#[doc(hidden)]
2766#[derive(Copy, Clone, Eq, PartialEq)]
2767pub struct Snfr_SPEC;
2768impl crate::sealed::RegSpec for Snfr_SPEC {
2769    type DataType = u8;
2770}
2771
2772#[doc = "Noise Filter Setting Register"]
2773pub type Snfr = crate::RegValueT<Snfr_SPEC>;
2774
2775impl Snfr {
2776    #[doc = "Noise Filter Clock Select"]
2777    #[inline(always)]
2778    pub fn nfcs(
2779        self,
2780    ) -> crate::common::RegisterField<
2781        0,
2782        0x7,
2783        1,
2784        0,
2785        snfr::Nfcs,
2786        snfr::Nfcs,
2787        Snfr_SPEC,
2788        crate::common::RW,
2789    > {
2790        crate::common::RegisterField::<
2791            0,
2792            0x7,
2793            1,
2794            0,
2795            snfr::Nfcs,
2796            snfr::Nfcs,
2797            Snfr_SPEC,
2798            crate::common::RW,
2799        >::from_register(self, 0)
2800    }
2801}
2802impl ::core::default::Default for Snfr {
2803    #[inline(always)]
2804    fn default() -> Snfr {
2805        <crate::RegValueT<Snfr_SPEC> as RegisterValue<_>>::new(0)
2806    }
2807}
2808pub mod snfr {
2809
2810    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2811    pub struct Nfcs_SPEC;
2812    pub type Nfcs = crate::EnumBitfieldStruct<u8, Nfcs_SPEC>;
2813    impl Nfcs {
2814        #[doc = "In asynchronous mode: Use clock signal divided by 1 with noise filter In simple I2C mode: Setting prohibited"]
2815        pub const _000: Self = Self::new(0);
2816
2817        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 1 with noise filter"]
2818        pub const _001: Self = Self::new(1);
2819
2820        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 2 with noise filter"]
2821        pub const _010: Self = Self::new(2);
2822
2823        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 4 with noise filter"]
2824        pub const _011: Self = Self::new(3);
2825
2826        #[doc = "In asynchronous mode: Setting prohibited In simple I2C mode: Use clock signal divided by 8 with noise filter"]
2827        pub const _100: Self = Self::new(4);
2828
2829        #[doc = "Setting prohibited"]
2830        pub const OTHERS: Self = Self::new(0);
2831    }
2832}
2833#[doc(hidden)]
2834#[derive(Copy, Clone, Eq, PartialEq)]
2835pub struct Simr1_SPEC;
2836impl crate::sealed::RegSpec for Simr1_SPEC {
2837    type DataType = u8;
2838}
2839
2840#[doc = "IIC Mode Register 1"]
2841pub type Simr1 = crate::RegValueT<Simr1_SPEC>;
2842
2843impl Simr1 {
2844    #[doc = "Simple IIC Mode Select"]
2845    #[inline(always)]
2846    pub fn iicm(
2847        self,
2848    ) -> crate::common::RegisterField<
2849        0,
2850        0x1,
2851        1,
2852        0,
2853        simr1::Iicm,
2854        simr1::Iicm,
2855        Simr1_SPEC,
2856        crate::common::RW,
2857    > {
2858        crate::common::RegisterField::<
2859            0,
2860            0x1,
2861            1,
2862            0,
2863            simr1::Iicm,
2864            simr1::Iicm,
2865            Simr1_SPEC,
2866            crate::common::RW,
2867        >::from_register(self, 0)
2868    }
2869
2870    #[doc = "SDAn Delay Output Select"]
2871    #[inline(always)]
2872    pub fn iicdl(
2873        self,
2874    ) -> crate::common::RegisterField<
2875        3,
2876        0x1f,
2877        1,
2878        0,
2879        simr1::Iicdl,
2880        simr1::Iicdl,
2881        Simr1_SPEC,
2882        crate::common::RW,
2883    > {
2884        crate::common::RegisterField::<
2885            3,
2886            0x1f,
2887            1,
2888            0,
2889            simr1::Iicdl,
2890            simr1::Iicdl,
2891            Simr1_SPEC,
2892            crate::common::RW,
2893        >::from_register(self, 0)
2894    }
2895}
2896impl ::core::default::Default for Simr1 {
2897    #[inline(always)]
2898    fn default() -> Simr1 {
2899        <crate::RegValueT<Simr1_SPEC> as RegisterValue<_>>::new(0)
2900    }
2901}
2902pub mod simr1 {
2903
2904    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2905    pub struct Iicm_SPEC;
2906    pub type Iicm = crate::EnumBitfieldStruct<u8, Iicm_SPEC>;
2907    impl Iicm {
2908        #[doc = "SCMR.SMIF = 0: Asynchronous mode (including multi-processor mode), clock synchronous mode, or simple SPI mode SCMR.SMIF = 1: Smart card interface mode"]
2909        pub const _0: Self = Self::new(0);
2910
2911        #[doc = "SCMR.SMIF = 0: Simple IIC mode SCMR.SMIF = 1: Setting prohibited"]
2912        pub const _1: Self = Self::new(1);
2913    }
2914    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2915    pub struct Iicdl_SPEC;
2916    pub type Iicdl = crate::EnumBitfieldStruct<u8, Iicdl_SPEC>;
2917    impl Iicdl {
2918        #[doc = "No output delay"]
2919        pub const _0_X_00: Self = Self::new(0);
2920
2921        #[doc = "(IICDL - 1) to (IICDL) cycles"]
2922        pub const OTHERS: Self = Self::new(0);
2923    }
2924}
2925#[doc(hidden)]
2926#[derive(Copy, Clone, Eq, PartialEq)]
2927pub struct Simr2_SPEC;
2928impl crate::sealed::RegSpec for Simr2_SPEC {
2929    type DataType = u8;
2930}
2931
2932#[doc = "IIC Mode Register 2"]
2933pub type Simr2 = crate::RegValueT<Simr2_SPEC>;
2934
2935impl Simr2 {
2936    #[doc = "IIC Interrupt Mode Select"]
2937    #[inline(always)]
2938    pub fn iicintm(
2939        self,
2940    ) -> crate::common::RegisterField<
2941        0,
2942        0x1,
2943        1,
2944        0,
2945        simr2::Iicintm,
2946        simr2::Iicintm,
2947        Simr2_SPEC,
2948        crate::common::RW,
2949    > {
2950        crate::common::RegisterField::<
2951            0,
2952            0x1,
2953            1,
2954            0,
2955            simr2::Iicintm,
2956            simr2::Iicintm,
2957            Simr2_SPEC,
2958            crate::common::RW,
2959        >::from_register(self, 0)
2960    }
2961
2962    #[doc = "Clock Synchronization"]
2963    #[inline(always)]
2964    pub fn iiccsc(
2965        self,
2966    ) -> crate::common::RegisterField<
2967        1,
2968        0x1,
2969        1,
2970        0,
2971        simr2::Iiccsc,
2972        simr2::Iiccsc,
2973        Simr2_SPEC,
2974        crate::common::RW,
2975    > {
2976        crate::common::RegisterField::<
2977            1,
2978            0x1,
2979            1,
2980            0,
2981            simr2::Iiccsc,
2982            simr2::Iiccsc,
2983            Simr2_SPEC,
2984            crate::common::RW,
2985        >::from_register(self, 0)
2986    }
2987
2988    #[doc = "ACK Transmission Data"]
2989    #[inline(always)]
2990    pub fn iicackt(
2991        self,
2992    ) -> crate::common::RegisterField<
2993        5,
2994        0x1,
2995        1,
2996        0,
2997        simr2::Iicackt,
2998        simr2::Iicackt,
2999        Simr2_SPEC,
3000        crate::common::RW,
3001    > {
3002        crate::common::RegisterField::<
3003            5,
3004            0x1,
3005            1,
3006            0,
3007            simr2::Iicackt,
3008            simr2::Iicackt,
3009            Simr2_SPEC,
3010            crate::common::RW,
3011        >::from_register(self, 0)
3012    }
3013}
3014impl ::core::default::Default for Simr2 {
3015    #[inline(always)]
3016    fn default() -> Simr2 {
3017        <crate::RegValueT<Simr2_SPEC> as RegisterValue<_>>::new(0)
3018    }
3019}
3020pub mod simr2 {
3021
3022    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3023    pub struct Iicintm_SPEC;
3024    pub type Iicintm = crate::EnumBitfieldStruct<u8, Iicintm_SPEC>;
3025    impl Iicintm {
3026        #[doc = "Use ACK/NACK interrupts"]
3027        pub const _0: Self = Self::new(0);
3028
3029        #[doc = "Use reception and transmission interrupts"]
3030        pub const _1: Self = Self::new(1);
3031    }
3032    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3033    pub struct Iiccsc_SPEC;
3034    pub type Iiccsc = crate::EnumBitfieldStruct<u8, Iiccsc_SPEC>;
3035    impl Iiccsc {
3036        #[doc = "Do not synchronize with clock signal"]
3037        pub const _0: Self = Self::new(0);
3038
3039        #[doc = "Synchronize with clock signal"]
3040        pub const _1: Self = Self::new(1);
3041    }
3042    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3043    pub struct Iicackt_SPEC;
3044    pub type Iicackt = crate::EnumBitfieldStruct<u8, Iicackt_SPEC>;
3045    impl Iicackt {
3046        #[doc = "ACK transmission"]
3047        pub const _0: Self = Self::new(0);
3048
3049        #[doc = "NACK transmission and ACK/NACK reception"]
3050        pub const _1: Self = Self::new(1);
3051    }
3052}
3053#[doc(hidden)]
3054#[derive(Copy, Clone, Eq, PartialEq)]
3055pub struct Simr3_SPEC;
3056impl crate::sealed::RegSpec for Simr3_SPEC {
3057    type DataType = u8;
3058}
3059
3060#[doc = "IIC Mode Register 3"]
3061pub type Simr3 = crate::RegValueT<Simr3_SPEC>;
3062
3063impl Simr3 {
3064    #[doc = "Start Condition Generation"]
3065    #[inline(always)]
3066    pub fn iicstareq(
3067        self,
3068    ) -> crate::common::RegisterField<
3069        0,
3070        0x1,
3071        1,
3072        0,
3073        simr3::Iicstareq,
3074        simr3::Iicstareq,
3075        Simr3_SPEC,
3076        crate::common::RW,
3077    > {
3078        crate::common::RegisterField::<
3079            0,
3080            0x1,
3081            1,
3082            0,
3083            simr3::Iicstareq,
3084            simr3::Iicstareq,
3085            Simr3_SPEC,
3086            crate::common::RW,
3087        >::from_register(self, 0)
3088    }
3089
3090    #[doc = "Restart Condition Generation"]
3091    #[inline(always)]
3092    pub fn iicrstareq(
3093        self,
3094    ) -> crate::common::RegisterField<
3095        1,
3096        0x1,
3097        1,
3098        0,
3099        simr3::Iicrstareq,
3100        simr3::Iicrstareq,
3101        Simr3_SPEC,
3102        crate::common::RW,
3103    > {
3104        crate::common::RegisterField::<
3105            1,
3106            0x1,
3107            1,
3108            0,
3109            simr3::Iicrstareq,
3110            simr3::Iicrstareq,
3111            Simr3_SPEC,
3112            crate::common::RW,
3113        >::from_register(self, 0)
3114    }
3115
3116    #[doc = "Stop Condition Generation"]
3117    #[inline(always)]
3118    pub fn iicstpreq(
3119        self,
3120    ) -> crate::common::RegisterField<
3121        2,
3122        0x1,
3123        1,
3124        0,
3125        simr3::Iicstpreq,
3126        simr3::Iicstpreq,
3127        Simr3_SPEC,
3128        crate::common::RW,
3129    > {
3130        crate::common::RegisterField::<
3131            2,
3132            0x1,
3133            1,
3134            0,
3135            simr3::Iicstpreq,
3136            simr3::Iicstpreq,
3137            Simr3_SPEC,
3138            crate::common::RW,
3139        >::from_register(self, 0)
3140    }
3141
3142    #[doc = "Issuing of Start, Restart, or Stop Condition Completed Flag"]
3143    #[inline(always)]
3144    pub fn iicstif(
3145        self,
3146    ) -> crate::common::RegisterField<
3147        3,
3148        0x1,
3149        1,
3150        0,
3151        simr3::Iicstif,
3152        simr3::Iicstif,
3153        Simr3_SPEC,
3154        crate::common::RW,
3155    > {
3156        crate::common::RegisterField::<
3157            3,
3158            0x1,
3159            1,
3160            0,
3161            simr3::Iicstif,
3162            simr3::Iicstif,
3163            Simr3_SPEC,
3164            crate::common::RW,
3165        >::from_register(self, 0)
3166    }
3167
3168    #[doc = "SDAn Output Select"]
3169    #[inline(always)]
3170    pub fn iicsdas(
3171        self,
3172    ) -> crate::common::RegisterField<
3173        4,
3174        0x3,
3175        1,
3176        0,
3177        simr3::Iicsdas,
3178        simr3::Iicsdas,
3179        Simr3_SPEC,
3180        crate::common::RW,
3181    > {
3182        crate::common::RegisterField::<
3183            4,
3184            0x3,
3185            1,
3186            0,
3187            simr3::Iicsdas,
3188            simr3::Iicsdas,
3189            Simr3_SPEC,
3190            crate::common::RW,
3191        >::from_register(self, 0)
3192    }
3193
3194    #[doc = "SCLn Output Select"]
3195    #[inline(always)]
3196    pub fn iicscls(
3197        self,
3198    ) -> crate::common::RegisterField<
3199        6,
3200        0x3,
3201        1,
3202        0,
3203        simr3::Iicscls,
3204        simr3::Iicscls,
3205        Simr3_SPEC,
3206        crate::common::RW,
3207    > {
3208        crate::common::RegisterField::<
3209            6,
3210            0x3,
3211            1,
3212            0,
3213            simr3::Iicscls,
3214            simr3::Iicscls,
3215            Simr3_SPEC,
3216            crate::common::RW,
3217        >::from_register(self, 0)
3218    }
3219}
3220impl ::core::default::Default for Simr3 {
3221    #[inline(always)]
3222    fn default() -> Simr3 {
3223        <crate::RegValueT<Simr3_SPEC> as RegisterValue<_>>::new(0)
3224    }
3225}
3226pub mod simr3 {
3227
3228    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3229    pub struct Iicstareq_SPEC;
3230    pub type Iicstareq = crate::EnumBitfieldStruct<u8, Iicstareq_SPEC>;
3231    impl Iicstareq {
3232        #[doc = "Do not generate start condition"]
3233        pub const _0: Self = Self::new(0);
3234
3235        #[doc = "Generate start condition"]
3236        pub const _1: Self = Self::new(1);
3237    }
3238    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3239    pub struct Iicrstareq_SPEC;
3240    pub type Iicrstareq = crate::EnumBitfieldStruct<u8, Iicrstareq_SPEC>;
3241    impl Iicrstareq {
3242        #[doc = "Do not generate restart condition"]
3243        pub const _0: Self = Self::new(0);
3244
3245        #[doc = "Generate restart condition"]
3246        pub const _1: Self = Self::new(1);
3247    }
3248    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3249    pub struct Iicstpreq_SPEC;
3250    pub type Iicstpreq = crate::EnumBitfieldStruct<u8, Iicstpreq_SPEC>;
3251    impl Iicstpreq {
3252        #[doc = "Do not generate stop condition"]
3253        pub const _0: Self = Self::new(0);
3254
3255        #[doc = "Generate stop condition"]
3256        pub const _1: Self = Self::new(1);
3257    }
3258    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3259    pub struct Iicstif_SPEC;
3260    pub type Iicstif = crate::EnumBitfieldStruct<u8, Iicstif_SPEC>;
3261    impl Iicstif {
3262        #[doc = "No requests are being made for generating conditions, or a condition is being generated"]
3263        pub const _0: Self = Self::new(0);
3264
3265        #[doc = "Generation of start, restart, or stop condition is complete. When 0 is written to IICSTIF, it is set to 0"]
3266        pub const _1: Self = Self::new(1);
3267    }
3268    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3269    pub struct Iicsdas_SPEC;
3270    pub type Iicsdas = crate::EnumBitfieldStruct<u8, Iicsdas_SPEC>;
3271    impl Iicsdas {
3272        #[doc = "Output serial data"]
3273        pub const _00: Self = Self::new(0);
3274
3275        #[doc = "Generate start, restart, or stop condition"]
3276        pub const _01: Self = Self::new(1);
3277
3278        #[doc = "Output low on SDAn pin"]
3279        pub const _10: Self = Self::new(2);
3280
3281        #[doc = "Drive SDAn pin to high-impedance state"]
3282        pub const _11: Self = Self::new(3);
3283    }
3284    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3285    pub struct Iicscls_SPEC;
3286    pub type Iicscls = crate::EnumBitfieldStruct<u8, Iicscls_SPEC>;
3287    impl Iicscls {
3288        #[doc = "Output serial clock"]
3289        pub const _00: Self = Self::new(0);
3290
3291        #[doc = "Generate start, restart, or stop condition"]
3292        pub const _01: Self = Self::new(1);
3293
3294        #[doc = "Output low on SCLn pin"]
3295        pub const _10: Self = Self::new(2);
3296
3297        #[doc = "Drive SCLn pin to high-impedance state"]
3298        pub const _11: Self = Self::new(3);
3299    }
3300}
3301#[doc(hidden)]
3302#[derive(Copy, Clone, Eq, PartialEq)]
3303pub struct Sisr_SPEC;
3304impl crate::sealed::RegSpec for Sisr_SPEC {
3305    type DataType = u8;
3306}
3307
3308#[doc = "IIC Status Register"]
3309pub type Sisr = crate::RegValueT<Sisr_SPEC>;
3310
3311impl Sisr {
3312    #[doc = "ACK Reception Data Flag"]
3313    #[inline(always)]
3314    pub fn iicackr(
3315        self,
3316    ) -> crate::common::RegisterField<
3317        0,
3318        0x1,
3319        1,
3320        0,
3321        sisr::Iicackr,
3322        sisr::Iicackr,
3323        Sisr_SPEC,
3324        crate::common::R,
3325    > {
3326        crate::common::RegisterField::<
3327            0,
3328            0x1,
3329            1,
3330            0,
3331            sisr::Iicackr,
3332            sisr::Iicackr,
3333            Sisr_SPEC,
3334            crate::common::R,
3335        >::from_register(self, 0)
3336    }
3337}
3338impl ::core::default::Default for Sisr {
3339    #[inline(always)]
3340    fn default() -> Sisr {
3341        <crate::RegValueT<Sisr_SPEC> as RegisterValue<_>>::new(0)
3342    }
3343}
3344pub mod sisr {
3345
3346    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3347    pub struct Iicackr_SPEC;
3348    pub type Iicackr = crate::EnumBitfieldStruct<u8, Iicackr_SPEC>;
3349    impl Iicackr {
3350        #[doc = "ACK received"]
3351        pub const _0: Self = Self::new(0);
3352
3353        #[doc = "NACK received"]
3354        pub const _1: Self = Self::new(1);
3355    }
3356}
3357#[doc(hidden)]
3358#[derive(Copy, Clone, Eq, PartialEq)]
3359pub struct Spmr_SPEC;
3360impl crate::sealed::RegSpec for Spmr_SPEC {
3361    type DataType = u8;
3362}
3363
3364#[doc = "SPI Mode Register"]
3365pub type Spmr = crate::RegValueT<Spmr_SPEC>;
3366
3367impl Spmr {
3368    #[doc = "SSn Pin Function Enable"]
3369    #[inline(always)]
3370    pub fn sse(
3371        self,
3372    ) -> crate::common::RegisterField<
3373        0,
3374        0x1,
3375        1,
3376        0,
3377        spmr::Sse,
3378        spmr::Sse,
3379        Spmr_SPEC,
3380        crate::common::RW,
3381    > {
3382        crate::common::RegisterField::<
3383            0,
3384            0x1,
3385            1,
3386            0,
3387            spmr::Sse,
3388            spmr::Sse,
3389            Spmr_SPEC,
3390            crate::common::RW,
3391        >::from_register(self, 0)
3392    }
3393
3394    #[doc = "CTS Enable"]
3395    #[inline(always)]
3396    pub fn ctse(
3397        self,
3398    ) -> crate::common::RegisterField<
3399        1,
3400        0x1,
3401        1,
3402        0,
3403        spmr::Ctse,
3404        spmr::Ctse,
3405        Spmr_SPEC,
3406        crate::common::RW,
3407    > {
3408        crate::common::RegisterField::<
3409            1,
3410            0x1,
3411            1,
3412            0,
3413            spmr::Ctse,
3414            spmr::Ctse,
3415            Spmr_SPEC,
3416            crate::common::RW,
3417        >::from_register(self, 0)
3418    }
3419
3420    #[doc = "Master Slave Select"]
3421    #[inline(always)]
3422    pub fn mss(
3423        self,
3424    ) -> crate::common::RegisterField<
3425        2,
3426        0x1,
3427        1,
3428        0,
3429        spmr::Mss,
3430        spmr::Mss,
3431        Spmr_SPEC,
3432        crate::common::RW,
3433    > {
3434        crate::common::RegisterField::<
3435            2,
3436            0x1,
3437            1,
3438            0,
3439            spmr::Mss,
3440            spmr::Mss,
3441            Spmr_SPEC,
3442            crate::common::RW,
3443        >::from_register(self, 0)
3444    }
3445
3446    #[doc = "CTS external pin Enable"]
3447    #[inline(always)]
3448    pub fn ctspen(
3449        self,
3450    ) -> crate::common::RegisterField<
3451        3,
3452        0x1,
3453        1,
3454        0,
3455        spmr::Ctspen,
3456        spmr::Ctspen,
3457        Spmr_SPEC,
3458        crate::common::RW,
3459    > {
3460        crate::common::RegisterField::<
3461            3,
3462            0x1,
3463            1,
3464            0,
3465            spmr::Ctspen,
3466            spmr::Ctspen,
3467            Spmr_SPEC,
3468            crate::common::RW,
3469        >::from_register(self, 0)
3470    }
3471
3472    #[doc = "Mode Fault Flag"]
3473    #[inline(always)]
3474    pub fn mff(
3475        self,
3476    ) -> crate::common::RegisterField<
3477        4,
3478        0x1,
3479        1,
3480        0,
3481        spmr::Mff,
3482        spmr::Mff,
3483        Spmr_SPEC,
3484        crate::common::RW,
3485    > {
3486        crate::common::RegisterField::<
3487            4,
3488            0x1,
3489            1,
3490            0,
3491            spmr::Mff,
3492            spmr::Mff,
3493            Spmr_SPEC,
3494            crate::common::RW,
3495        >::from_register(self, 0)
3496    }
3497
3498    #[doc = "Clock Polarity Select"]
3499    #[inline(always)]
3500    pub fn ckpol(
3501        self,
3502    ) -> crate::common::RegisterField<
3503        6,
3504        0x1,
3505        1,
3506        0,
3507        spmr::Ckpol,
3508        spmr::Ckpol,
3509        Spmr_SPEC,
3510        crate::common::RW,
3511    > {
3512        crate::common::RegisterField::<
3513            6,
3514            0x1,
3515            1,
3516            0,
3517            spmr::Ckpol,
3518            spmr::Ckpol,
3519            Spmr_SPEC,
3520            crate::common::RW,
3521        >::from_register(self, 0)
3522    }
3523
3524    #[doc = "Clock Phase Select"]
3525    #[inline(always)]
3526    pub fn ckph(
3527        self,
3528    ) -> crate::common::RegisterField<
3529        7,
3530        0x1,
3531        1,
3532        0,
3533        spmr::Ckph,
3534        spmr::Ckph,
3535        Spmr_SPEC,
3536        crate::common::RW,
3537    > {
3538        crate::common::RegisterField::<
3539            7,
3540            0x1,
3541            1,
3542            0,
3543            spmr::Ckph,
3544            spmr::Ckph,
3545            Spmr_SPEC,
3546            crate::common::RW,
3547        >::from_register(self, 0)
3548    }
3549}
3550impl ::core::default::Default for Spmr {
3551    #[inline(always)]
3552    fn default() -> Spmr {
3553        <crate::RegValueT<Spmr_SPEC> as RegisterValue<_>>::new(0)
3554    }
3555}
3556pub mod spmr {
3557
3558    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3559    pub struct Sse_SPEC;
3560    pub type Sse = crate::EnumBitfieldStruct<u8, Sse_SPEC>;
3561    impl Sse {
3562        #[doc = "Disable SSn pin function"]
3563        pub const _0: Self = Self::new(0);
3564
3565        #[doc = "Enable SSn pin function"]
3566        pub const _1: Self = Self::new(1);
3567    }
3568    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3569    pub struct Ctse_SPEC;
3570    pub type Ctse = crate::EnumBitfieldStruct<u8, Ctse_SPEC>;
3571    impl Ctse {
3572        #[doc = "Disable CTS function (enable RTS output function)"]
3573        pub const _0: Self = Self::new(0);
3574
3575        #[doc = "Enable CTS function"]
3576        pub const _1: Self = Self::new(1);
3577    }
3578    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3579    pub struct Mss_SPEC;
3580    pub type Mss = crate::EnumBitfieldStruct<u8, Mss_SPEC>;
3581    impl Mss {
3582        #[doc = "Transmit through TXDn pin and receive through RXDn pin (master mode)"]
3583        pub const _0: Self = Self::new(0);
3584
3585        #[doc = "Receive through TXDn pin and transmit through RXDn pin (slave mode)"]
3586        pub const _1: Self = Self::new(1);
3587    }
3588    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3589    pub struct Ctspen_SPEC;
3590    pub type Ctspen = crate::EnumBitfieldStruct<u8, Ctspen_SPEC>;
3591    impl Ctspen {
3592        #[doc = "Alternate setting to use CTS and RTS functions as either one terminal"]
3593        pub const _0: Self = Self::new(0);
3594
3595        #[doc = "Dedicated setting for separately using CTS and RTS functions with 2 terminals"]
3596        pub const _1: Self = Self::new(1);
3597    }
3598    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3599    pub struct Mff_SPEC;
3600    pub type Mff = crate::EnumBitfieldStruct<u8, Mff_SPEC>;
3601    impl Mff {
3602        #[doc = "No mode fault error"]
3603        pub const _0: Self = Self::new(0);
3604
3605        #[doc = "Mode fault error"]
3606        pub const _1: Self = Self::new(1);
3607    }
3608    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3609    pub struct Ckpol_SPEC;
3610    pub type Ckpol = crate::EnumBitfieldStruct<u8, Ckpol_SPEC>;
3611    impl Ckpol {
3612        #[doc = "Do not invert clock polarity"]
3613        pub const _0: Self = Self::new(0);
3614
3615        #[doc = "Invert clock polarity"]
3616        pub const _1: Self = Self::new(1);
3617    }
3618    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3619    pub struct Ckph_SPEC;
3620    pub type Ckph = crate::EnumBitfieldStruct<u8, Ckph_SPEC>;
3621    impl Ckph {
3622        #[doc = "Do not delay clock"]
3623        pub const _0: Self = Self::new(0);
3624
3625        #[doc = "Delay clock"]
3626        pub const _1: Self = Self::new(1);
3627    }
3628}
3629#[doc(hidden)]
3630#[derive(Copy, Clone, Eq, PartialEq)]
3631pub struct Ftdrhl_SPEC;
3632impl crate::sealed::RegSpec for Ftdrhl_SPEC {
3633    type DataType = u16;
3634}
3635
3636#[doc = "Transmit FIFO Data Register"]
3637pub type Ftdrhl = crate::RegValueT<Ftdrhl_SPEC>;
3638
3639impl Ftdrhl {
3640    #[doc = "Serial transmit data"]
3641    #[inline(always)]
3642    pub fn tdat(
3643        self,
3644    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Ftdrhl_SPEC, crate::common::W> {
3645        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Ftdrhl_SPEC,crate::common::W>::from_register(self,0)
3646    }
3647
3648    #[doc = "Multi-Processor Transfer Bit Flag"]
3649    #[inline(always)]
3650    pub fn mpbt(
3651        self,
3652    ) -> crate::common::RegisterField<
3653        9,
3654        0x1,
3655        1,
3656        0,
3657        ftdrhl::Mpbt,
3658        ftdrhl::Mpbt,
3659        Ftdrhl_SPEC,
3660        crate::common::W,
3661    > {
3662        crate::common::RegisterField::<
3663            9,
3664            0x1,
3665            1,
3666            0,
3667            ftdrhl::Mpbt,
3668            ftdrhl::Mpbt,
3669            Ftdrhl_SPEC,
3670            crate::common::W,
3671        >::from_register(self, 0)
3672    }
3673}
3674impl ::core::default::Default for Ftdrhl {
3675    #[inline(always)]
3676    fn default() -> Ftdrhl {
3677        <crate::RegValueT<Ftdrhl_SPEC> as RegisterValue<_>>::new(65535)
3678    }
3679}
3680pub mod ftdrhl {
3681
3682    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3683    pub struct Mpbt_SPEC;
3684    pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
3685    impl Mpbt {
3686        #[doc = "Data transmission cycle"]
3687        pub const _0: Self = Self::new(0);
3688
3689        #[doc = "ID transmission cycle"]
3690        pub const _1: Self = Self::new(1);
3691    }
3692}
3693#[doc(hidden)]
3694#[derive(Copy, Clone, Eq, PartialEq)]
3695pub struct Tdrhl_SPEC;
3696impl crate::sealed::RegSpec for Tdrhl_SPEC {
3697    type DataType = u16;
3698}
3699
3700#[doc = "Transmit Data Register for Non-Manchester mode (MMR.MANEN = 0)"]
3701pub type Tdrhl = crate::RegValueT<Tdrhl_SPEC>;
3702
3703impl Tdrhl {
3704    #[doc = "Serial Transmit Data"]
3705    #[inline(always)]
3706    pub fn tdat(
3707        self,
3708    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Tdrhl_SPEC, crate::common::RW> {
3709        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Tdrhl_SPEC,crate::common::RW>::from_register(self,0)
3710    }
3711}
3712impl ::core::default::Default for Tdrhl {
3713    #[inline(always)]
3714    fn default() -> Tdrhl {
3715        <crate::RegValueT<Tdrhl_SPEC> as RegisterValue<_>>::new(65535)
3716    }
3717}
3718
3719#[doc(hidden)]
3720#[derive(Copy, Clone, Eq, PartialEq)]
3721pub struct TdrhlMan_SPEC;
3722impl crate::sealed::RegSpec for TdrhlMan_SPEC {
3723    type DataType = u16;
3724}
3725
3726#[doc = "Transmit Data Register for Manchester mode (MMR.MANEN = 1)"]
3727pub type TdrhlMan = crate::RegValueT<TdrhlMan_SPEC>;
3728
3729impl TdrhlMan {
3730    #[doc = "Serial transmit data"]
3731    #[inline(always)]
3732    pub fn tdat(
3733        self,
3734    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, TdrhlMan_SPEC, crate::common::RW>
3735    {
3736        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,TdrhlMan_SPEC,crate::common::RW>::from_register(self,0)
3737    }
3738
3739    #[doc = "Multi-processor transfer bit flag"]
3740    #[inline(always)]
3741    pub fn mpbt(
3742        self,
3743    ) -> crate::common::RegisterField<
3744        9,
3745        0x1,
3746        1,
3747        0,
3748        tdrhl_man::Mpbt,
3749        tdrhl_man::Mpbt,
3750        TdrhlMan_SPEC,
3751        crate::common::RW,
3752    > {
3753        crate::common::RegisterField::<
3754            9,
3755            0x1,
3756            1,
3757            0,
3758            tdrhl_man::Mpbt,
3759            tdrhl_man::Mpbt,
3760            TdrhlMan_SPEC,
3761            crate::common::RW,
3762        >::from_register(self, 0)
3763    }
3764
3765    #[doc = "Transmit SYNC data bit"]
3766    #[inline(always)]
3767    pub fn tsync(
3768        self,
3769    ) -> crate::common::RegisterField<
3770        12,
3771        0x1,
3772        1,
3773        0,
3774        tdrhl_man::Tsync,
3775        tdrhl_man::Tsync,
3776        TdrhlMan_SPEC,
3777        crate::common::RW,
3778    > {
3779        crate::common::RegisterField::<
3780            12,
3781            0x1,
3782            1,
3783            0,
3784            tdrhl_man::Tsync,
3785            tdrhl_man::Tsync,
3786            TdrhlMan_SPEC,
3787            crate::common::RW,
3788        >::from_register(self, 0)
3789    }
3790}
3791impl ::core::default::Default for TdrhlMan {
3792    #[inline(always)]
3793    fn default() -> TdrhlMan {
3794        <crate::RegValueT<TdrhlMan_SPEC> as RegisterValue<_>>::new(65535)
3795    }
3796}
3797pub mod tdrhl_man {
3798
3799    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3800    pub struct Mpbt_SPEC;
3801    pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
3802    impl Mpbt {
3803        #[doc = "Data transmission cycles"]
3804        pub const _0: Self = Self::new(0);
3805
3806        #[doc = "ID transmission cycles"]
3807        pub const _1: Self = Self::new(1);
3808    }
3809    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3810    pub struct Tsync_SPEC;
3811    pub type Tsync = crate::EnumBitfieldStruct<u8, Tsync_SPEC>;
3812    impl Tsync {
3813        #[doc = "The Start Bit is transmitted as DATA SYNC."]
3814        pub const _0: Self = Self::new(0);
3815
3816        #[doc = "The Start Bit is transmitted as COMMAND SYNC."]
3817        pub const _1: Self = Self::new(1);
3818    }
3819}
3820#[doc(hidden)]
3821#[derive(Copy, Clone, Eq, PartialEq)]
3822pub struct Ftdrh_SPEC;
3823impl crate::sealed::RegSpec for Ftdrh_SPEC {
3824    type DataType = u8;
3825}
3826
3827#[doc = "Transmit FIFO Data Register"]
3828pub type Ftdrh = crate::RegValueT<Ftdrh_SPEC>;
3829
3830impl Ftdrh {
3831    #[doc = "Serial transmit data"]
3832    #[inline(always)]
3833    pub fn tdat(self) -> crate::common::RegisterFieldBool<0, 1, 0, Ftdrh_SPEC, crate::common::W> {
3834        crate::common::RegisterFieldBool::<0, 1, 0, Ftdrh_SPEC, crate::common::W>::from_register(
3835            self, 0,
3836        )
3837    }
3838
3839    #[doc = "Multi-Processor Transfer Bit Flag"]
3840    #[inline(always)]
3841    pub fn mpbt(
3842        self,
3843    ) -> crate::common::RegisterField<
3844        1,
3845        0x1,
3846        1,
3847        0,
3848        ftdrh::Mpbt,
3849        ftdrh::Mpbt,
3850        Ftdrh_SPEC,
3851        crate::common::W,
3852    > {
3853        crate::common::RegisterField::<
3854            1,
3855            0x1,
3856            1,
3857            0,
3858            ftdrh::Mpbt,
3859            ftdrh::Mpbt,
3860            Ftdrh_SPEC,
3861            crate::common::W,
3862        >::from_register(self, 0)
3863    }
3864}
3865impl ::core::default::Default for Ftdrh {
3866    #[inline(always)]
3867    fn default() -> Ftdrh {
3868        <crate::RegValueT<Ftdrh_SPEC> as RegisterValue<_>>::new(255)
3869    }
3870}
3871pub mod ftdrh {
3872
3873    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3874    pub struct Mpbt_SPEC;
3875    pub type Mpbt = crate::EnumBitfieldStruct<u8, Mpbt_SPEC>;
3876    impl Mpbt {
3877        #[doc = "Data transmission cycle"]
3878        pub const _0: Self = Self::new(0);
3879
3880        #[doc = "ID transmission cycle"]
3881        pub const _1: Self = Self::new(1);
3882    }
3883}
3884#[doc(hidden)]
3885#[derive(Copy, Clone, Eq, PartialEq)]
3886pub struct Ftdrl_SPEC;
3887impl crate::sealed::RegSpec for Ftdrl_SPEC {
3888    type DataType = u8;
3889}
3890
3891#[doc = "Transmit FIFO Data Register"]
3892pub type Ftdrl = crate::RegValueT<Ftdrl_SPEC>;
3893
3894impl Ftdrl {
3895    #[doc = "Serial transmit data"]
3896    #[inline(always)]
3897    pub fn tdat(
3898        self,
3899    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Ftdrl_SPEC, crate::common::W> {
3900        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Ftdrl_SPEC,crate::common::W>::from_register(self,0)
3901    }
3902}
3903impl ::core::default::Default for Ftdrl {
3904    #[inline(always)]
3905    fn default() -> Ftdrl {
3906        <crate::RegValueT<Ftdrl_SPEC> as RegisterValue<_>>::new(255)
3907    }
3908}
3909
3910#[doc(hidden)]
3911#[derive(Copy, Clone, Eq, PartialEq)]
3912pub struct Frdrhl_SPEC;
3913impl crate::sealed::RegSpec for Frdrhl_SPEC {
3914    type DataType = u16;
3915}
3916
3917#[doc = "Receive FIFO Data Register"]
3918pub type Frdrhl = crate::RegValueT<Frdrhl_SPEC>;
3919
3920impl Frdrhl {
3921    #[doc = "Serial receive data"]
3922    #[inline(always)]
3923    pub fn rdat(
3924        self,
3925    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Frdrhl_SPEC, crate::common::R> {
3926        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Frdrhl_SPEC,crate::common::R>::from_register(self,0)
3927    }
3928
3929    #[doc = "Multi-Processor Bit Flag"]
3930    #[inline(always)]
3931    pub fn mpb(
3932        self,
3933    ) -> crate::common::RegisterField<
3934        9,
3935        0x1,
3936        1,
3937        0,
3938        frdrhl::Mpb,
3939        frdrhl::Mpb,
3940        Frdrhl_SPEC,
3941        crate::common::R,
3942    > {
3943        crate::common::RegisterField::<
3944            9,
3945            0x1,
3946            1,
3947            0,
3948            frdrhl::Mpb,
3949            frdrhl::Mpb,
3950            Frdrhl_SPEC,
3951            crate::common::R,
3952        >::from_register(self, 0)
3953    }
3954
3955    #[doc = "Receive Data Ready Flag"]
3956    #[inline(always)]
3957    pub fn dr(
3958        self,
3959    ) -> crate::common::RegisterField<
3960        10,
3961        0x1,
3962        1,
3963        0,
3964        frdrhl::Dr,
3965        frdrhl::Dr,
3966        Frdrhl_SPEC,
3967        crate::common::R,
3968    > {
3969        crate::common::RegisterField::<
3970            10,
3971            0x1,
3972            1,
3973            0,
3974            frdrhl::Dr,
3975            frdrhl::Dr,
3976            Frdrhl_SPEC,
3977            crate::common::R,
3978        >::from_register(self, 0)
3979    }
3980
3981    #[doc = "Parity Error Flag"]
3982    #[inline(always)]
3983    pub fn per(
3984        self,
3985    ) -> crate::common::RegisterField<
3986        11,
3987        0x1,
3988        1,
3989        0,
3990        frdrhl::Per,
3991        frdrhl::Per,
3992        Frdrhl_SPEC,
3993        crate::common::R,
3994    > {
3995        crate::common::RegisterField::<
3996            11,
3997            0x1,
3998            1,
3999            0,
4000            frdrhl::Per,
4001            frdrhl::Per,
4002            Frdrhl_SPEC,
4003            crate::common::R,
4004        >::from_register(self, 0)
4005    }
4006
4007    #[doc = "Framing Error Flag"]
4008    #[inline(always)]
4009    pub fn fer(
4010        self,
4011    ) -> crate::common::RegisterField<
4012        12,
4013        0x1,
4014        1,
4015        0,
4016        frdrhl::Fer,
4017        frdrhl::Fer,
4018        Frdrhl_SPEC,
4019        crate::common::R,
4020    > {
4021        crate::common::RegisterField::<
4022            12,
4023            0x1,
4024            1,
4025            0,
4026            frdrhl::Fer,
4027            frdrhl::Fer,
4028            Frdrhl_SPEC,
4029            crate::common::R,
4030        >::from_register(self, 0)
4031    }
4032
4033    #[doc = "Overrun Error Flag"]
4034    #[inline(always)]
4035    pub fn orer(
4036        self,
4037    ) -> crate::common::RegisterField<
4038        13,
4039        0x1,
4040        1,
4041        0,
4042        frdrhl::Orer,
4043        frdrhl::Orer,
4044        Frdrhl_SPEC,
4045        crate::common::R,
4046    > {
4047        crate::common::RegisterField::<
4048            13,
4049            0x1,
4050            1,
4051            0,
4052            frdrhl::Orer,
4053            frdrhl::Orer,
4054            Frdrhl_SPEC,
4055            crate::common::R,
4056        >::from_register(self, 0)
4057    }
4058
4059    #[doc = "Receive FIFO Data Full Flag"]
4060    #[inline(always)]
4061    pub fn rdf(
4062        self,
4063    ) -> crate::common::RegisterField<
4064        14,
4065        0x1,
4066        1,
4067        0,
4068        frdrhl::Rdf,
4069        frdrhl::Rdf,
4070        Frdrhl_SPEC,
4071        crate::common::R,
4072    > {
4073        crate::common::RegisterField::<
4074            14,
4075            0x1,
4076            1,
4077            0,
4078            frdrhl::Rdf,
4079            frdrhl::Rdf,
4080            Frdrhl_SPEC,
4081            crate::common::R,
4082        >::from_register(self, 0)
4083    }
4084}
4085impl ::core::default::Default for Frdrhl {
4086    #[inline(always)]
4087    fn default() -> Frdrhl {
4088        <crate::RegValueT<Frdrhl_SPEC> as RegisterValue<_>>::new(0)
4089    }
4090}
4091pub mod frdrhl {
4092
4093    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4094    pub struct Mpb_SPEC;
4095    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
4096    impl Mpb {
4097        #[doc = "Data transmission cycle"]
4098        pub const _0: Self = Self::new(0);
4099
4100        #[doc = "ID transmission cycle"]
4101        pub const _1: Self = Self::new(1);
4102    }
4103    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4104    pub struct Dr_SPEC;
4105    pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
4106    impl Dr {
4107        #[doc = "Receiving is in progress, or no received data remains in the FRDRH and FRDRL registers after successfully completed reception"]
4108        pub const _0: Self = Self::new(0);
4109
4110        #[doc = "Next receive data is not received for a period after successfully completed reception"]
4111        pub const _1: Self = Self::new(1);
4112    }
4113    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4114    pub struct Per_SPEC;
4115    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
4116    impl Per {
4117        #[doc = "No parity error occurred in the first data of FRDRH and FRDRL"]
4118        pub const _0: Self = Self::new(0);
4119
4120        #[doc = "Parity error occurred in the first data of FRDRH and FRDRL"]
4121        pub const _1: Self = Self::new(1);
4122    }
4123    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4124    pub struct Fer_SPEC;
4125    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
4126    impl Fer {
4127        #[doc = "No framing error occurred in the first data of FRDRH and FRDRL"]
4128        pub const _0: Self = Self::new(0);
4129
4130        #[doc = "Framing error occurred in the first data of FRDRH and FRDRL"]
4131        pub const _1: Self = Self::new(1);
4132    }
4133    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4134    pub struct Orer_SPEC;
4135    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
4136    impl Orer {
4137        #[doc = "No overrun error occurred"]
4138        pub const _0: Self = Self::new(0);
4139
4140        #[doc = "Overrun error occurred"]
4141        pub const _1: Self = Self::new(1);
4142    }
4143    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4144    pub struct Rdf_SPEC;
4145    pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
4146    impl Rdf {
4147        #[doc = "The amount of receive data written in FRDRH and FRDRL is less than the specified receive triggering number"]
4148        pub const _0: Self = Self::new(0);
4149
4150        #[doc = "The amount of receive data written in FRDRH and FRDRL is equal to or greater than the specified receive triggering number"]
4151        pub const _1: Self = Self::new(1);
4152    }
4153}
4154#[doc(hidden)]
4155#[derive(Copy, Clone, Eq, PartialEq)]
4156pub struct Rdrhl_SPEC;
4157impl crate::sealed::RegSpec for Rdrhl_SPEC {
4158    type DataType = u16;
4159}
4160
4161#[doc = "Receive Data Register for Non-Manchester mode (MMR.MANEN = 0)"]
4162pub type Rdrhl = crate::RegValueT<Rdrhl_SPEC>;
4163
4164impl Rdrhl {
4165    #[doc = "Serial Receive Data"]
4166    #[inline(always)]
4167    pub fn rdat(
4168        self,
4169    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Rdrhl_SPEC, crate::common::R> {
4170        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Rdrhl_SPEC,crate::common::R>::from_register(self,0)
4171    }
4172}
4173impl ::core::default::Default for Rdrhl {
4174    #[inline(always)]
4175    fn default() -> Rdrhl {
4176        <crate::RegValueT<Rdrhl_SPEC> as RegisterValue<_>>::new(0)
4177    }
4178}
4179
4180#[doc(hidden)]
4181#[derive(Copy, Clone, Eq, PartialEq)]
4182pub struct RdrhlMan_SPEC;
4183impl crate::sealed::RegSpec for RdrhlMan_SPEC {
4184    type DataType = u16;
4185}
4186
4187#[doc = "Receive Data Register for Manchester mode (MMR.MANEN = 1)"]
4188pub type RdrhlMan = crate::RegValueT<RdrhlMan_SPEC>;
4189
4190impl RdrhlMan {
4191    #[doc = "Serial receive data"]
4192    #[inline(always)]
4193    pub fn rdat(
4194        self,
4195    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, RdrhlMan_SPEC, crate::common::R>
4196    {
4197        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,RdrhlMan_SPEC,crate::common::R>::from_register(self,0)
4198    }
4199
4200    #[doc = "Multi-processor bit"]
4201    #[inline(always)]
4202    pub fn mpb(
4203        self,
4204    ) -> crate::common::RegisterField<
4205        9,
4206        0x1,
4207        1,
4208        0,
4209        rdrhl_man::Mpb,
4210        rdrhl_man::Mpb,
4211        RdrhlMan_SPEC,
4212        crate::common::R,
4213    > {
4214        crate::common::RegisterField::<
4215            9,
4216            0x1,
4217            1,
4218            0,
4219            rdrhl_man::Mpb,
4220            rdrhl_man::Mpb,
4221            RdrhlMan_SPEC,
4222            crate::common::R,
4223        >::from_register(self, 0)
4224    }
4225
4226    #[doc = "Receive SYNC data bit"]
4227    #[inline(always)]
4228    pub fn rsync(
4229        self,
4230    ) -> crate::common::RegisterField<
4231        12,
4232        0x1,
4233        1,
4234        0,
4235        rdrhl_man::Rsync,
4236        rdrhl_man::Rsync,
4237        RdrhlMan_SPEC,
4238        crate::common::R,
4239    > {
4240        crate::common::RegisterField::<
4241            12,
4242            0x1,
4243            1,
4244            0,
4245            rdrhl_man::Rsync,
4246            rdrhl_man::Rsync,
4247            RdrhlMan_SPEC,
4248            crate::common::R,
4249        >::from_register(self, 0)
4250    }
4251}
4252impl ::core::default::Default for RdrhlMan {
4253    #[inline(always)]
4254    fn default() -> RdrhlMan {
4255        <crate::RegValueT<RdrhlMan_SPEC> as RegisterValue<_>>::new(0)
4256    }
4257}
4258pub mod rdrhl_man {
4259
4260    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4261    pub struct Mpb_SPEC;
4262    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
4263    impl Mpb {
4264        #[doc = "Data transmission cycles"]
4265        pub const _0: Self = Self::new(0);
4266
4267        #[doc = "ID transmission cycles"]
4268        pub const _1: Self = Self::new(1);
4269    }
4270    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4271    pub struct Rsync_SPEC;
4272    pub type Rsync = crate::EnumBitfieldStruct<u8, Rsync_SPEC>;
4273    impl Rsync {
4274        #[doc = "The received the Start Bit is DATA SYNC"]
4275        pub const _0: Self = Self::new(0);
4276
4277        #[doc = "The received the Start Bit is COMMAND SYNC"]
4278        pub const _1: Self = Self::new(1);
4279    }
4280}
4281#[doc(hidden)]
4282#[derive(Copy, Clone, Eq, PartialEq)]
4283pub struct Frdrh_SPEC;
4284impl crate::sealed::RegSpec for Frdrh_SPEC {
4285    type DataType = u8;
4286}
4287
4288#[doc = "Receive FIFO Data Register"]
4289pub type Frdrh = crate::RegValueT<Frdrh_SPEC>;
4290
4291impl Frdrh {
4292    #[doc = "Serial receive data"]
4293    #[inline(always)]
4294    pub fn rdat(self) -> crate::common::RegisterFieldBool<0, 1, 0, Frdrh_SPEC, crate::common::R> {
4295        crate::common::RegisterFieldBool::<0, 1, 0, Frdrh_SPEC, crate::common::R>::from_register(
4296            self, 0,
4297        )
4298    }
4299
4300    #[doc = "Multi-Processor Bit Flag"]
4301    #[inline(always)]
4302    pub fn mpb(
4303        self,
4304    ) -> crate::common::RegisterField<
4305        1,
4306        0x1,
4307        1,
4308        0,
4309        frdrh::Mpb,
4310        frdrh::Mpb,
4311        Frdrh_SPEC,
4312        crate::common::R,
4313    > {
4314        crate::common::RegisterField::<
4315            1,
4316            0x1,
4317            1,
4318            0,
4319            frdrh::Mpb,
4320            frdrh::Mpb,
4321            Frdrh_SPEC,
4322            crate::common::R,
4323        >::from_register(self, 0)
4324    }
4325
4326    #[doc = "Receive Data Ready Flag"]
4327    #[inline(always)]
4328    pub fn dr(
4329        self,
4330    ) -> crate::common::RegisterField<
4331        2,
4332        0x1,
4333        1,
4334        0,
4335        frdrh::Dr,
4336        frdrh::Dr,
4337        Frdrh_SPEC,
4338        crate::common::R,
4339    > {
4340        crate::common::RegisterField::<
4341            2,
4342            0x1,
4343            1,
4344            0,
4345            frdrh::Dr,
4346            frdrh::Dr,
4347            Frdrh_SPEC,
4348            crate::common::R,
4349        >::from_register(self, 0)
4350    }
4351
4352    #[doc = "Parity Error Flag"]
4353    #[inline(always)]
4354    pub fn per(
4355        self,
4356    ) -> crate::common::RegisterField<
4357        3,
4358        0x1,
4359        1,
4360        0,
4361        frdrh::Per,
4362        frdrh::Per,
4363        Frdrh_SPEC,
4364        crate::common::R,
4365    > {
4366        crate::common::RegisterField::<
4367            3,
4368            0x1,
4369            1,
4370            0,
4371            frdrh::Per,
4372            frdrh::Per,
4373            Frdrh_SPEC,
4374            crate::common::R,
4375        >::from_register(self, 0)
4376    }
4377
4378    #[doc = "Framing Error Flag"]
4379    #[inline(always)]
4380    pub fn fer(
4381        self,
4382    ) -> crate::common::RegisterField<
4383        4,
4384        0x1,
4385        1,
4386        0,
4387        frdrh::Fer,
4388        frdrh::Fer,
4389        Frdrh_SPEC,
4390        crate::common::R,
4391    > {
4392        crate::common::RegisterField::<
4393            4,
4394            0x1,
4395            1,
4396            0,
4397            frdrh::Fer,
4398            frdrh::Fer,
4399            Frdrh_SPEC,
4400            crate::common::R,
4401        >::from_register(self, 0)
4402    }
4403
4404    #[doc = "Overrun Error Flag"]
4405    #[inline(always)]
4406    pub fn orer(
4407        self,
4408    ) -> crate::common::RegisterField<
4409        5,
4410        0x1,
4411        1,
4412        0,
4413        frdrh::Orer,
4414        frdrh::Orer,
4415        Frdrh_SPEC,
4416        crate::common::R,
4417    > {
4418        crate::common::RegisterField::<
4419            5,
4420            0x1,
4421            1,
4422            0,
4423            frdrh::Orer,
4424            frdrh::Orer,
4425            Frdrh_SPEC,
4426            crate::common::R,
4427        >::from_register(self, 0)
4428    }
4429
4430    #[doc = "Receive FIFO Data Full Flag"]
4431    #[inline(always)]
4432    pub fn rdf(
4433        self,
4434    ) -> crate::common::RegisterField<
4435        6,
4436        0x1,
4437        1,
4438        0,
4439        frdrh::Rdf,
4440        frdrh::Rdf,
4441        Frdrh_SPEC,
4442        crate::common::R,
4443    > {
4444        crate::common::RegisterField::<
4445            6,
4446            0x1,
4447            1,
4448            0,
4449            frdrh::Rdf,
4450            frdrh::Rdf,
4451            Frdrh_SPEC,
4452            crate::common::R,
4453        >::from_register(self, 0)
4454    }
4455}
4456impl ::core::default::Default for Frdrh {
4457    #[inline(always)]
4458    fn default() -> Frdrh {
4459        <crate::RegValueT<Frdrh_SPEC> as RegisterValue<_>>::new(0)
4460    }
4461}
4462pub mod frdrh {
4463
4464    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4465    pub struct Mpb_SPEC;
4466    pub type Mpb = crate::EnumBitfieldStruct<u8, Mpb_SPEC>;
4467    impl Mpb {
4468        #[doc = "Data transmission cycle"]
4469        pub const _0: Self = Self::new(0);
4470
4471        #[doc = "ID transmission cycle"]
4472        pub const _1: Self = Self::new(1);
4473    }
4474    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4475    pub struct Dr_SPEC;
4476    pub type Dr = crate::EnumBitfieldStruct<u8, Dr_SPEC>;
4477    impl Dr {
4478        #[doc = "Receiving is in progress, or no received data remains in the FRDRH and FRDRL registers after successfully completed reception"]
4479        pub const _0: Self = Self::new(0);
4480
4481        #[doc = "Next receive data is not received for a period after successfully completed reception"]
4482        pub const _1: Self = Self::new(1);
4483    }
4484    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4485    pub struct Per_SPEC;
4486    pub type Per = crate::EnumBitfieldStruct<u8, Per_SPEC>;
4487    impl Per {
4488        #[doc = "No parity error occurred in the first data of FRDRH and FRDRL"]
4489        pub const _0: Self = Self::new(0);
4490
4491        #[doc = "Parity error occurred in the first data of FRDRH and FRDRL"]
4492        pub const _1: Self = Self::new(1);
4493    }
4494    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4495    pub struct Fer_SPEC;
4496    pub type Fer = crate::EnumBitfieldStruct<u8, Fer_SPEC>;
4497    impl Fer {
4498        #[doc = "No framing error occurred in the first data of FRDRH and FRDRL"]
4499        pub const _0: Self = Self::new(0);
4500
4501        #[doc = "Framing error occurred in the first data of FRDRH and FRDRL"]
4502        pub const _1: Self = Self::new(1);
4503    }
4504    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4505    pub struct Orer_SPEC;
4506    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
4507    impl Orer {
4508        #[doc = "No overrun error occurred"]
4509        pub const _0: Self = Self::new(0);
4510
4511        #[doc = "Overrun error occurred"]
4512        pub const _1: Self = Self::new(1);
4513    }
4514    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4515    pub struct Rdf_SPEC;
4516    pub type Rdf = crate::EnumBitfieldStruct<u8, Rdf_SPEC>;
4517    impl Rdf {
4518        #[doc = "The amount of receive data written in FRDRH and FRDRL is less than the specified receive triggering number"]
4519        pub const _0: Self = Self::new(0);
4520
4521        #[doc = "The amount of receive data written in FRDRH and FRDRL is equal to or greater than the specified receive triggering number"]
4522        pub const _1: Self = Self::new(1);
4523    }
4524}
4525#[doc(hidden)]
4526#[derive(Copy, Clone, Eq, PartialEq)]
4527pub struct Frdrl_SPEC;
4528impl crate::sealed::RegSpec for Frdrl_SPEC {
4529    type DataType = u8;
4530}
4531
4532#[doc = "Receive FIFO Data Register"]
4533pub type Frdrl = crate::RegValueT<Frdrl_SPEC>;
4534
4535impl Frdrl {
4536    #[doc = "Serial receive data"]
4537    #[inline(always)]
4538    pub fn rdat(
4539        self,
4540    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Frdrl_SPEC, crate::common::R> {
4541        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Frdrl_SPEC,crate::common::R>::from_register(self,0)
4542    }
4543}
4544impl ::core::default::Default for Frdrl {
4545    #[inline(always)]
4546    fn default() -> Frdrl {
4547        <crate::RegValueT<Frdrl_SPEC> as RegisterValue<_>>::new(0)
4548    }
4549}
4550
4551#[doc(hidden)]
4552#[derive(Copy, Clone, Eq, PartialEq)]
4553pub struct Mddr_SPEC;
4554impl crate::sealed::RegSpec for Mddr_SPEC {
4555    type DataType = u8;
4556}
4557
4558#[doc = "Modulation Duty Register"]
4559pub type Mddr = crate::RegValueT<Mddr_SPEC>;
4560
4561impl NoBitfieldReg<Mddr_SPEC> for Mddr {}
4562impl ::core::default::Default for Mddr {
4563    #[inline(always)]
4564    fn default() -> Mddr {
4565        <crate::RegValueT<Mddr_SPEC> as RegisterValue<_>>::new(255)
4566    }
4567}
4568
4569#[doc(hidden)]
4570#[derive(Copy, Clone, Eq, PartialEq)]
4571pub struct Dccr_SPEC;
4572impl crate::sealed::RegSpec for Dccr_SPEC {
4573    type DataType = u8;
4574}
4575
4576#[doc = "Data Compare Match Control Register"]
4577pub type Dccr = crate::RegValueT<Dccr_SPEC>;
4578
4579impl Dccr {
4580    #[doc = "Data Compare Match Flag"]
4581    #[inline(always)]
4582    pub fn dcmf(
4583        self,
4584    ) -> crate::common::RegisterField<
4585        0,
4586        0x1,
4587        1,
4588        0,
4589        dccr::Dcmf,
4590        dccr::Dcmf,
4591        Dccr_SPEC,
4592        crate::common::RW,
4593    > {
4594        crate::common::RegisterField::<
4595            0,
4596            0x1,
4597            1,
4598            0,
4599            dccr::Dcmf,
4600            dccr::Dcmf,
4601            Dccr_SPEC,
4602            crate::common::RW,
4603        >::from_register(self, 0)
4604    }
4605
4606    #[doc = "Data Compare Match Parity Error Flag"]
4607    #[inline(always)]
4608    pub fn dper(
4609        self,
4610    ) -> crate::common::RegisterField<
4611        3,
4612        0x1,
4613        1,
4614        0,
4615        dccr::Dper,
4616        dccr::Dper,
4617        Dccr_SPEC,
4618        crate::common::RW,
4619    > {
4620        crate::common::RegisterField::<
4621            3,
4622            0x1,
4623            1,
4624            0,
4625            dccr::Dper,
4626            dccr::Dper,
4627            Dccr_SPEC,
4628            crate::common::RW,
4629        >::from_register(self, 0)
4630    }
4631
4632    #[doc = "Data Compare Match Framing Error Flag"]
4633    #[inline(always)]
4634    pub fn dfer(
4635        self,
4636    ) -> crate::common::RegisterField<
4637        4,
4638        0x1,
4639        1,
4640        0,
4641        dccr::Dfer,
4642        dccr::Dfer,
4643        Dccr_SPEC,
4644        crate::common::RW,
4645    > {
4646        crate::common::RegisterField::<
4647            4,
4648            0x1,
4649            1,
4650            0,
4651            dccr::Dfer,
4652            dccr::Dfer,
4653            Dccr_SPEC,
4654            crate::common::RW,
4655        >::from_register(self, 0)
4656    }
4657
4658    #[doc = "ID Frame Select"]
4659    #[inline(always)]
4660    pub fn idsel(
4661        self,
4662    ) -> crate::common::RegisterField<
4663        6,
4664        0x1,
4665        1,
4666        0,
4667        dccr::Idsel,
4668        dccr::Idsel,
4669        Dccr_SPEC,
4670        crate::common::RW,
4671    > {
4672        crate::common::RegisterField::<
4673            6,
4674            0x1,
4675            1,
4676            0,
4677            dccr::Idsel,
4678            dccr::Idsel,
4679            Dccr_SPEC,
4680            crate::common::RW,
4681        >::from_register(self, 0)
4682    }
4683
4684    #[doc = "Data Compare Match Enable"]
4685    #[inline(always)]
4686    pub fn dcme(
4687        self,
4688    ) -> crate::common::RegisterField<
4689        7,
4690        0x1,
4691        1,
4692        0,
4693        dccr::Dcme,
4694        dccr::Dcme,
4695        Dccr_SPEC,
4696        crate::common::RW,
4697    > {
4698        crate::common::RegisterField::<
4699            7,
4700            0x1,
4701            1,
4702            0,
4703            dccr::Dcme,
4704            dccr::Dcme,
4705            Dccr_SPEC,
4706            crate::common::RW,
4707        >::from_register(self, 0)
4708    }
4709}
4710impl ::core::default::Default for Dccr {
4711    #[inline(always)]
4712    fn default() -> Dccr {
4713        <crate::RegValueT<Dccr_SPEC> as RegisterValue<_>>::new(64)
4714    }
4715}
4716pub mod dccr {
4717
4718    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4719    pub struct Dcmf_SPEC;
4720    pub type Dcmf = crate::EnumBitfieldStruct<u8, Dcmf_SPEC>;
4721    impl Dcmf {
4722        #[doc = "Not matched"]
4723        pub const _0: Self = Self::new(0);
4724
4725        #[doc = "Matched"]
4726        pub const _1: Self = Self::new(1);
4727    }
4728    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4729    pub struct Dper_SPEC;
4730    pub type Dper = crate::EnumBitfieldStruct<u8, Dper_SPEC>;
4731    impl Dper {
4732        #[doc = "No parity error occurred"]
4733        pub const _0: Self = Self::new(0);
4734
4735        #[doc = "Parity error occurred"]
4736        pub const _1: Self = Self::new(1);
4737    }
4738    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4739    pub struct Dfer_SPEC;
4740    pub type Dfer = crate::EnumBitfieldStruct<u8, Dfer_SPEC>;
4741    impl Dfer {
4742        #[doc = "No framing error occurred"]
4743        pub const _0: Self = Self::new(0);
4744
4745        #[doc = "Framing error occurred"]
4746        pub const _1: Self = Self::new(1);
4747    }
4748    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4749    pub struct Idsel_SPEC;
4750    pub type Idsel = crate::EnumBitfieldStruct<u8, Idsel_SPEC>;
4751    impl Idsel {
4752        #[doc = "Always compare data regardless of the MPB bit value"]
4753        pub const _0: Self = Self::new(0);
4754
4755        #[doc = "Only compare data when MPB bit = 1 (ID frame)"]
4756        pub const _1: Self = Self::new(1);
4757    }
4758    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4759    pub struct Dcme_SPEC;
4760    pub type Dcme = crate::EnumBitfieldStruct<u8, Dcme_SPEC>;
4761    impl Dcme {
4762        #[doc = "Disable address match function"]
4763        pub const _0: Self = Self::new(0);
4764
4765        #[doc = "Enable address match function"]
4766        pub const _1: Self = Self::new(1);
4767    }
4768}
4769#[doc(hidden)]
4770#[derive(Copy, Clone, Eq, PartialEq)]
4771pub struct Fcr_SPEC;
4772impl crate::sealed::RegSpec for Fcr_SPEC {
4773    type DataType = u16;
4774}
4775
4776#[doc = "FIFO Control Register"]
4777pub type Fcr = crate::RegValueT<Fcr_SPEC>;
4778
4779impl Fcr {
4780    #[doc = "FIFO Mode Select"]
4781    #[inline(always)]
4782    pub fn fm(
4783        self,
4784    ) -> crate::common::RegisterField<0, 0x1, 1, 0, fcr::Fm, fcr::Fm, Fcr_SPEC, crate::common::RW>
4785    {
4786        crate::common::RegisterField::<0,0x1,1,0,fcr::Fm,fcr::Fm,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4787    }
4788
4789    #[doc = "Receive FIFO Data Register Reset"]
4790    #[inline(always)]
4791    pub fn rfrst(
4792        self,
4793    ) -> crate::common::RegisterField<
4794        1,
4795        0x1,
4796        1,
4797        0,
4798        fcr::Rfrst,
4799        fcr::Rfrst,
4800        Fcr_SPEC,
4801        crate::common::RW,
4802    > {
4803        crate::common::RegisterField::<
4804            1,
4805            0x1,
4806            1,
4807            0,
4808            fcr::Rfrst,
4809            fcr::Rfrst,
4810            Fcr_SPEC,
4811            crate::common::RW,
4812        >::from_register(self, 0)
4813    }
4814
4815    #[doc = "Transmit FIFO Data Register Reset"]
4816    #[inline(always)]
4817    pub fn tfrst(
4818        self,
4819    ) -> crate::common::RegisterField<
4820        2,
4821        0x1,
4822        1,
4823        0,
4824        fcr::Tfrst,
4825        fcr::Tfrst,
4826        Fcr_SPEC,
4827        crate::common::RW,
4828    > {
4829        crate::common::RegisterField::<
4830            2,
4831            0x1,
4832            1,
4833            0,
4834            fcr::Tfrst,
4835            fcr::Tfrst,
4836            Fcr_SPEC,
4837            crate::common::RW,
4838        >::from_register(self, 0)
4839    }
4840
4841    #[doc = "Receive Data Ready Error Select"]
4842    #[inline(always)]
4843    pub fn dres(
4844        self,
4845    ) -> crate::common::RegisterField<3, 0x1, 1, 0, fcr::Dres, fcr::Dres, Fcr_SPEC, crate::common::RW>
4846    {
4847        crate::common::RegisterField::<
4848            3,
4849            0x1,
4850            1,
4851            0,
4852            fcr::Dres,
4853            fcr::Dres,
4854            Fcr_SPEC,
4855            crate::common::RW,
4856        >::from_register(self, 0)
4857    }
4858
4859    #[doc = "Transmit FIFO Data Trigger Number"]
4860    #[inline(always)]
4861    pub fn ttrg(
4862        self,
4863    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4864        crate::common::RegisterField::<4,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4865    }
4866
4867    #[doc = "Receive FIFO Data Trigger Number"]
4868    #[inline(always)]
4869    pub fn rtrg(
4870        self,
4871    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4872        crate::common::RegisterField::<8,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4873    }
4874
4875    #[doc = "RTS Output Active Trigger Number Select"]
4876    #[inline(always)]
4877    pub fn rstrg(
4878        self,
4879    ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, Fcr_SPEC, crate::common::RW> {
4880        crate::common::RegisterField::<12,0xf,1,0,u8,u8,Fcr_SPEC,crate::common::RW>::from_register(self,0)
4881    }
4882}
4883impl ::core::default::Default for Fcr {
4884    #[inline(always)]
4885    fn default() -> Fcr {
4886        <crate::RegValueT<Fcr_SPEC> as RegisterValue<_>>::new(63488)
4887    }
4888}
4889pub mod fcr {
4890
4891    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4892    pub struct Fm_SPEC;
4893    pub type Fm = crate::EnumBitfieldStruct<u8, Fm_SPEC>;
4894    impl Fm {
4895        #[doc = "Non-FIFO mode. Selects TDR/RDR or TDRHL/RDRHL for communication."]
4896        pub const _0: Self = Self::new(0);
4897
4898        #[doc = "FIFO mode. Selects FTDRHL/FRDRHL for communication."]
4899        pub const _1: Self = Self::new(1);
4900    }
4901    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4902    pub struct Rfrst_SPEC;
4903    pub type Rfrst = crate::EnumBitfieldStruct<u8, Rfrst_SPEC>;
4904    impl Rfrst {
4905        #[doc = "Do not reset FRDRHL"]
4906        pub const _0: Self = Self::new(0);
4907
4908        #[doc = "Reset FRDRHL"]
4909        pub const _1: Self = Self::new(1);
4910    }
4911    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4912    pub struct Tfrst_SPEC;
4913    pub type Tfrst = crate::EnumBitfieldStruct<u8, Tfrst_SPEC>;
4914    impl Tfrst {
4915        #[doc = "Do not reset FTDRHL"]
4916        pub const _0: Self = Self::new(0);
4917
4918        #[doc = "Reset FTDRHL"]
4919        pub const _1: Self = Self::new(1);
4920    }
4921    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4922    pub struct Dres_SPEC;
4923    pub type Dres = crate::EnumBitfieldStruct<u8, Dres_SPEC>;
4924    impl Dres {
4925        #[doc = "Receive data full interrupt (SCIn_RXI)"]
4926        pub const _0: Self = Self::new(0);
4927
4928        #[doc = "Receive error interrupt (SCIn_ERI)"]
4929        pub const _1: Self = Self::new(1);
4930    }
4931}
4932#[doc(hidden)]
4933#[derive(Copy, Clone, Eq, PartialEq)]
4934pub struct Fdr_SPEC;
4935impl crate::sealed::RegSpec for Fdr_SPEC {
4936    type DataType = u16;
4937}
4938
4939#[doc = "FIFO Data Count Register"]
4940pub type Fdr = crate::RegValueT<Fdr_SPEC>;
4941
4942impl Fdr {
4943    #[doc = "Receive FIFO Data Count"]
4944    #[inline(always)]
4945    pub fn r(
4946        self,
4947    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Fdr_SPEC, crate::common::R> {
4948        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Fdr_SPEC,crate::common::R>::from_register(self,0)
4949    }
4950
4951    #[doc = "Transmit FIFO Data Count"]
4952    #[inline(always)]
4953    pub fn t(
4954        self,
4955    ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Fdr_SPEC, crate::common::R> {
4956        crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Fdr_SPEC,crate::common::R>::from_register(self,0)
4957    }
4958}
4959impl ::core::default::Default for Fdr {
4960    #[inline(always)]
4961    fn default() -> Fdr {
4962        <crate::RegValueT<Fdr_SPEC> as RegisterValue<_>>::new(0)
4963    }
4964}
4965
4966#[doc(hidden)]
4967#[derive(Copy, Clone, Eq, PartialEq)]
4968pub struct Lsr_SPEC;
4969impl crate::sealed::RegSpec for Lsr_SPEC {
4970    type DataType = u16;
4971}
4972
4973#[doc = "Line Status Register"]
4974pub type Lsr = crate::RegValueT<Lsr_SPEC>;
4975
4976impl Lsr {
4977    #[doc = "Overrun Error Flag"]
4978    #[inline(always)]
4979    pub fn orer(
4980        self,
4981    ) -> crate::common::RegisterField<0, 0x1, 1, 0, lsr::Orer, lsr::Orer, Lsr_SPEC, crate::common::R>
4982    {
4983        crate::common::RegisterField::<0,0x1,1,0,lsr::Orer,lsr::Orer,Lsr_SPEC,crate::common::R>::from_register(self,0)
4984    }
4985
4986    #[doc = "Framing Error Count"]
4987    #[inline(always)]
4988    pub fn fnum(
4989        self,
4990    ) -> crate::common::RegisterField<2, 0x1f, 1, 0, u8, u8, Lsr_SPEC, crate::common::R> {
4991        crate::common::RegisterField::<2,0x1f,1,0,u8,u8,Lsr_SPEC,crate::common::R>::from_register(self,0)
4992    }
4993
4994    #[doc = "Parity Error Count"]
4995    #[inline(always)]
4996    pub fn pnum(
4997        self,
4998    ) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Lsr_SPEC, crate::common::R> {
4999        crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Lsr_SPEC,crate::common::R>::from_register(self,0)
5000    }
5001}
5002impl ::core::default::Default for Lsr {
5003    #[inline(always)]
5004    fn default() -> Lsr {
5005        <crate::RegValueT<Lsr_SPEC> as RegisterValue<_>>::new(0)
5006    }
5007}
5008pub mod lsr {
5009
5010    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5011    pub struct Orer_SPEC;
5012    pub type Orer = crate::EnumBitfieldStruct<u8, Orer_SPEC>;
5013    impl Orer {
5014        #[doc = "No overrun error occurred"]
5015        pub const _0: Self = Self::new(0);
5016
5017        #[doc = "Overrun error occurred"]
5018        pub const _1: Self = Self::new(1);
5019    }
5020}
5021#[doc(hidden)]
5022#[derive(Copy, Clone, Eq, PartialEq)]
5023pub struct Cdr_SPEC;
5024impl crate::sealed::RegSpec for Cdr_SPEC {
5025    type DataType = u16;
5026}
5027
5028#[doc = "Compare Match Data Register"]
5029pub type Cdr = crate::RegValueT<Cdr_SPEC>;
5030
5031impl Cdr {
5032    #[doc = "Compare Match Data"]
5033    #[inline(always)]
5034    pub fn cmpd(
5035        self,
5036    ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, u16, Cdr_SPEC, crate::common::RW> {
5037        crate::common::RegisterField::<0,0x1ff,1,0,u16,u16,Cdr_SPEC,crate::common::RW>::from_register(self,0)
5038    }
5039}
5040impl ::core::default::Default for Cdr {
5041    #[inline(always)]
5042    fn default() -> Cdr {
5043        <crate::RegValueT<Cdr_SPEC> as RegisterValue<_>>::new(0)
5044    }
5045}
5046
5047#[doc(hidden)]
5048#[derive(Copy, Clone, Eq, PartialEq)]
5049pub struct Sptr_SPEC;
5050impl crate::sealed::RegSpec for Sptr_SPEC {
5051    type DataType = u8;
5052}
5053
5054#[doc = "Serial Port Register"]
5055pub type Sptr = crate::RegValueT<Sptr_SPEC>;
5056
5057impl Sptr {
5058    #[doc = "Serial Input Data Monitor"]
5059    #[inline(always)]
5060    pub fn rxdmon(
5061        self,
5062    ) -> crate::common::RegisterField<
5063        0,
5064        0x1,
5065        1,
5066        0,
5067        sptr::Rxdmon,
5068        sptr::Rxdmon,
5069        Sptr_SPEC,
5070        crate::common::R,
5071    > {
5072        crate::common::RegisterField::<
5073            0,
5074            0x1,
5075            1,
5076            0,
5077            sptr::Rxdmon,
5078            sptr::Rxdmon,
5079            Sptr_SPEC,
5080            crate::common::R,
5081        >::from_register(self, 0)
5082    }
5083
5084    #[doc = "Serial Port Break Data Select"]
5085    #[inline(always)]
5086    pub fn spb2dt(
5087        self,
5088    ) -> crate::common::RegisterField<
5089        1,
5090        0x1,
5091        1,
5092        0,
5093        sptr::Spb2Dt,
5094        sptr::Spb2Dt,
5095        Sptr_SPEC,
5096        crate::common::RW,
5097    > {
5098        crate::common::RegisterField::<
5099            1,
5100            0x1,
5101            1,
5102            0,
5103            sptr::Spb2Dt,
5104            sptr::Spb2Dt,
5105            Sptr_SPEC,
5106            crate::common::RW,
5107        >::from_register(self, 0)
5108    }
5109
5110    #[doc = "Serial Port Break I/O"]
5111    #[inline(always)]
5112    pub fn spb2io(
5113        self,
5114    ) -> crate::common::RegisterField<
5115        2,
5116        0x1,
5117        1,
5118        0,
5119        sptr::Spb2Io,
5120        sptr::Spb2Io,
5121        Sptr_SPEC,
5122        crate::common::RW,
5123    > {
5124        crate::common::RegisterField::<
5125            2,
5126            0x1,
5127            1,
5128            0,
5129            sptr::Spb2Io,
5130            sptr::Spb2Io,
5131            Sptr_SPEC,
5132            crate::common::RW,
5133        >::from_register(self, 0)
5134    }
5135
5136    #[doc = "RXD invert bit"]
5137    #[inline(always)]
5138    pub fn rinv(
5139        self,
5140    ) -> crate::common::RegisterField<
5141        4,
5142        0x1,
5143        1,
5144        0,
5145        sptr::Rinv,
5146        sptr::Rinv,
5147        Sptr_SPEC,
5148        crate::common::RW,
5149    > {
5150        crate::common::RegisterField::<
5151            4,
5152            0x1,
5153            1,
5154            0,
5155            sptr::Rinv,
5156            sptr::Rinv,
5157            Sptr_SPEC,
5158            crate::common::RW,
5159        >::from_register(self, 0)
5160    }
5161
5162    #[doc = "TXD invert bit"]
5163    #[inline(always)]
5164    pub fn tinv(
5165        self,
5166    ) -> crate::common::RegisterField<
5167        5,
5168        0x1,
5169        1,
5170        0,
5171        sptr::Tinv,
5172        sptr::Tinv,
5173        Sptr_SPEC,
5174        crate::common::RW,
5175    > {
5176        crate::common::RegisterField::<
5177            5,
5178            0x1,
5179            1,
5180            0,
5181            sptr::Tinv,
5182            sptr::Tinv,
5183            Sptr_SPEC,
5184            crate::common::RW,
5185        >::from_register(self, 0)
5186    }
5187
5188    #[doc = "Adjust receive sampling timing enable"]
5189    #[inline(always)]
5190    pub fn asen(
5191        self,
5192    ) -> crate::common::RegisterField<
5193        6,
5194        0x1,
5195        1,
5196        0,
5197        sptr::Asen,
5198        sptr::Asen,
5199        Sptr_SPEC,
5200        crate::common::RW,
5201    > {
5202        crate::common::RegisterField::<
5203            6,
5204            0x1,
5205            1,
5206            0,
5207            sptr::Asen,
5208            sptr::Asen,
5209            Sptr_SPEC,
5210            crate::common::RW,
5211        >::from_register(self, 0)
5212    }
5213
5214    #[doc = "Adjust transmit timing enable"]
5215    #[inline(always)]
5216    pub fn aten(
5217        self,
5218    ) -> crate::common::RegisterField<
5219        7,
5220        0x1,
5221        1,
5222        0,
5223        sptr::Aten,
5224        sptr::Aten,
5225        Sptr_SPEC,
5226        crate::common::RW,
5227    > {
5228        crate::common::RegisterField::<
5229            7,
5230            0x1,
5231            1,
5232            0,
5233            sptr::Aten,
5234            sptr::Aten,
5235            Sptr_SPEC,
5236            crate::common::RW,
5237        >::from_register(self, 0)
5238    }
5239}
5240impl ::core::default::Default for Sptr {
5241    #[inline(always)]
5242    fn default() -> Sptr {
5243        <crate::RegValueT<Sptr_SPEC> as RegisterValue<_>>::new(3)
5244    }
5245}
5246pub mod sptr {
5247
5248    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5249    pub struct Rxdmon_SPEC;
5250    pub type Rxdmon = crate::EnumBitfieldStruct<u8, Rxdmon_SPEC>;
5251    impl Rxdmon {
5252        #[doc = "When RINV is 0, RXDn terminal is the low level. When RINV is 1, RXDn terminal is the High level."]
5253        pub const _0: Self = Self::new(0);
5254
5255        #[doc = "When RINV is 0, RXDn terminal is the High level. When RINV is 1, RXDn terminal is the Low level."]
5256        pub const _1: Self = Self::new(1);
5257    }
5258    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5259    pub struct Spb2Dt_SPEC;
5260    pub type Spb2Dt = crate::EnumBitfieldStruct<u8, Spb2Dt_SPEC>;
5261    impl Spb2Dt {
5262        #[doc = "When TINV is 0, Low level is output in TXDn terminal. When TINV is 1, High level is output in TXDn terminal."]
5263        pub const _0: Self = Self::new(0);
5264
5265        #[doc = "When TINV is 0, High level is output in TXDn terminal. When TINV is 1, Low level is output in TXDn terminal."]
5266        pub const _1: Self = Self::new(1);
5267    }
5268    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5269    pub struct Spb2Io_SPEC;
5270    pub type Spb2Io = crate::EnumBitfieldStruct<u8, Spb2Io_SPEC>;
5271    impl Spb2Io {
5272        #[doc = "Do not output value of SPB2DT bit on TXDn pin"]
5273        pub const _0: Self = Self::new(0);
5274
5275        #[doc = "Output value of SPB2DT bit on TXDn pin"]
5276        pub const _1: Self = Self::new(1);
5277    }
5278    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5279    pub struct Rinv_SPEC;
5280    pub type Rinv = crate::EnumBitfieldStruct<u8, Rinv_SPEC>;
5281    impl Rinv {
5282        #[doc = "Received data from RXDn is not inverted and input."]
5283        pub const _0: Self = Self::new(0);
5284
5285        #[doc = "Received data from RXDn is inverted and input."]
5286        pub const _1: Self = Self::new(1);
5287    }
5288    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5289    pub struct Tinv_SPEC;
5290    pub type Tinv = crate::EnumBitfieldStruct<u8, Tinv_SPEC>;
5291    impl Tinv {
5292        #[doc = "Transmit data is not inverted and output to TXDn."]
5293        pub const _0: Self = Self::new(0);
5294
5295        #[doc = "Transmit data is inverted and output to TXDn."]
5296        pub const _1: Self = Self::new(1);
5297    }
5298    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5299    pub struct Asen_SPEC;
5300    pub type Asen = crate::EnumBitfieldStruct<u8, Asen_SPEC>;
5301    impl Asen {
5302        #[doc = "Adjust sampling timing disable."]
5303        pub const _0: Self = Self::new(0);
5304
5305        #[doc = "Adjust sampling timing enable."]
5306        pub const _1: Self = Self::new(1);
5307    }
5308    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5309    pub struct Aten_SPEC;
5310    pub type Aten = crate::EnumBitfieldStruct<u8, Aten_SPEC>;
5311    impl Aten {
5312        #[doc = "Adjust transmit timing disable."]
5313        pub const _0: Self = Self::new(0);
5314
5315        #[doc = "Adjust transmit timing enable."]
5316        pub const _1: Self = Self::new(1);
5317    }
5318}
5319#[doc(hidden)]
5320#[derive(Copy, Clone, Eq, PartialEq)]
5321pub struct Actr_SPEC;
5322impl crate::sealed::RegSpec for Actr_SPEC {
5323    type DataType = u8;
5324}
5325
5326#[doc = "Adjustment Communication Timing Register"]
5327pub type Actr = crate::RegValueT<Actr_SPEC>;
5328
5329impl Actr {
5330    #[doc = "Adjustment value for receive Sampling Timing"]
5331    #[inline(always)]
5332    pub fn ast(
5333        self,
5334    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, Actr_SPEC, crate::common::RW> {
5335        crate::common::RegisterField::<0,0x7,1,0,u8,u8,Actr_SPEC,crate::common::RW>::from_register(self,0)
5336    }
5337
5338    #[doc = "Adjustment Direction for receive sampling timing"]
5339    #[inline(always)]
5340    pub fn ajd(
5341        self,
5342    ) -> crate::common::RegisterField<
5343        3,
5344        0x1,
5345        1,
5346        0,
5347        actr::Ajd,
5348        actr::Ajd,
5349        Actr_SPEC,
5350        crate::common::RW,
5351    > {
5352        crate::common::RegisterField::<
5353            3,
5354            0x1,
5355            1,
5356            0,
5357            actr::Ajd,
5358            actr::Ajd,
5359            Actr_SPEC,
5360            crate::common::RW,
5361        >::from_register(self, 0)
5362    }
5363
5364    #[doc = "Adjustment value for Transmit timing"]
5365    #[inline(always)]
5366    pub fn att(
5367        self,
5368    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Actr_SPEC, crate::common::RW> {
5369        crate::common::RegisterField::<4,0x7,1,0,u8,u8,Actr_SPEC,crate::common::RW>::from_register(self,0)
5370    }
5371
5372    #[doc = "Adjustment edge for transmit timing"]
5373    #[inline(always)]
5374    pub fn aet(
5375        self,
5376    ) -> crate::common::RegisterField<
5377        7,
5378        0x1,
5379        1,
5380        0,
5381        actr::Aet,
5382        actr::Aet,
5383        Actr_SPEC,
5384        crate::common::RW,
5385    > {
5386        crate::common::RegisterField::<
5387            7,
5388            0x1,
5389            1,
5390            0,
5391            actr::Aet,
5392            actr::Aet,
5393            Actr_SPEC,
5394            crate::common::RW,
5395        >::from_register(self, 0)
5396    }
5397}
5398impl ::core::default::Default for Actr {
5399    #[inline(always)]
5400    fn default() -> Actr {
5401        <crate::RegValueT<Actr_SPEC> as RegisterValue<_>>::new(0)
5402    }
5403}
5404pub mod actr {
5405
5406    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5407    pub struct Ajd_SPEC;
5408    pub type Ajd = crate::EnumBitfieldStruct<u8, Ajd_SPEC>;
5409    impl Ajd {
5410        #[doc = "The sampling timing is adjusted backward to the middle of bit."]
5411        pub const _0: Self = Self::new(0);
5412
5413        #[doc = "The sampling timing is adjusted forward to the middle of bit."]
5414        pub const _1: Self = Self::new(1);
5415    }
5416    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5417    pub struct Aet_SPEC;
5418    pub type Aet = crate::EnumBitfieldStruct<u8, Aet_SPEC>;
5419    impl Aet {
5420        #[doc = "Adjust the rising edge timing."]
5421        pub const _0: Self = Self::new(0);
5422
5423        #[doc = "Adjust the falling edge timing."]
5424        pub const _1: Self = Self::new(1);
5425    }
5426}
5427#[doc(hidden)]
5428#[derive(Copy, Clone, Eq, PartialEq)]
5429pub struct Mmr_SPEC;
5430impl crate::sealed::RegSpec for Mmr_SPEC {
5431    type DataType = u8;
5432}
5433
5434#[doc = "Manchester Mode Register"]
5435pub type Mmr = crate::RegValueT<Mmr_SPEC>;
5436
5437impl Mmr {
5438    #[doc = "Polarity of Received Manchester Code"]
5439    #[inline(always)]
5440    pub fn rmpol(
5441        self,
5442    ) -> crate::common::RegisterField<
5443        0,
5444        0x1,
5445        1,
5446        0,
5447        mmr::Rmpol,
5448        mmr::Rmpol,
5449        Mmr_SPEC,
5450        crate::common::RW,
5451    > {
5452        crate::common::RegisterField::<
5453            0,
5454            0x1,
5455            1,
5456            0,
5457            mmr::Rmpol,
5458            mmr::Rmpol,
5459            Mmr_SPEC,
5460            crate::common::RW,
5461        >::from_register(self, 0)
5462    }
5463
5464    #[doc = "Polarity of Transmit Manchester Code"]
5465    #[inline(always)]
5466    pub fn tmpol(
5467        self,
5468    ) -> crate::common::RegisterField<
5469        1,
5470        0x1,
5471        1,
5472        0,
5473        mmr::Tmpol,
5474        mmr::Tmpol,
5475        Mmr_SPEC,
5476        crate::common::RW,
5477    > {
5478        crate::common::RegisterField::<
5479            1,
5480            0x1,
5481            1,
5482            0,
5483            mmr::Tmpol,
5484            mmr::Tmpol,
5485            Mmr_SPEC,
5486            crate::common::RW,
5487        >::from_register(self, 0)
5488    }
5489
5490    #[doc = "Manchester Edge Retiming Enable"]
5491    #[inline(always)]
5492    pub fn erten(
5493        self,
5494    ) -> crate::common::RegisterField<
5495        2,
5496        0x1,
5497        1,
5498        0,
5499        mmr::Erten,
5500        mmr::Erten,
5501        Mmr_SPEC,
5502        crate::common::RW,
5503    > {
5504        crate::common::RegisterField::<
5505            2,
5506            0x1,
5507            1,
5508            0,
5509            mmr::Erten,
5510            mmr::Erten,
5511            Mmr_SPEC,
5512            crate::common::RW,
5513        >::from_register(self, 0)
5514    }
5515
5516    #[doc = "SYNC value Setting"]
5517    #[inline(always)]
5518    pub fn synval(
5519        self,
5520    ) -> crate::common::RegisterField<
5521        4,
5522        0x1,
5523        1,
5524        0,
5525        mmr::Synval,
5526        mmr::Synval,
5527        Mmr_SPEC,
5528        crate::common::RW,
5529    > {
5530        crate::common::RegisterField::<
5531            4,
5532            0x1,
5533            1,
5534            0,
5535            mmr::Synval,
5536            mmr::Synval,
5537            Mmr_SPEC,
5538            crate::common::RW,
5539        >::from_register(self, 0)
5540    }
5541
5542    #[doc = "SYNC Select"]
5543    #[inline(always)]
5544    pub fn synsel(
5545        self,
5546    ) -> crate::common::RegisterField<
5547        5,
5548        0x1,
5549        1,
5550        0,
5551        mmr::Synsel,
5552        mmr::Synsel,
5553        Mmr_SPEC,
5554        crate::common::RW,
5555    > {
5556        crate::common::RegisterField::<
5557            5,
5558            0x1,
5559            1,
5560            0,
5561            mmr::Synsel,
5562            mmr::Synsel,
5563            Mmr_SPEC,
5564            crate::common::RW,
5565        >::from_register(self, 0)
5566    }
5567
5568    #[doc = "Start Bit Select"]
5569    #[inline(always)]
5570    pub fn sbsel(
5571        self,
5572    ) -> crate::common::RegisterField<
5573        6,
5574        0x1,
5575        1,
5576        0,
5577        mmr::Sbsel,
5578        mmr::Sbsel,
5579        Mmr_SPEC,
5580        crate::common::RW,
5581    > {
5582        crate::common::RegisterField::<
5583            6,
5584            0x1,
5585            1,
5586            0,
5587            mmr::Sbsel,
5588            mmr::Sbsel,
5589            Mmr_SPEC,
5590            crate::common::RW,
5591        >::from_register(self, 0)
5592    }
5593
5594    #[doc = "Manchester Mode Enable"]
5595    #[inline(always)]
5596    pub fn manen(
5597        self,
5598    ) -> crate::common::RegisterField<
5599        7,
5600        0x1,
5601        1,
5602        0,
5603        mmr::Manen,
5604        mmr::Manen,
5605        Mmr_SPEC,
5606        crate::common::RW,
5607    > {
5608        crate::common::RegisterField::<
5609            7,
5610            0x1,
5611            1,
5612            0,
5613            mmr::Manen,
5614            mmr::Manen,
5615            Mmr_SPEC,
5616            crate::common::RW,
5617        >::from_register(self, 0)
5618    }
5619}
5620impl ::core::default::Default for Mmr {
5621    #[inline(always)]
5622    fn default() -> Mmr {
5623        <crate::RegValueT<Mmr_SPEC> as RegisterValue<_>>::new(0)
5624    }
5625}
5626pub mod mmr {
5627
5628    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5629    pub struct Rmpol_SPEC;
5630    pub type Rmpol = crate::EnumBitfieldStruct<u8, Rmpol_SPEC>;
5631    impl Rmpol {
5632        #[doc = "Logic 0 is coded as a zero-to-one transition in Manchester code Logic 1 is coded as a one-to-zero transition in Manchester code"]
5633        pub const _0: Self = Self::new(0);
5634
5635        #[doc = "Logic 0 is coded as a one-to-zero transition in Manchester code Logic 1 is coded as a zero-to-one transition in Manchester code"]
5636        pub const _1: Self = Self::new(1);
5637    }
5638    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5639    pub struct Tmpol_SPEC;
5640    pub type Tmpol = crate::EnumBitfieldStruct<u8, Tmpol_SPEC>;
5641    impl Tmpol {
5642        #[doc = "Logic 0 is coded as a zero-to-one transition in Manchester code Logic 1 is coded as a one-to-zero transition in Manchester code"]
5643        pub const _0: Self = Self::new(0);
5644
5645        #[doc = "Logic 0 is coded as a one-to-zero transition in Manchester code Logic 1 is coded as a zero-to-one transition in Manchester code"]
5646        pub const _1: Self = Self::new(1);
5647    }
5648    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5649    pub struct Erten_SPEC;
5650    pub type Erten = crate::EnumBitfieldStruct<u8, Erten_SPEC>;
5651    impl Erten {
5652        #[doc = "Disables the receive retiming function"]
5653        pub const _0: Self = Self::new(0);
5654
5655        #[doc = "Enables the receive retiming function"]
5656        pub const _1: Self = Self::new(1);
5657    }
5658    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5659    pub struct Synval_SPEC;
5660    pub type Synval = crate::EnumBitfieldStruct<u8, Synval_SPEC>;
5661    impl Synval {
5662        #[doc = "The start bit is added as a zero-to-one transition."]
5663        pub const _0: Self = Self::new(0);
5664
5665        #[doc = "The start bit is added as a one-to-zero transition."]
5666        pub const _1: Self = Self::new(1);
5667    }
5668    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5669    pub struct Synsel_SPEC;
5670    pub type Synsel = crate::EnumBitfieldStruct<u8, Synsel_SPEC>;
5671    impl Synsel {
5672        #[doc = "The start bit pattern is set with the SYNVAL bit"]
5673        pub const _0: Self = Self::new(0);
5674
5675        #[doc = "The start bit pattern is set with the TSYNC bit."]
5676        pub const _1: Self = Self::new(1);
5677    }
5678    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5679    pub struct Sbsel_SPEC;
5680    pub type Sbsel = crate::EnumBitfieldStruct<u8, Sbsel_SPEC>;
5681    impl Sbsel {
5682        #[doc = "The start bit area consists of one bit."]
5683        pub const _0: Self = Self::new(0);
5684
5685        #[doc = "The start bit area consists of three bits (COMMAND SYNC or DATA SYNC)"]
5686        pub const _1: Self = Self::new(1);
5687    }
5688    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5689    pub struct Manen_SPEC;
5690    pub type Manen = crate::EnumBitfieldStruct<u8, Manen_SPEC>;
5691    impl Manen {
5692        #[doc = "Disables the Manchester mode"]
5693        pub const _0: Self = Self::new(0);
5694
5695        #[doc = "Enables the Manchester mode"]
5696        pub const _1: Self = Self::new(1);
5697    }
5698}
5699#[doc(hidden)]
5700#[derive(Copy, Clone, Eq, PartialEq)]
5701pub struct Tmpr_SPEC;
5702impl crate::sealed::RegSpec for Tmpr_SPEC {
5703    type DataType = u8;
5704}
5705
5706#[doc = "Transmit Manchester Preface Setting Register"]
5707pub type Tmpr = crate::RegValueT<Tmpr_SPEC>;
5708
5709impl Tmpr {
5710    #[doc = "Transmit preface length"]
5711    #[inline(always)]
5712    pub fn tplen(
5713        self,
5714    ) -> crate::common::RegisterField<
5715        0,
5716        0xf,
5717        1,
5718        0,
5719        tmpr::Tplen,
5720        tmpr::Tplen,
5721        Tmpr_SPEC,
5722        crate::common::RW,
5723    > {
5724        crate::common::RegisterField::<
5725            0,
5726            0xf,
5727            1,
5728            0,
5729            tmpr::Tplen,
5730            tmpr::Tplen,
5731            Tmpr_SPEC,
5732            crate::common::RW,
5733        >::from_register(self, 0)
5734    }
5735
5736    #[doc = "Transmit preface pattern"]
5737    #[inline(always)]
5738    pub fn tppat(
5739        self,
5740    ) -> crate::common::RegisterField<
5741        4,
5742        0x3,
5743        1,
5744        0,
5745        tmpr::Tppat,
5746        tmpr::Tppat,
5747        Tmpr_SPEC,
5748        crate::common::RW,
5749    > {
5750        crate::common::RegisterField::<
5751            4,
5752            0x3,
5753            1,
5754            0,
5755            tmpr::Tppat,
5756            tmpr::Tppat,
5757            Tmpr_SPEC,
5758            crate::common::RW,
5759        >::from_register(self, 0)
5760    }
5761}
5762impl ::core::default::Default for Tmpr {
5763    #[inline(always)]
5764    fn default() -> Tmpr {
5765        <crate::RegValueT<Tmpr_SPEC> as RegisterValue<_>>::new(0)
5766    }
5767}
5768pub mod tmpr {
5769
5770    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5771    pub struct Tplen_SPEC;
5772    pub type Tplen = crate::EnumBitfieldStruct<u8, Tplen_SPEC>;
5773    impl Tplen {
5774        #[doc = "Disables the transmit preface generation"]
5775        pub const _0_X_0: Self = Self::new(0);
5776
5777        #[doc = "Transmit preface length (bit length)"]
5778        pub const OTHERS: Self = Self::new(0);
5779    }
5780    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5781    pub struct Tppat_SPEC;
5782    pub type Tppat = crate::EnumBitfieldStruct<u8, Tppat_SPEC>;
5783    impl Tppat {
5784        #[doc = "ALL ZERO"]
5785        pub const _00: Self = Self::new(0);
5786
5787        #[doc = "ZERO ONE"]
5788        pub const _01: Self = Self::new(1);
5789
5790        #[doc = "ONE ZERO"]
5791        pub const _10: Self = Self::new(2);
5792
5793        #[doc = "ALL ONE"]
5794        pub const _11: Self = Self::new(3);
5795    }
5796}
5797#[doc(hidden)]
5798#[derive(Copy, Clone, Eq, PartialEq)]
5799pub struct Rmpr_SPEC;
5800impl crate::sealed::RegSpec for Rmpr_SPEC {
5801    type DataType = u8;
5802}
5803
5804#[doc = "Receive Manchester Preface Setting Register"]
5805pub type Rmpr = crate::RegValueT<Rmpr_SPEC>;
5806
5807impl Rmpr {
5808    #[doc = "Receive Preface Length"]
5809    #[inline(always)]
5810    pub fn rplen(
5811        self,
5812    ) -> crate::common::RegisterField<
5813        0,
5814        0xf,
5815        1,
5816        0,
5817        rmpr::Rplen,
5818        rmpr::Rplen,
5819        Rmpr_SPEC,
5820        crate::common::RW,
5821    > {
5822        crate::common::RegisterField::<
5823            0,
5824            0xf,
5825            1,
5826            0,
5827            rmpr::Rplen,
5828            rmpr::Rplen,
5829            Rmpr_SPEC,
5830            crate::common::RW,
5831        >::from_register(self, 0)
5832    }
5833
5834    #[doc = "Receive Preface Pattern"]
5835    #[inline(always)]
5836    pub fn rppat(
5837        self,
5838    ) -> crate::common::RegisterField<
5839        4,
5840        0x3,
5841        1,
5842        0,
5843        rmpr::Rppat,
5844        rmpr::Rppat,
5845        Rmpr_SPEC,
5846        crate::common::RW,
5847    > {
5848        crate::common::RegisterField::<
5849            4,
5850            0x3,
5851            1,
5852            0,
5853            rmpr::Rppat,
5854            rmpr::Rppat,
5855            Rmpr_SPEC,
5856            crate::common::RW,
5857        >::from_register(self, 0)
5858    }
5859}
5860impl ::core::default::Default for Rmpr {
5861    #[inline(always)]
5862    fn default() -> Rmpr {
5863        <crate::RegValueT<Rmpr_SPEC> as RegisterValue<_>>::new(0)
5864    }
5865}
5866pub mod rmpr {
5867
5868    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5869    pub struct Rplen_SPEC;
5870    pub type Rplen = crate::EnumBitfieldStruct<u8, Rplen_SPEC>;
5871    impl Rplen {
5872        #[doc = "Disables the receive preface generation"]
5873        pub const _0: Self = Self::new(0);
5874
5875        #[doc = "Receive preface length (bit length)"]
5876        pub const OTHERS: Self = Self::new(0);
5877    }
5878    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5879    pub struct Rppat_SPEC;
5880    pub type Rppat = crate::EnumBitfieldStruct<u8, Rppat_SPEC>;
5881    impl Rppat {
5882        #[doc = "ALL ZERO"]
5883        pub const _00: Self = Self::new(0);
5884
5885        #[doc = "ZERO ONE"]
5886        pub const _01: Self = Self::new(1);
5887
5888        #[doc = "ONE ZERO"]
5889        pub const _10: Self = Self::new(2);
5890
5891        #[doc = "ALL ONE"]
5892        pub const _11: Self = Self::new(3);
5893    }
5894}
5895#[doc(hidden)]
5896#[derive(Copy, Clone, Eq, PartialEq)]
5897pub struct Mesr_SPEC;
5898impl crate::sealed::RegSpec for Mesr_SPEC {
5899    type DataType = u8;
5900}
5901
5902#[doc = "Manchester Extended Error Status Register"]
5903pub type Mesr = crate::RegValueT<Mesr_SPEC>;
5904
5905impl Mesr {
5906    #[doc = "Preface Error flag"]
5907    #[inline(always)]
5908    pub fn pfer(
5909        self,
5910    ) -> crate::common::RegisterField<
5911        0,
5912        0x1,
5913        1,
5914        0,
5915        mesr::Pfer,
5916        mesr::Pfer,
5917        Mesr_SPEC,
5918        crate::common::RW,
5919    > {
5920        crate::common::RegisterField::<
5921            0,
5922            0x1,
5923            1,
5924            0,
5925            mesr::Pfer,
5926            mesr::Pfer,
5927            Mesr_SPEC,
5928            crate::common::RW,
5929        >::from_register(self, 0)
5930    }
5931
5932    #[doc = "SYNC Error flag"]
5933    #[inline(always)]
5934    pub fn syer(
5935        self,
5936    ) -> crate::common::RegisterField<
5937        1,
5938        0x1,
5939        1,
5940        0,
5941        mesr::Syer,
5942        mesr::Syer,
5943        Mesr_SPEC,
5944        crate::common::RW,
5945    > {
5946        crate::common::RegisterField::<
5947            1,
5948            0x1,
5949            1,
5950            0,
5951            mesr::Syer,
5952            mesr::Syer,
5953            Mesr_SPEC,
5954            crate::common::RW,
5955        >::from_register(self, 0)
5956    }
5957
5958    #[doc = "Start Bit Error flag"]
5959    #[inline(always)]
5960    pub fn sber(
5961        self,
5962    ) -> crate::common::RegisterField<
5963        2,
5964        0x1,
5965        1,
5966        0,
5967        mesr::Sber,
5968        mesr::Sber,
5969        Mesr_SPEC,
5970        crate::common::RW,
5971    > {
5972        crate::common::RegisterField::<
5973            2,
5974            0x1,
5975            1,
5976            0,
5977            mesr::Sber,
5978            mesr::Sber,
5979            Mesr_SPEC,
5980            crate::common::RW,
5981        >::from_register(self, 0)
5982    }
5983}
5984impl ::core::default::Default for Mesr {
5985    #[inline(always)]
5986    fn default() -> Mesr {
5987        <crate::RegValueT<Mesr_SPEC> as RegisterValue<_>>::new(0)
5988    }
5989}
5990pub mod mesr {
5991
5992    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5993    pub struct Pfer_SPEC;
5994    pub type Pfer = crate::EnumBitfieldStruct<u8, Pfer_SPEC>;
5995    impl Pfer {
5996        #[doc = "No preface error detected"]
5997        pub const _0: Self = Self::new(0);
5998
5999        #[doc = "Preface error detected"]
6000        pub const _1: Self = Self::new(1);
6001    }
6002    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6003    pub struct Syer_SPEC;
6004    pub type Syer = crate::EnumBitfieldStruct<u8, Syer_SPEC>;
6005    impl Syer {
6006        #[doc = "No receive SYNC error detected"]
6007        pub const _0: Self = Self::new(0);
6008
6009        #[doc = "Receive SYNC error detected"]
6010        pub const _1: Self = Self::new(1);
6011    }
6012    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6013    pub struct Sber_SPEC;
6014    pub type Sber = crate::EnumBitfieldStruct<u8, Sber_SPEC>;
6015    impl Sber {
6016        #[doc = "No start bit error detected"]
6017        pub const _0: Self = Self::new(0);
6018
6019        #[doc = "Start bit error detected"]
6020        pub const _1: Self = Self::new(1);
6021    }
6022}
6023#[doc(hidden)]
6024#[derive(Copy, Clone, Eq, PartialEq)]
6025pub struct Mecr_SPEC;
6026impl crate::sealed::RegSpec for Mecr_SPEC {
6027    type DataType = u8;
6028}
6029
6030#[doc = "Manchester Extended Error Control Register"]
6031pub type Mecr = crate::RegValueT<Mecr_SPEC>;
6032
6033impl Mecr {
6034    #[doc = "Preface Error Enable"]
6035    #[inline(always)]
6036    pub fn pferen(
6037        self,
6038    ) -> crate::common::RegisterField<
6039        0,
6040        0x1,
6041        1,
6042        0,
6043        mecr::Pferen,
6044        mecr::Pferen,
6045        Mecr_SPEC,
6046        crate::common::RW,
6047    > {
6048        crate::common::RegisterField::<
6049            0,
6050            0x1,
6051            1,
6052            0,
6053            mecr::Pferen,
6054            mecr::Pferen,
6055            Mecr_SPEC,
6056            crate::common::RW,
6057        >::from_register(self, 0)
6058    }
6059
6060    #[doc = "Receive SYNC Error Enable"]
6061    #[inline(always)]
6062    pub fn syeren(
6063        self,
6064    ) -> crate::common::RegisterField<
6065        1,
6066        0x1,
6067        1,
6068        0,
6069        mecr::Syeren,
6070        mecr::Syeren,
6071        Mecr_SPEC,
6072        crate::common::RW,
6073    > {
6074        crate::common::RegisterField::<
6075            1,
6076            0x1,
6077            1,
6078            0,
6079            mecr::Syeren,
6080            mecr::Syeren,
6081            Mecr_SPEC,
6082            crate::common::RW,
6083        >::from_register(self, 0)
6084    }
6085
6086    #[doc = "Start Bit Error Enable"]
6087    #[inline(always)]
6088    pub fn sberen(
6089        self,
6090    ) -> crate::common::RegisterField<
6091        2,
6092        0x1,
6093        1,
6094        0,
6095        mecr::Sberen,
6096        mecr::Sberen,
6097        Mecr_SPEC,
6098        crate::common::RW,
6099    > {
6100        crate::common::RegisterField::<
6101            2,
6102            0x1,
6103            1,
6104            0,
6105            mecr::Sberen,
6106            mecr::Sberen,
6107            Mecr_SPEC,
6108            crate::common::RW,
6109        >::from_register(self, 0)
6110    }
6111}
6112impl ::core::default::Default for Mecr {
6113    #[inline(always)]
6114    fn default() -> Mecr {
6115        <crate::RegValueT<Mecr_SPEC> as RegisterValue<_>>::new(0)
6116    }
6117}
6118pub mod mecr {
6119
6120    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6121    pub struct Pferen_SPEC;
6122    pub type Pferen = crate::EnumBitfieldStruct<u8, Pferen_SPEC>;
6123    impl Pferen {
6124        #[doc = "Does not handle a preface error as an interrupt source"]
6125        pub const _0: Self = Self::new(0);
6126
6127        #[doc = "Handles a preface error as an interrupt source"]
6128        pub const _1: Self = Self::new(1);
6129    }
6130    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6131    pub struct Syeren_SPEC;
6132    pub type Syeren = crate::EnumBitfieldStruct<u8, Syeren_SPEC>;
6133    impl Syeren {
6134        #[doc = "Does not handle a receive SYNC error as an interrupt source"]
6135        pub const _0: Self = Self::new(0);
6136
6137        #[doc = "Handles a receive SYNC error as an interrupt source"]
6138        pub const _1: Self = Self::new(1);
6139    }
6140    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6141    pub struct Sberen_SPEC;
6142    pub type Sberen = crate::EnumBitfieldStruct<u8, Sberen_SPEC>;
6143    impl Sberen {
6144        #[doc = "Does not handle a start bit error as an interrupt source"]
6145        pub const _0: Self = Self::new(0);
6146
6147        #[doc = "Handles a start bit error as an interrupt source"]
6148        pub const _1: Self = Self::new(1);
6149    }
6150}