stm32l4/stm32l4x1/rcc/
apb1rstr2.rs1pub type R = crate::R<APB1RSTR2rs>;
3pub type W = crate::W<APB1RSTR2rs>;
5pub type LPUART1RST_R = crate::BitReader;
7pub type LPUART1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type I2C4RST_R = crate::BitReader;
11pub type I2C4RST_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type SWPMI1RST_R = crate::BitReader;
15pub type SWPMI1RST_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type LPTIM2RST_R = crate::BitReader;
19pub type LPTIM2RST_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[inline(always)]
24 pub fn lpuart1rst(&self) -> LPUART1RST_R {
25 LPUART1RST_R::new((self.bits & 1) != 0)
26 }
27 #[inline(always)]
29 pub fn i2c4rst(&self) -> I2C4RST_R {
30 I2C4RST_R::new(((self.bits >> 1) & 1) != 0)
31 }
32 #[inline(always)]
34 pub fn swpmi1rst(&self) -> SWPMI1RST_R {
35 SWPMI1RST_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[inline(always)]
39 pub fn lptim2rst(&self) -> LPTIM2RST_R {
40 LPTIM2RST_R::new(((self.bits >> 5) & 1) != 0)
41 }
42}
43impl core::fmt::Debug for R {
44 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45 f.debug_struct("APB1RSTR2")
46 .field("lptim2rst", &self.lptim2rst())
47 .field("swpmi1rst", &self.swpmi1rst())
48 .field("lpuart1rst", &self.lpuart1rst())
49 .field("i2c4rst", &self.i2c4rst())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn lpuart1rst(&mut self) -> LPUART1RST_W<APB1RSTR2rs> {
57 LPUART1RST_W::new(self, 0)
58 }
59 #[inline(always)]
61 pub fn i2c4rst(&mut self) -> I2C4RST_W<APB1RSTR2rs> {
62 I2C4RST_W::new(self, 1)
63 }
64 #[inline(always)]
66 pub fn swpmi1rst(&mut self) -> SWPMI1RST_W<APB1RSTR2rs> {
67 SWPMI1RST_W::new(self, 2)
68 }
69 #[inline(always)]
71 pub fn lptim2rst(&mut self) -> LPTIM2RST_W<APB1RSTR2rs> {
72 LPTIM2RST_W::new(self, 5)
73 }
74}
75pub struct APB1RSTR2rs;
81impl crate::RegisterSpec for APB1RSTR2rs {
82 type Ux = u32;
83}
84impl crate::Readable for APB1RSTR2rs {}
86impl crate::Writable for APB1RSTR2rs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for APB1RSTR2rs {}