stm32mp1/stm32mp157/ddrphyc/
ddr3_mr2.rs1pub type R = crate::R<DDR3_MR2rs>;
3pub type W = crate::W<DDR3_MR2rs>;
5pub type PASR_R = crate::FieldReader;
7pub type PASR_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9pub type CWL_R = crate::FieldReader;
11pub type CWL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13pub type ASR_R = crate::BitReader;
15pub type ASR_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type SRT_R = crate::BitReader;
19pub type SRT_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type RTTWR_R = crate::FieldReader;
23pub type RTTWR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25impl R {
26 #[inline(always)]
28 pub fn pasr(&self) -> PASR_R {
29 PASR_R::new((self.bits & 7) as u8)
30 }
31 #[inline(always)]
33 pub fn cwl(&self) -> CWL_R {
34 CWL_R::new(((self.bits >> 3) & 7) as u8)
35 }
36 #[inline(always)]
38 pub fn asr(&self) -> ASR_R {
39 ASR_R::new(((self.bits >> 6) & 1) != 0)
40 }
41 #[inline(always)]
43 pub fn srt(&self) -> SRT_R {
44 SRT_R::new(((self.bits >> 7) & 1) != 0)
45 }
46 #[inline(always)]
48 pub fn rttwr(&self) -> RTTWR_R {
49 RTTWR_R::new(((self.bits >> 9) & 3) as u8)
50 }
51}
52impl core::fmt::Debug for R {
53 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
54 f.debug_struct("DDR3_MR2")
55 .field("pasr", &self.pasr())
56 .field("cwl", &self.cwl())
57 .field("asr", &self.asr())
58 .field("srt", &self.srt())
59 .field("rttwr", &self.rttwr())
60 .finish()
61 }
62}
63impl W {
64 #[inline(always)]
66 pub fn pasr(&mut self) -> PASR_W<DDR3_MR2rs> {
67 PASR_W::new(self, 0)
68 }
69 #[inline(always)]
71 pub fn cwl(&mut self) -> CWL_W<DDR3_MR2rs> {
72 CWL_W::new(self, 3)
73 }
74 #[inline(always)]
76 pub fn asr(&mut self) -> ASR_W<DDR3_MR2rs> {
77 ASR_W::new(self, 6)
78 }
79 #[inline(always)]
81 pub fn srt(&mut self) -> SRT_W<DDR3_MR2rs> {
82 SRT_W::new(self, 7)
83 }
84 #[inline(always)]
86 pub fn rttwr(&mut self) -> RTTWR_W<DDR3_MR2rs> {
87 RTTWR_W::new(self, 9)
88 }
89}
90pub struct DDR3_MR2rs;
96impl crate::RegisterSpec for DDR3_MR2rs {
97 type Ux = u16;
98}
99impl crate::Readable for DDR3_MR2rs {}
101impl crate::Writable for DDR3_MR2rs {
103 type Safety = crate::Unsafe;
104}
105impl crate::Resettable for DDR3_MR2rs {}