Skip to main content

ra6m2_pac/
port0.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.2, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:11:44 +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"Port 0 Control Registers"]
28unsafe impl ::core::marker::Send for super::Port0 {}
29unsafe impl ::core::marker::Sync for super::Port0 {}
30impl super::Port0 {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Port Control Register 1"]
38    #[inline(always)]
39    pub const fn pcntr1(
40        &self,
41    ) -> &'static crate::common::Reg<self::Pcntr1_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Pcntr1_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(0usize),
45            )
46        }
47    }
48
49    #[doc = "Output data register"]
50    #[inline(always)]
51    pub const fn podr(&self) -> &'static crate::common::Reg<self::Podr_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Podr_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(0usize),
55            )
56        }
57    }
58
59    #[doc = "Data direction register"]
60    #[inline(always)]
61    pub const fn pdr(&self) -> &'static crate::common::Reg<self::Pdr_SPEC, crate::common::RW> {
62        unsafe {
63            crate::common::Reg::<self::Pdr_SPEC, crate::common::RW>::from_ptr(
64                self._svd2pac_as_ptr().add(2usize),
65            )
66        }
67    }
68
69    #[doc = "Port Control Register 2"]
70    #[inline(always)]
71    pub const fn pcntr2(&self) -> &'static crate::common::Reg<self::Pcntr2_SPEC, crate::common::R> {
72        unsafe {
73            crate::common::Reg::<self::Pcntr2_SPEC, crate::common::R>::from_ptr(
74                self._svd2pac_as_ptr().add(4usize),
75            )
76        }
77    }
78
79    #[doc = "Input data register"]
80    #[inline(always)]
81    pub const fn pidr(&self) -> &'static crate::common::Reg<self::Pidr_SPEC, crate::common::R> {
82        unsafe {
83            crate::common::Reg::<self::Pidr_SPEC, crate::common::R>::from_ptr(
84                self._svd2pac_as_ptr().add(6usize),
85            )
86        }
87    }
88
89    #[doc = "Port Control Register 3"]
90    #[inline(always)]
91    pub const fn pcntr3(&self) -> &'static crate::common::Reg<self::Pcntr3_SPEC, crate::common::W> {
92        unsafe {
93            crate::common::Reg::<self::Pcntr3_SPEC, crate::common::W>::from_ptr(
94                self._svd2pac_as_ptr().add(8usize),
95            )
96        }
97    }
98
99    #[doc = "Output reset register"]
100    #[inline(always)]
101    pub const fn porr(&self) -> &'static crate::common::Reg<self::Porr_SPEC, crate::common::W> {
102        unsafe {
103            crate::common::Reg::<self::Porr_SPEC, crate::common::W>::from_ptr(
104                self._svd2pac_as_ptr().add(8usize),
105            )
106        }
107    }
108
109    #[doc = "Output set register"]
110    #[inline(always)]
111    pub const fn posr(&self) -> &'static crate::common::Reg<self::Posr_SPEC, crate::common::W> {
112        unsafe {
113            crate::common::Reg::<self::Posr_SPEC, crate::common::W>::from_ptr(
114                self._svd2pac_as_ptr().add(10usize),
115            )
116        }
117    }
118}
119#[doc(hidden)]
120#[derive(Copy, Clone, Eq, PartialEq)]
121pub struct Pcntr1_SPEC;
122impl crate::sealed::RegSpec for Pcntr1_SPEC {
123    type DataType = u32;
124}
125
126#[doc = "Port Control Register 1"]
127pub type Pcntr1 = crate::RegValueT<Pcntr1_SPEC>;
128
129impl Pcntr1 {
130    #[doc = "Pmn Output Data"]
131    #[inline(always)]
132    pub fn podr(
133        self,
134    ) -> crate::common::RegisterField<
135        16,
136        0xffff,
137        1,
138        0,
139        pcntr1::Podr,
140        pcntr1::Podr,
141        Pcntr1_SPEC,
142        crate::common::RW,
143    > {
144        crate::common::RegisterField::<
145            16,
146            0xffff,
147            1,
148            0,
149            pcntr1::Podr,
150            pcntr1::Podr,
151            Pcntr1_SPEC,
152            crate::common::RW,
153        >::from_register(self, 0)
154    }
155
156    #[doc = "Pmn Direction"]
157    #[inline(always)]
158    pub fn pdr(
159        self,
160    ) -> crate::common::RegisterField<
161        0,
162        0xffff,
163        1,
164        0,
165        pcntr1::Pdr,
166        pcntr1::Pdr,
167        Pcntr1_SPEC,
168        crate::common::RW,
169    > {
170        crate::common::RegisterField::<
171            0,
172            0xffff,
173            1,
174            0,
175            pcntr1::Pdr,
176            pcntr1::Pdr,
177            Pcntr1_SPEC,
178            crate::common::RW,
179        >::from_register(self, 0)
180    }
181}
182impl ::core::default::Default for Pcntr1 {
183    #[inline(always)]
184    fn default() -> Pcntr1 {
185        <crate::RegValueT<Pcntr1_SPEC> as RegisterValue<_>>::new(0)
186    }
187}
188pub mod pcntr1 {
189
190    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
191    pub struct Podr_SPEC;
192    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
193    impl Podr {
194        #[doc = "Low output"]
195        pub const _0: Self = Self::new(0);
196
197        #[doc = "High output."]
198        pub const _1: Self = Self::new(1);
199    }
200    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
201    pub struct Pdr_SPEC;
202    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
203    impl Pdr {
204        #[doc = "Input (functions as an input pin)"]
205        pub const _0: Self = Self::new(0);
206
207        #[doc = "Output (functions as an output pin)."]
208        pub const _1: Self = Self::new(1);
209    }
210}
211#[doc(hidden)]
212#[derive(Copy, Clone, Eq, PartialEq)]
213pub struct Podr_SPEC;
214impl crate::sealed::RegSpec for Podr_SPEC {
215    type DataType = u16;
216}
217
218#[doc = "Output data register"]
219pub type Podr = crate::RegValueT<Podr_SPEC>;
220
221impl Podr {
222    #[doc = "Pmn Output Data"]
223    #[inline(always)]
224    pub fn podr(
225        self,
226    ) -> crate::common::RegisterField<
227        0,
228        0xffff,
229        1,
230        0,
231        podr::Podr,
232        podr::Podr,
233        Podr_SPEC,
234        crate::common::RW,
235    > {
236        crate::common::RegisterField::<
237            0,
238            0xffff,
239            1,
240            0,
241            podr::Podr,
242            podr::Podr,
243            Podr_SPEC,
244            crate::common::RW,
245        >::from_register(self, 0)
246    }
247}
248impl ::core::default::Default for Podr {
249    #[inline(always)]
250    fn default() -> Podr {
251        <crate::RegValueT<Podr_SPEC> as RegisterValue<_>>::new(0)
252    }
253}
254pub mod podr {
255
256    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
257    pub struct Podr_SPEC;
258    pub type Podr = crate::EnumBitfieldStruct<u8, Podr_SPEC>;
259    impl Podr {
260        #[doc = "Low output"]
261        pub const _0: Self = Self::new(0);
262
263        #[doc = "High output."]
264        pub const _1: Self = Self::new(1);
265    }
266}
267#[doc(hidden)]
268#[derive(Copy, Clone, Eq, PartialEq)]
269pub struct Pdr_SPEC;
270impl crate::sealed::RegSpec for Pdr_SPEC {
271    type DataType = u16;
272}
273
274#[doc = "Data direction register"]
275pub type Pdr = crate::RegValueT<Pdr_SPEC>;
276
277impl Pdr {
278    #[doc = "Pmn Direction"]
279    #[inline(always)]
280    pub fn pdr(
281        self,
282    ) -> crate::common::RegisterField<
283        0,
284        0xffff,
285        1,
286        0,
287        pdr::Pdr,
288        pdr::Pdr,
289        Pdr_SPEC,
290        crate::common::RW,
291    > {
292        crate::common::RegisterField::<
293            0,
294            0xffff,
295            1,
296            0,
297            pdr::Pdr,
298            pdr::Pdr,
299            Pdr_SPEC,
300            crate::common::RW,
301        >::from_register(self, 0)
302    }
303}
304impl ::core::default::Default for Pdr {
305    #[inline(always)]
306    fn default() -> Pdr {
307        <crate::RegValueT<Pdr_SPEC> as RegisterValue<_>>::new(0)
308    }
309}
310pub mod pdr {
311
312    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
313    pub struct Pdr_SPEC;
314    pub type Pdr = crate::EnumBitfieldStruct<u8, Pdr_SPEC>;
315    impl Pdr {
316        #[doc = "Input (functions as an input pin)"]
317        pub const _0: Self = Self::new(0);
318
319        #[doc = "Output (functions as an output pin)."]
320        pub const _1: Self = Self::new(1);
321    }
322}
323#[doc(hidden)]
324#[derive(Copy, Clone, Eq, PartialEq)]
325pub struct Pcntr2_SPEC;
326impl crate::sealed::RegSpec for Pcntr2_SPEC {
327    type DataType = u32;
328}
329
330#[doc = "Port Control Register 2"]
331pub type Pcntr2 = crate::RegValueT<Pcntr2_SPEC>;
332
333impl Pcntr2 {
334    #[doc = "Pmn Event Input Data"]
335    #[inline(always)]
336    pub fn eidr(
337        self,
338    ) -> crate::common::RegisterField<
339        16,
340        0xffff,
341        1,
342        0,
343        pcntr2::Eidr,
344        pcntr2::Eidr,
345        Pcntr2_SPEC,
346        crate::common::R,
347    > {
348        crate::common::RegisterField::<
349            16,
350            0xffff,
351            1,
352            0,
353            pcntr2::Eidr,
354            pcntr2::Eidr,
355            Pcntr2_SPEC,
356            crate::common::R,
357        >::from_register(self, 0)
358    }
359
360    #[doc = "Pmn Input Data"]
361    #[inline(always)]
362    pub fn pidr(
363        self,
364    ) -> crate::common::RegisterField<
365        0,
366        0xffff,
367        1,
368        0,
369        pcntr2::Pidr,
370        pcntr2::Pidr,
371        Pcntr2_SPEC,
372        crate::common::R,
373    > {
374        crate::common::RegisterField::<
375            0,
376            0xffff,
377            1,
378            0,
379            pcntr2::Pidr,
380            pcntr2::Pidr,
381            Pcntr2_SPEC,
382            crate::common::R,
383        >::from_register(self, 0)
384    }
385}
386impl ::core::default::Default for Pcntr2 {
387    #[inline(always)]
388    fn default() -> Pcntr2 {
389        <crate::RegValueT<Pcntr2_SPEC> as RegisterValue<_>>::new(0)
390    }
391}
392pub mod pcntr2 {
393
394    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
395    pub struct Eidr_SPEC;
396    pub type Eidr = crate::EnumBitfieldStruct<u8, Eidr_SPEC>;
397    impl Eidr {
398        #[doc = "Low input"]
399        pub const _0: Self = Self::new(0);
400
401        #[doc = "High input."]
402        pub const _1: Self = Self::new(1);
403    }
404    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
405    pub struct Pidr_SPEC;
406    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
407    impl Pidr {
408        #[doc = "Low input"]
409        pub const _0: Self = Self::new(0);
410
411        #[doc = "High input."]
412        pub const _1: Self = Self::new(1);
413    }
414}
415#[doc(hidden)]
416#[derive(Copy, Clone, Eq, PartialEq)]
417pub struct Pidr_SPEC;
418impl crate::sealed::RegSpec for Pidr_SPEC {
419    type DataType = u16;
420}
421
422#[doc = "Input data register"]
423pub type Pidr = crate::RegValueT<Pidr_SPEC>;
424
425impl Pidr {
426    #[doc = "Pmn Input Data"]
427    #[inline(always)]
428    pub fn pidr(
429        self,
430    ) -> crate::common::RegisterField<
431        0,
432        0xffff,
433        1,
434        0,
435        pidr::Pidr,
436        pidr::Pidr,
437        Pidr_SPEC,
438        crate::common::R,
439    > {
440        crate::common::RegisterField::<
441            0,
442            0xffff,
443            1,
444            0,
445            pidr::Pidr,
446            pidr::Pidr,
447            Pidr_SPEC,
448            crate::common::R,
449        >::from_register(self, 0)
450    }
451}
452impl ::core::default::Default for Pidr {
453    #[inline(always)]
454    fn default() -> Pidr {
455        <crate::RegValueT<Pidr_SPEC> as RegisterValue<_>>::new(0)
456    }
457}
458pub mod pidr {
459
460    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
461    pub struct Pidr_SPEC;
462    pub type Pidr = crate::EnumBitfieldStruct<u8, Pidr_SPEC>;
463    impl Pidr {
464        #[doc = "Low input"]
465        pub const _0: Self = Self::new(0);
466
467        #[doc = "High input."]
468        pub const _1: Self = Self::new(1);
469    }
470}
471#[doc(hidden)]
472#[derive(Copy, Clone, Eq, PartialEq)]
473pub struct Pcntr3_SPEC;
474impl crate::sealed::RegSpec for Pcntr3_SPEC {
475    type DataType = u32;
476}
477
478#[doc = "Port Control Register 3"]
479pub type Pcntr3 = crate::RegValueT<Pcntr3_SPEC>;
480
481impl Pcntr3 {
482    #[doc = "Pmn Output Reset"]
483    #[inline(always)]
484    pub fn porr(
485        self,
486    ) -> crate::common::RegisterField<
487        16,
488        0xffff,
489        1,
490        0,
491        pcntr3::Porr,
492        pcntr3::Porr,
493        Pcntr3_SPEC,
494        crate::common::W,
495    > {
496        crate::common::RegisterField::<
497            16,
498            0xffff,
499            1,
500            0,
501            pcntr3::Porr,
502            pcntr3::Porr,
503            Pcntr3_SPEC,
504            crate::common::W,
505        >::from_register(self, 0)
506    }
507
508    #[doc = "Pmn Output Set"]
509    #[inline(always)]
510    pub fn posr(
511        self,
512    ) -> crate::common::RegisterField<
513        0,
514        0xffff,
515        1,
516        0,
517        pcntr3::Posr,
518        pcntr3::Posr,
519        Pcntr3_SPEC,
520        crate::common::W,
521    > {
522        crate::common::RegisterField::<
523            0,
524            0xffff,
525            1,
526            0,
527            pcntr3::Posr,
528            pcntr3::Posr,
529            Pcntr3_SPEC,
530            crate::common::W,
531        >::from_register(self, 0)
532    }
533}
534impl ::core::default::Default for Pcntr3 {
535    #[inline(always)]
536    fn default() -> Pcntr3 {
537        <crate::RegValueT<Pcntr3_SPEC> as RegisterValue<_>>::new(0)
538    }
539}
540pub mod pcntr3 {
541
542    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
543    pub struct Porr_SPEC;
544    pub type Porr = crate::EnumBitfieldStruct<u8, Porr_SPEC>;
545    impl Porr {
546        #[doc = "No affect to output"]
547        pub const _0: Self = Self::new(0);
548
549        #[doc = "Low output."]
550        pub const _1: Self = Self::new(1);
551    }
552    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
553    pub struct Posr_SPEC;
554    pub type Posr = crate::EnumBitfieldStruct<u8, Posr_SPEC>;
555    impl Posr {
556        #[doc = "No affect to output"]
557        pub const _0: Self = Self::new(0);
558
559        #[doc = "High output."]
560        pub const _1: Self = Self::new(1);
561    }
562}
563#[doc(hidden)]
564#[derive(Copy, Clone, Eq, PartialEq)]
565pub struct Porr_SPEC;
566impl crate::sealed::RegSpec for Porr_SPEC {
567    type DataType = u16;
568}
569
570#[doc = "Output reset register"]
571pub type Porr = crate::RegValueT<Porr_SPEC>;
572
573impl Porr {
574    #[doc = "Pmn Output Reset"]
575    #[inline(always)]
576    pub fn porr(
577        self,
578    ) -> crate::common::RegisterField<
579        0,
580        0xffff,
581        1,
582        0,
583        porr::Porr,
584        porr::Porr,
585        Porr_SPEC,
586        crate::common::W,
587    > {
588        crate::common::RegisterField::<
589            0,
590            0xffff,
591            1,
592            0,
593            porr::Porr,
594            porr::Porr,
595            Porr_SPEC,
596            crate::common::W,
597        >::from_register(self, 0)
598    }
599}
600impl ::core::default::Default for Porr {
601    #[inline(always)]
602    fn default() -> Porr {
603        <crate::RegValueT<Porr_SPEC> as RegisterValue<_>>::new(0)
604    }
605}
606pub mod porr {
607
608    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
609    pub struct Porr_SPEC;
610    pub type Porr = crate::EnumBitfieldStruct<u8, Porr_SPEC>;
611    impl Porr {
612        #[doc = "No affect to output"]
613        pub const _0: Self = Self::new(0);
614
615        #[doc = "Low output."]
616        pub const _1: Self = Self::new(1);
617    }
618}
619#[doc(hidden)]
620#[derive(Copy, Clone, Eq, PartialEq)]
621pub struct Posr_SPEC;
622impl crate::sealed::RegSpec for Posr_SPEC {
623    type DataType = u16;
624}
625
626#[doc = "Output set register"]
627pub type Posr = crate::RegValueT<Posr_SPEC>;
628
629impl Posr {
630    #[doc = "Pmn Output Set"]
631    #[inline(always)]
632    pub fn posr(
633        self,
634    ) -> crate::common::RegisterField<
635        0,
636        0xffff,
637        1,
638        0,
639        posr::Posr,
640        posr::Posr,
641        Posr_SPEC,
642        crate::common::W,
643    > {
644        crate::common::RegisterField::<
645            0,
646            0xffff,
647            1,
648            0,
649            posr::Posr,
650            posr::Posr,
651            Posr_SPEC,
652            crate::common::W,
653        >::from_register(self, 0)
654    }
655}
656impl ::core::default::Default for Posr {
657    #[inline(always)]
658    fn default() -> Posr {
659        <crate::RegValueT<Posr_SPEC> as RegisterValue<_>>::new(0)
660    }
661}
662pub mod posr {
663
664    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
665    pub struct Posr_SPEC;
666    pub type Posr = crate::EnumBitfieldStruct<u8, Posr_SPEC>;
667    impl Posr {
668        #[doc = "No affect to output"]
669        pub const _0: Self = Self::new(0);
670
671        #[doc = "High output."]
672        pub const _1: Self = Self::new(1);
673    }
674}