ra4m2/sysc/
dpsifr3.rs

1#[doc = "Register `DPSIFR3` reader"]
2pub struct R(crate::R<DPSIFR3_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<DPSIFR3_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<DPSIFR3_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<DPSIFR3_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `DPSIFR3` writer"]
17pub struct W(crate::W<DPSIFR3_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<DPSIFR3_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<DPSIFR3_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<DPSIFR3_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `DUSBFS0IF` reader - USBFS0 Suspend/Resume Deep Standby Cancel Flag"]
38pub type DUSBFS0IF_R = crate::BitReader<DUSBFS0IF_A>;
39#[doc = "USBFS0 Suspend/Resume Deep Standby Cancel Flag\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum DUSBFS0IF_A {
42    #[doc = "0: The cancel request is not generated."]
43    _0 = 0,
44    #[doc = "1: The cancel request is generated."]
45    _1 = 1,
46}
47impl From<DUSBFS0IF_A> for bool {
48    #[inline(always)]
49    fn from(variant: DUSBFS0IF_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl DUSBFS0IF_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> DUSBFS0IF_A {
57        match self.bits {
58            false => DUSBFS0IF_A::_0,
59            true => DUSBFS0IF_A::_1,
60        }
61    }
62    #[doc = "Checks if the value of the field is `_0`"]
63    #[inline(always)]
64    pub fn is_0(&self) -> bool {
65        *self == DUSBFS0IF_A::_0
66    }
67    #[doc = "Checks if the value of the field is `_1`"]
68    #[inline(always)]
69    pub fn is_1(&self) -> bool {
70        *self == DUSBFS0IF_A::_1
71    }
72}
73#[doc = "Field `DUSBFS0IF` writer - USBFS0 Suspend/Resume Deep Standby Cancel Flag"]
74pub type DUSBFS0IF_W<'a, const O: u8> = crate::BitWriter<'a, u8, DPSIFR3_SPEC, DUSBFS0IF_A, O>;
75impl<'a, const O: u8> DUSBFS0IF_W<'a, O> {
76    #[doc = "The cancel request is not generated."]
77    #[inline(always)]
78    pub fn _0(self) -> &'a mut W {
79        self.variant(DUSBFS0IF_A::_0)
80    }
81    #[doc = "The cancel request is generated."]
82    #[inline(always)]
83    pub fn _1(self) -> &'a mut W {
84        self.variant(DUSBFS0IF_A::_1)
85    }
86}
87#[doc = "Field `DAGT1IF` reader - AGT1 Underflow Deep Standby Cancel Flag"]
88pub type DAGT1IF_R = crate::BitReader<DAGT1IF_A>;
89#[doc = "AGT1 Underflow Deep Standby Cancel Flag\n\nValue on reset: 0"]
90#[derive(Clone, Copy, Debug, PartialEq, Eq)]
91pub enum DAGT1IF_A {
92    #[doc = "0: The cancel request is not generated."]
93    _0 = 0,
94    #[doc = "1: The cancel request is generated."]
95    _1 = 1,
96}
97impl From<DAGT1IF_A> for bool {
98    #[inline(always)]
99    fn from(variant: DAGT1IF_A) -> Self {
100        variant as u8 != 0
101    }
102}
103impl DAGT1IF_R {
104    #[doc = "Get enumerated values variant"]
105    #[inline(always)]
106    pub fn variant(&self) -> DAGT1IF_A {
107        match self.bits {
108            false => DAGT1IF_A::_0,
109            true => DAGT1IF_A::_1,
110        }
111    }
112    #[doc = "Checks if the value of the field is `_0`"]
113    #[inline(always)]
114    pub fn is_0(&self) -> bool {
115        *self == DAGT1IF_A::_0
116    }
117    #[doc = "Checks if the value of the field is `_1`"]
118    #[inline(always)]
119    pub fn is_1(&self) -> bool {
120        *self == DAGT1IF_A::_1
121    }
122}
123#[doc = "Field `DAGT1IF` writer - AGT1 Underflow Deep Standby Cancel Flag"]
124pub type DAGT1IF_W<'a, const O: u8> = crate::BitWriter<'a, u8, DPSIFR3_SPEC, DAGT1IF_A, O>;
125impl<'a, const O: u8> DAGT1IF_W<'a, O> {
126    #[doc = "The cancel request is not generated."]
127    #[inline(always)]
128    pub fn _0(self) -> &'a mut W {
129        self.variant(DAGT1IF_A::_0)
130    }
131    #[doc = "The cancel request is generated."]
132    #[inline(always)]
133    pub fn _1(self) -> &'a mut W {
134        self.variant(DAGT1IF_A::_1)
135    }
136}
137#[doc = "Field `DAGT3IF` reader - AGT3 Underflow Deep Standby Cancel Flag"]
138pub type DAGT3IF_R = crate::BitReader<DAGT3IF_A>;
139#[doc = "AGT3 Underflow Deep Standby Cancel Flag\n\nValue on reset: 0"]
140#[derive(Clone, Copy, Debug, PartialEq, Eq)]
141pub enum DAGT3IF_A {
142    #[doc = "0: The cancel request is not generated."]
143    _0 = 0,
144    #[doc = "1: The cancel request is generated."]
145    _1 = 1,
146}
147impl From<DAGT3IF_A> for bool {
148    #[inline(always)]
149    fn from(variant: DAGT3IF_A) -> Self {
150        variant as u8 != 0
151    }
152}
153impl DAGT3IF_R {
154    #[doc = "Get enumerated values variant"]
155    #[inline(always)]
156    pub fn variant(&self) -> DAGT3IF_A {
157        match self.bits {
158            false => DAGT3IF_A::_0,
159            true => DAGT3IF_A::_1,
160        }
161    }
162    #[doc = "Checks if the value of the field is `_0`"]
163    #[inline(always)]
164    pub fn is_0(&self) -> bool {
165        *self == DAGT3IF_A::_0
166    }
167    #[doc = "Checks if the value of the field is `_1`"]
168    #[inline(always)]
169    pub fn is_1(&self) -> bool {
170        *self == DAGT3IF_A::_1
171    }
172}
173#[doc = "Field `DAGT3IF` writer - AGT3 Underflow Deep Standby Cancel Flag"]
174pub type DAGT3IF_W<'a, const O: u8> = crate::BitWriter<'a, u8, DPSIFR3_SPEC, DAGT3IF_A, O>;
175impl<'a, const O: u8> DAGT3IF_W<'a, O> {
176    #[doc = "The cancel request is not generated."]
177    #[inline(always)]
178    pub fn _0(self) -> &'a mut W {
179        self.variant(DAGT3IF_A::_0)
180    }
181    #[doc = "The cancel request is generated."]
182    #[inline(always)]
183    pub fn _1(self) -> &'a mut W {
184        self.variant(DAGT3IF_A::_1)
185    }
186}
187impl R {
188    #[doc = "Bit 0 - USBFS0 Suspend/Resume Deep Standby Cancel Flag"]
189    #[inline(always)]
190    pub fn dusbfs0if(&self) -> DUSBFS0IF_R {
191        DUSBFS0IF_R::new((self.bits & 1) != 0)
192    }
193    #[doc = "Bit 2 - AGT1 Underflow Deep Standby Cancel Flag"]
194    #[inline(always)]
195    pub fn dagt1if(&self) -> DAGT1IF_R {
196        DAGT1IF_R::new(((self.bits >> 2) & 1) != 0)
197    }
198    #[doc = "Bit 3 - AGT3 Underflow Deep Standby Cancel Flag"]
199    #[inline(always)]
200    pub fn dagt3if(&self) -> DAGT3IF_R {
201        DAGT3IF_R::new(((self.bits >> 3) & 1) != 0)
202    }
203}
204impl W {
205    #[doc = "Bit 0 - USBFS0 Suspend/Resume Deep Standby Cancel Flag"]
206    #[inline(always)]
207    #[must_use]
208    pub fn dusbfs0if(&mut self) -> DUSBFS0IF_W<0> {
209        DUSBFS0IF_W::new(self)
210    }
211    #[doc = "Bit 2 - AGT1 Underflow Deep Standby Cancel Flag"]
212    #[inline(always)]
213    #[must_use]
214    pub fn dagt1if(&mut self) -> DAGT1IF_W<2> {
215        DAGT1IF_W::new(self)
216    }
217    #[doc = "Bit 3 - AGT3 Underflow Deep Standby Cancel Flag"]
218    #[inline(always)]
219    #[must_use]
220    pub fn dagt3if(&mut self) -> DAGT3IF_W<3> {
221        DAGT3IF_W::new(self)
222    }
223    #[doc = "Writes raw bits to the register."]
224    #[inline(always)]
225    pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
226        self.0.bits(bits);
227        self
228    }
229}
230#[doc = "Deep Standby Interrupt Flag Register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dpsifr3](index.html) module"]
231pub struct DPSIFR3_SPEC;
232impl crate::RegisterSpec for DPSIFR3_SPEC {
233    type Ux = u8;
234}
235#[doc = "`read()` method returns [dpsifr3::R](R) reader structure"]
236impl crate::Readable for DPSIFR3_SPEC {
237    type Reader = R;
238}
239#[doc = "`write(|w| ..)` method takes [dpsifr3::W](W) writer structure"]
240impl crate::Writable for DPSIFR3_SPEC {
241    type Writer = W;
242    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
243    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
244}
245#[doc = "`reset()` method sets DPSIFR3 to value 0"]
246impl crate::Resettable for DPSIFR3_SPEC {
247    const RESET_VALUE: Self::Ux = 0;
248}