Skip to main content

ra2a2_pac/
iic0wu.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.20.02, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:01:00 +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"Inter-Integrated Circuit 0 Wake-up Unit"]
28unsafe impl ::core::marker::Send for super::Iic0Wu {}
29unsafe impl ::core::marker::Sync for super::Iic0Wu {}
30impl super::Iic0Wu {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "I2C Bus Wakeup Unit Register"]
38    #[inline(always)]
39    pub const fn icwur(&self) -> &'static crate::common::Reg<self::Icwur_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Icwur_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(2usize),
43            )
44        }
45    }
46
47    #[doc = "I2C Bus Wakeup Unit Register 2"]
48    #[inline(always)]
49    pub const fn icwur2(
50        &self,
51    ) -> &'static crate::common::Reg<self::Icwur2_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Icwur2_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(3usize),
55            )
56        }
57    }
58}
59#[doc(hidden)]
60#[derive(Copy, Clone, Eq, PartialEq)]
61pub struct Icwur_SPEC;
62impl crate::sealed::RegSpec for Icwur_SPEC {
63    type DataType = u8;
64}
65
66#[doc = "I2C Bus Wakeup Unit Register"]
67pub type Icwur = crate::RegValueT<Icwur_SPEC>;
68
69impl Icwur {
70    #[doc = "Wakeup Analog Filter Additional Selection"]
71    #[inline(always)]
72    pub fn wuafa(
73        self,
74    ) -> crate::common::RegisterField<
75        0,
76        0x1,
77        1,
78        0,
79        icwur::Wuafa,
80        icwur::Wuafa,
81        Icwur_SPEC,
82        crate::common::RW,
83    > {
84        crate::common::RegisterField::<
85            0,
86            0x1,
87            1,
88            0,
89            icwur::Wuafa,
90            icwur::Wuafa,
91            Icwur_SPEC,
92            crate::common::RW,
93        >::from_register(self, 0)
94    }
95
96    #[doc = "ACK Bit for Wakeup Mode"]
97    #[inline(always)]
98    pub fn wuack(self) -> crate::common::RegisterFieldBool<4, 1, 0, Icwur_SPEC, crate::common::RW> {
99        crate::common::RegisterFieldBool::<4, 1, 0, Icwur_SPEC, crate::common::RW>::from_register(
100            self, 0,
101        )
102    }
103
104    #[doc = "Wakeup Event Occurrence Flag"]
105    #[inline(always)]
106    pub fn wuf(
107        self,
108    ) -> crate::common::RegisterField<
109        5,
110        0x1,
111        1,
112        0,
113        icwur::Wuf,
114        icwur::Wuf,
115        Icwur_SPEC,
116        crate::common::RW,
117    > {
118        crate::common::RegisterField::<
119            5,
120            0x1,
121            1,
122            0,
123            icwur::Wuf,
124            icwur::Wuf,
125            Icwur_SPEC,
126            crate::common::RW,
127        >::from_register(self, 0)
128    }
129
130    #[doc = "Wakeup Interrupt Request Enable"]
131    #[inline(always)]
132    pub fn wuie(
133        self,
134    ) -> crate::common::RegisterField<
135        6,
136        0x1,
137        1,
138        0,
139        icwur::Wuie,
140        icwur::Wuie,
141        Icwur_SPEC,
142        crate::common::RW,
143    > {
144        crate::common::RegisterField::<
145            6,
146            0x1,
147            1,
148            0,
149            icwur::Wuie,
150            icwur::Wuie,
151            Icwur_SPEC,
152            crate::common::RW,
153        >::from_register(self, 0)
154    }
155
156    #[doc = "Wakeup Function Enable"]
157    #[inline(always)]
158    pub fn wue(
159        self,
160    ) -> crate::common::RegisterField<
161        7,
162        0x1,
163        1,
164        0,
165        icwur::Wue,
166        icwur::Wue,
167        Icwur_SPEC,
168        crate::common::RW,
169    > {
170        crate::common::RegisterField::<
171            7,
172            0x1,
173            1,
174            0,
175            icwur::Wue,
176            icwur::Wue,
177            Icwur_SPEC,
178            crate::common::RW,
179        >::from_register(self, 0)
180    }
181}
182impl ::core::default::Default for Icwur {
183    #[inline(always)]
184    fn default() -> Icwur {
185        <crate::RegValueT<Icwur_SPEC> as RegisterValue<_>>::new(16)
186    }
187}
188pub mod icwur {
189
190    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
191    pub struct Wuafa_SPEC;
192    pub type Wuafa = crate::EnumBitfieldStruct<u8, Wuafa_SPEC>;
193    impl Wuafa {
194        #[doc = "Do not add the wakeup analog filter"]
195        pub const _0: Self = Self::new(0);
196
197        #[doc = "Add the wakeup analog filter"]
198        pub const _1: Self = Self::new(1);
199    }
200    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
201    pub struct Wuf_SPEC;
202    pub type Wuf = crate::EnumBitfieldStruct<u8, Wuf_SPEC>;
203    impl Wuf {
204        #[doc = "Slave address not matching during wakeup"]
205        pub const _0: Self = Self::new(0);
206
207        #[doc = "Slave address matching during wakeup"]
208        pub const _1: Self = Self::new(1);
209    }
210    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
211    pub struct Wuie_SPEC;
212    pub type Wuie = crate::EnumBitfieldStruct<u8, Wuie_SPEC>;
213    impl Wuie {
214        #[doc = "Disable wakeup interrupt request (IIC0_WUI)"]
215        pub const _0: Self = Self::new(0);
216
217        #[doc = "Enable wakeup interrupt request (IIC0_WUI)"]
218        pub const _1: Self = Self::new(1);
219    }
220    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
221    pub struct Wue_SPEC;
222    pub type Wue = crate::EnumBitfieldStruct<u8, Wue_SPEC>;
223    impl Wue {
224        #[doc = "Disable wakeup function"]
225        pub const _0: Self = Self::new(0);
226
227        #[doc = "Enable wakeup function"]
228        pub const _1: Self = Self::new(1);
229    }
230}
231#[doc(hidden)]
232#[derive(Copy, Clone, Eq, PartialEq)]
233pub struct Icwur2_SPEC;
234impl crate::sealed::RegSpec for Icwur2_SPEC {
235    type DataType = u8;
236}
237
238#[doc = "I2C Bus Wakeup Unit Register 2"]
239pub type Icwur2 = crate::RegValueT<Icwur2_SPEC>;
240
241impl Icwur2 {
242    #[doc = "Wakeup Function Synchronous Enable"]
243    #[inline(always)]
244    pub fn wusen(
245        self,
246    ) -> crate::common::RegisterField<
247        0,
248        0x1,
249        1,
250        0,
251        icwur2::Wusen,
252        icwur2::Wusen,
253        Icwur2_SPEC,
254        crate::common::RW,
255    > {
256        crate::common::RegisterField::<
257            0,
258            0x1,
259            1,
260            0,
261            icwur2::Wusen,
262            icwur2::Wusen,
263            Icwur2_SPEC,
264            crate::common::RW,
265        >::from_register(self, 0)
266    }
267
268    #[doc = "Wakeup Function Asynchronous Operation Status Flag"]
269    #[inline(always)]
270    pub fn wuasyf(
271        self,
272    ) -> crate::common::RegisterField<
273        1,
274        0x1,
275        1,
276        0,
277        icwur2::Wuasyf,
278        icwur2::Wuasyf,
279        Icwur2_SPEC,
280        crate::common::R,
281    > {
282        crate::common::RegisterField::<
283            1,
284            0x1,
285            1,
286            0,
287            icwur2::Wuasyf,
288            icwur2::Wuasyf,
289            Icwur2_SPEC,
290            crate::common::R,
291        >::from_register(self, 0)
292    }
293
294    #[doc = "Wakeup Function Synchronous Operation Status Flag"]
295    #[inline(always)]
296    pub fn wusyf(
297        self,
298    ) -> crate::common::RegisterField<
299        2,
300        0x1,
301        1,
302        0,
303        icwur2::Wusyf,
304        icwur2::Wusyf,
305        Icwur2_SPEC,
306        crate::common::R,
307    > {
308        crate::common::RegisterField::<
309            2,
310            0x1,
311            1,
312            0,
313            icwur2::Wusyf,
314            icwur2::Wusyf,
315            Icwur2_SPEC,
316            crate::common::R,
317        >::from_register(self, 0)
318    }
319}
320impl ::core::default::Default for Icwur2 {
321    #[inline(always)]
322    fn default() -> Icwur2 {
323        <crate::RegValueT<Icwur2_SPEC> as RegisterValue<_>>::new(253)
324    }
325}
326pub mod icwur2 {
327
328    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
329    pub struct Wusen_SPEC;
330    pub type Wusen = crate::EnumBitfieldStruct<u8, Wusen_SPEC>;
331    impl Wusen {
332        #[doc = "IIC asynchronous circuit enable"]
333        pub const _0: Self = Self::new(0);
334
335        #[doc = "IIC synchronous circuit enable"]
336        pub const _1: Self = Self::new(1);
337    }
338    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
339    pub struct Wuasyf_SPEC;
340    pub type Wuasyf = crate::EnumBitfieldStruct<u8, Wuasyf_SPEC>;
341    impl Wuasyf {
342        #[doc = "IIC synchronous circuit enable condition"]
343        pub const _0: Self = Self::new(0);
344
345        #[doc = "IIC asynchronous circuit enable condition"]
346        pub const _1: Self = Self::new(1);
347    }
348    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
349    pub struct Wusyf_SPEC;
350    pub type Wusyf = crate::EnumBitfieldStruct<u8, Wusyf_SPEC>;
351    impl Wusyf {
352        #[doc = "IIC asynchronous circuit enable condition"]
353        pub const _0: Self = Self::new(0);
354
355        #[doc = "IIC synchronous circuit enable condition"]
356        pub const _1: Self = Self::new(1);
357    }
358}