stm32l4/stm32l4x5/rcc/
apb2rstr.rs1pub type R = crate::R<APB2RSTRrs>;
3pub type W = crate::W<APB2RSTRrs>;
5pub type SYSCFGRST_R = crate::BitReader;
7pub type SYSCFGRST_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type SDMMCRST_R = crate::BitReader;
11pub type SDMMCRST_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type TIM1RST_R = crate::BitReader;
15pub type TIM1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type SPI1RST_R = crate::BitReader;
19pub type SPI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TIM8RST_R = crate::BitReader;
23pub type TIM8RST_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type USART1RST_R = crate::BitReader;
27pub type USART1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type TIM15RST_R = crate::BitReader;
31pub type TIM15RST_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type TIM16RST_R = crate::BitReader;
35pub type TIM16RST_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type TIM17RST_R = crate::BitReader;
39pub type TIM17RST_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type SAI1RST_R = crate::BitReader;
43pub type SAI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type SAI2RST_R = crate::BitReader;
47pub type SAI2RST_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type DFSDMRST_R = crate::BitReader;
51pub type DFSDMRST_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[inline(always)]
56 pub fn syscfgrst(&self) -> SYSCFGRST_R {
57 SYSCFGRST_R::new((self.bits & 1) != 0)
58 }
59 #[inline(always)]
61 pub fn sdmmcrst(&self) -> SDMMCRST_R {
62 SDMMCRST_R::new(((self.bits >> 10) & 1) != 0)
63 }
64 #[inline(always)]
66 pub fn tim1rst(&self) -> TIM1RST_R {
67 TIM1RST_R::new(((self.bits >> 11) & 1) != 0)
68 }
69 #[inline(always)]
71 pub fn spi1rst(&self) -> SPI1RST_R {
72 SPI1RST_R::new(((self.bits >> 12) & 1) != 0)
73 }
74 #[inline(always)]
76 pub fn tim8rst(&self) -> TIM8RST_R {
77 TIM8RST_R::new(((self.bits >> 13) & 1) != 0)
78 }
79 #[inline(always)]
81 pub fn usart1rst(&self) -> USART1RST_R {
82 USART1RST_R::new(((self.bits >> 14) & 1) != 0)
83 }
84 #[inline(always)]
86 pub fn tim15rst(&self) -> TIM15RST_R {
87 TIM15RST_R::new(((self.bits >> 16) & 1) != 0)
88 }
89 #[inline(always)]
91 pub fn tim16rst(&self) -> TIM16RST_R {
92 TIM16RST_R::new(((self.bits >> 17) & 1) != 0)
93 }
94 #[inline(always)]
96 pub fn tim17rst(&self) -> TIM17RST_R {
97 TIM17RST_R::new(((self.bits >> 18) & 1) != 0)
98 }
99 #[inline(always)]
101 pub fn sai1rst(&self) -> SAI1RST_R {
102 SAI1RST_R::new(((self.bits >> 21) & 1) != 0)
103 }
104 #[inline(always)]
106 pub fn sai2rst(&self) -> SAI2RST_R {
107 SAI2RST_R::new(((self.bits >> 22) & 1) != 0)
108 }
109 #[inline(always)]
111 pub fn dfsdmrst(&self) -> DFSDMRST_R {
112 DFSDMRST_R::new(((self.bits >> 24) & 1) != 0)
113 }
114}
115impl core::fmt::Debug for R {
116 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
117 f.debug_struct("APB2RSTR")
118 .field("dfsdmrst", &self.dfsdmrst())
119 .field("sai2rst", &self.sai2rst())
120 .field("sai1rst", &self.sai1rst())
121 .field("tim17rst", &self.tim17rst())
122 .field("tim16rst", &self.tim16rst())
123 .field("tim15rst", &self.tim15rst())
124 .field("usart1rst", &self.usart1rst())
125 .field("tim8rst", &self.tim8rst())
126 .field("spi1rst", &self.spi1rst())
127 .field("tim1rst", &self.tim1rst())
128 .field("sdmmcrst", &self.sdmmcrst())
129 .field("syscfgrst", &self.syscfgrst())
130 .finish()
131 }
132}
133impl W {
134 #[inline(always)]
136 pub fn syscfgrst(&mut self) -> SYSCFGRST_W<APB2RSTRrs> {
137 SYSCFGRST_W::new(self, 0)
138 }
139 #[inline(always)]
141 pub fn sdmmcrst(&mut self) -> SDMMCRST_W<APB2RSTRrs> {
142 SDMMCRST_W::new(self, 10)
143 }
144 #[inline(always)]
146 pub fn tim1rst(&mut self) -> TIM1RST_W<APB2RSTRrs> {
147 TIM1RST_W::new(self, 11)
148 }
149 #[inline(always)]
151 pub fn spi1rst(&mut self) -> SPI1RST_W<APB2RSTRrs> {
152 SPI1RST_W::new(self, 12)
153 }
154 #[inline(always)]
156 pub fn tim8rst(&mut self) -> TIM8RST_W<APB2RSTRrs> {
157 TIM8RST_W::new(self, 13)
158 }
159 #[inline(always)]
161 pub fn usart1rst(&mut self) -> USART1RST_W<APB2RSTRrs> {
162 USART1RST_W::new(self, 14)
163 }
164 #[inline(always)]
166 pub fn tim15rst(&mut self) -> TIM15RST_W<APB2RSTRrs> {
167 TIM15RST_W::new(self, 16)
168 }
169 #[inline(always)]
171 pub fn tim16rst(&mut self) -> TIM16RST_W<APB2RSTRrs> {
172 TIM16RST_W::new(self, 17)
173 }
174 #[inline(always)]
176 pub fn tim17rst(&mut self) -> TIM17RST_W<APB2RSTRrs> {
177 TIM17RST_W::new(self, 18)
178 }
179 #[inline(always)]
181 pub fn sai1rst(&mut self) -> SAI1RST_W<APB2RSTRrs> {
182 SAI1RST_W::new(self, 21)
183 }
184 #[inline(always)]
186 pub fn sai2rst(&mut self) -> SAI2RST_W<APB2RSTRrs> {
187 SAI2RST_W::new(self, 22)
188 }
189 #[inline(always)]
191 pub fn dfsdmrst(&mut self) -> DFSDMRST_W<APB2RSTRrs> {
192 DFSDMRST_W::new(self, 24)
193 }
194}
195pub struct APB2RSTRrs;
201impl crate::RegisterSpec for APB2RSTRrs {
202 type Ux = u32;
203}
204impl crate::Readable for APB2RSTRrs {}
206impl crate::Writable for APB2RSTRrs {
208 type Safety = crate::Unsafe;
209}
210impl crate::Resettable for APB2RSTRrs {}