stm32l4/stm32l4x1/flash/
acr.rs1pub type R = crate::R<ACRrs>;
3pub type W = crate::W<ACRrs>;
5pub type LATENCY_R = crate::FieldReader;
7pub type LATENCY_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9pub type PRFTEN_R = crate::BitReader;
11pub type PRFTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type ICEN_R = crate::BitReader;
15pub type ICEN_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type DCEN_R = crate::BitReader;
19pub type DCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type ICRST_R = crate::BitReader;
23pub type ICRST_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type DCRST_R = crate::BitReader;
27pub type DCRST_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type RUN_PD_R = crate::BitReader;
31pub type RUN_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type SLEEP_PD_R = crate::BitReader;
35pub type SLEEP_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[inline(always)]
40 pub fn latency(&self) -> LATENCY_R {
41 LATENCY_R::new((self.bits & 7) as u8)
42 }
43 #[inline(always)]
45 pub fn prften(&self) -> PRFTEN_R {
46 PRFTEN_R::new(((self.bits >> 8) & 1) != 0)
47 }
48 #[inline(always)]
50 pub fn icen(&self) -> ICEN_R {
51 ICEN_R::new(((self.bits >> 9) & 1) != 0)
52 }
53 #[inline(always)]
55 pub fn dcen(&self) -> DCEN_R {
56 DCEN_R::new(((self.bits >> 10) & 1) != 0)
57 }
58 #[inline(always)]
60 pub fn icrst(&self) -> ICRST_R {
61 ICRST_R::new(((self.bits >> 11) & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn dcrst(&self) -> DCRST_R {
66 DCRST_R::new(((self.bits >> 12) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn run_pd(&self) -> RUN_PD_R {
71 RUN_PD_R::new(((self.bits >> 13) & 1) != 0)
72 }
73 #[inline(always)]
75 pub fn sleep_pd(&self) -> SLEEP_PD_R {
76 SLEEP_PD_R::new(((self.bits >> 14) & 1) != 0)
77 }
78}
79impl core::fmt::Debug for R {
80 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
81 f.debug_struct("ACR")
82 .field("latency", &self.latency())
83 .field("prften", &self.prften())
84 .field("icen", &self.icen())
85 .field("dcen", &self.dcen())
86 .field("icrst", &self.icrst())
87 .field("dcrst", &self.dcrst())
88 .field("run_pd", &self.run_pd())
89 .field("sleep_pd", &self.sleep_pd())
90 .finish()
91 }
92}
93impl W {
94 #[inline(always)]
96 pub fn latency(&mut self) -> LATENCY_W<ACRrs> {
97 LATENCY_W::new(self, 0)
98 }
99 #[inline(always)]
101 pub fn prften(&mut self) -> PRFTEN_W<ACRrs> {
102 PRFTEN_W::new(self, 8)
103 }
104 #[inline(always)]
106 pub fn icen(&mut self) -> ICEN_W<ACRrs> {
107 ICEN_W::new(self, 9)
108 }
109 #[inline(always)]
111 pub fn dcen(&mut self) -> DCEN_W<ACRrs> {
112 DCEN_W::new(self, 10)
113 }
114 #[inline(always)]
116 pub fn icrst(&mut self) -> ICRST_W<ACRrs> {
117 ICRST_W::new(self, 11)
118 }
119 #[inline(always)]
121 pub fn dcrst(&mut self) -> DCRST_W<ACRrs> {
122 DCRST_W::new(self, 12)
123 }
124 #[inline(always)]
126 pub fn run_pd(&mut self) -> RUN_PD_W<ACRrs> {
127 RUN_PD_W::new(self, 13)
128 }
129 #[inline(always)]
131 pub fn sleep_pd(&mut self) -> SLEEP_PD_W<ACRrs> {
132 SLEEP_PD_W::new(self, 14)
133 }
134}
135pub struct ACRrs;
141impl crate::RegisterSpec for ACRrs {
142 type Ux = u32;
143}
144impl crate::Readable for ACRrs {}
146impl crate::Writable for ACRrs {
148 type Safety = crate::Unsafe;
149}
150impl crate::Resettable for ACRrs {
152 const RESET_VALUE: u32 = 0x0600;
153}