stm32l4/stm32l4x1/pwr/
cr1.rs1pub type R = crate::R<CR1rs>;
3pub type W = crate::W<CR1rs>;
5pub type LPMS_R = crate::FieldReader;
7pub type LPMS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9pub type DBP_R = crate::BitReader;
11pub type DBP_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type VOS_R = crate::FieldReader;
15pub type VOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17pub type LPR_R = crate::BitReader;
19pub type LPR_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[inline(always)]
24 pub fn lpms(&self) -> LPMS_R {
25 LPMS_R::new((self.bits & 7) as u8)
26 }
27 #[inline(always)]
29 pub fn dbp(&self) -> DBP_R {
30 DBP_R::new(((self.bits >> 8) & 1) != 0)
31 }
32 #[inline(always)]
34 pub fn vos(&self) -> VOS_R {
35 VOS_R::new(((self.bits >> 9) & 3) as u8)
36 }
37 #[inline(always)]
39 pub fn lpr(&self) -> LPR_R {
40 LPR_R::new(((self.bits >> 14) & 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("CR1")
46 .field("lpr", &self.lpr())
47 .field("vos", &self.vos())
48 .field("dbp", &self.dbp())
49 .field("lpms", &self.lpms())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn lpms(&mut self) -> LPMS_W<CR1rs> {
57 LPMS_W::new(self, 0)
58 }
59 #[inline(always)]
61 pub fn dbp(&mut self) -> DBP_W<CR1rs> {
62 DBP_W::new(self, 8)
63 }
64 #[inline(always)]
66 pub fn vos(&mut self) -> VOS_W<CR1rs> {
67 VOS_W::new(self, 9)
68 }
69 #[inline(always)]
71 pub fn lpr(&mut self) -> LPR_W<CR1rs> {
72 LPR_W::new(self, 14)
73 }
74}
75pub struct CR1rs;
81impl crate::RegisterSpec for CR1rs {
82 type Ux = u32;
83}
84impl crate::Readable for CR1rs {}
86impl crate::Writable for CR1rs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for CR1rs {
92 const RESET_VALUE: u32 = 0x0200;
93}