stm32l4/stm32l4x1/rcc/
ahb2rstr.rs1pub type R = crate::R<AHB2RSTRrs>;
3pub type W = crate::W<AHB2RSTRrs>;
5pub type GPIOARST_R = crate::BitReader;
7pub type GPIOARST_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type GPIOBRST_R = crate::BitReader;
11pub type GPIOBRST_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type GPIOCRST_R = crate::BitReader;
15pub type GPIOCRST_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type GPIODRST_R = crate::BitReader;
19pub type GPIODRST_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type GPIOERST_R = crate::BitReader;
23pub type GPIOERST_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type GPIOHRST_R = crate::BitReader;
27pub type GPIOHRST_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type ADCRST_R = crate::BitReader;
31pub type ADCRST_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type AESRST_R = crate::BitReader;
35pub type AESRST_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type RNGRST_R = crate::BitReader;
39pub type RNGRST_W<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42 #[inline(always)]
44 pub fn gpioarst(&self) -> GPIOARST_R {
45 GPIOARST_R::new((self.bits & 1) != 0)
46 }
47 #[inline(always)]
49 pub fn gpiobrst(&self) -> GPIOBRST_R {
50 GPIOBRST_R::new(((self.bits >> 1) & 1) != 0)
51 }
52 #[inline(always)]
54 pub fn gpiocrst(&self) -> GPIOCRST_R {
55 GPIOCRST_R::new(((self.bits >> 2) & 1) != 0)
56 }
57 #[inline(always)]
59 pub fn gpiodrst(&self) -> GPIODRST_R {
60 GPIODRST_R::new(((self.bits >> 3) & 1) != 0)
61 }
62 #[inline(always)]
64 pub fn gpioerst(&self) -> GPIOERST_R {
65 GPIOERST_R::new(((self.bits >> 4) & 1) != 0)
66 }
67 #[inline(always)]
69 pub fn gpiohrst(&self) -> GPIOHRST_R {
70 GPIOHRST_R::new(((self.bits >> 7) & 1) != 0)
71 }
72 #[inline(always)]
74 pub fn adcrst(&self) -> ADCRST_R {
75 ADCRST_R::new(((self.bits >> 13) & 1) != 0)
76 }
77 #[inline(always)]
79 pub fn aesrst(&self) -> AESRST_R {
80 AESRST_R::new(((self.bits >> 16) & 1) != 0)
81 }
82 #[inline(always)]
84 pub fn rngrst(&self) -> RNGRST_R {
85 RNGRST_R::new(((self.bits >> 18) & 1) != 0)
86 }
87}
88impl core::fmt::Debug for R {
89 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
90 f.debug_struct("AHB2RSTR")
91 .field("rngrst", &self.rngrst())
92 .field("aesrst", &self.aesrst())
93 .field("adcrst", &self.adcrst())
94 .field("gpiohrst", &self.gpiohrst())
95 .field("gpioerst", &self.gpioerst())
96 .field("gpiodrst", &self.gpiodrst())
97 .field("gpiocrst", &self.gpiocrst())
98 .field("gpiobrst", &self.gpiobrst())
99 .field("gpioarst", &self.gpioarst())
100 .finish()
101 }
102}
103impl W {
104 #[inline(always)]
106 pub fn gpioarst(&mut self) -> GPIOARST_W<AHB2RSTRrs> {
107 GPIOARST_W::new(self, 0)
108 }
109 #[inline(always)]
111 pub fn gpiobrst(&mut self) -> GPIOBRST_W<AHB2RSTRrs> {
112 GPIOBRST_W::new(self, 1)
113 }
114 #[inline(always)]
116 pub fn gpiocrst(&mut self) -> GPIOCRST_W<AHB2RSTRrs> {
117 GPIOCRST_W::new(self, 2)
118 }
119 #[inline(always)]
121 pub fn gpiodrst(&mut self) -> GPIODRST_W<AHB2RSTRrs> {
122 GPIODRST_W::new(self, 3)
123 }
124 #[inline(always)]
126 pub fn gpioerst(&mut self) -> GPIOERST_W<AHB2RSTRrs> {
127 GPIOERST_W::new(self, 4)
128 }
129 #[inline(always)]
131 pub fn gpiohrst(&mut self) -> GPIOHRST_W<AHB2RSTRrs> {
132 GPIOHRST_W::new(self, 7)
133 }
134 #[inline(always)]
136 pub fn adcrst(&mut self) -> ADCRST_W<AHB2RSTRrs> {
137 ADCRST_W::new(self, 13)
138 }
139 #[inline(always)]
141 pub fn aesrst(&mut self) -> AESRST_W<AHB2RSTRrs> {
142 AESRST_W::new(self, 16)
143 }
144 #[inline(always)]
146 pub fn rngrst(&mut self) -> RNGRST_W<AHB2RSTRrs> {
147 RNGRST_W::new(self, 18)
148 }
149}
150pub struct AHB2RSTRrs;
156impl crate::RegisterSpec for AHB2RSTRrs {
157 type Ux = u32;
158}
159impl crate::Readable for AHB2RSTRrs {}
161impl crate::Writable for AHB2RSTRrs {
163 type Safety = crate::Unsafe;
164}
165impl crate::Resettable for AHB2RSTRrs {}