stm32mp1/stm32mp157/ddrphyc/
dtar.rs1pub type R = crate::R<DTARrs>;
3pub type W = crate::W<DTARrs>;
5pub type DTCOL_R = crate::FieldReader<u16>;
7pub type DTCOL_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9pub type DTROW_R = crate::FieldReader<u16>;
11pub type DTROW_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13pub type DTBANK_R = crate::FieldReader;
15pub type DTBANK_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17pub type DTMPR_R = crate::BitReader;
19pub type DTMPR_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[inline(always)]
24 pub fn dtcol(&self) -> DTCOL_R {
25 DTCOL_R::new((self.bits & 0x0fff) as u16)
26 }
27 #[inline(always)]
29 pub fn dtrow(&self) -> DTROW_R {
30 DTROW_R::new(((self.bits >> 12) & 0xffff) as u16)
31 }
32 #[inline(always)]
34 pub fn dtbank(&self) -> DTBANK_R {
35 DTBANK_R::new(((self.bits >> 28) & 7) as u8)
36 }
37 #[inline(always)]
39 pub fn dtmpr(&self) -> DTMPR_R {
40 DTMPR_R::new(((self.bits >> 31) & 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("DTAR")
46 .field("dtcol", &self.dtcol())
47 .field("dtrow", &self.dtrow())
48 .field("dtbank", &self.dtbank())
49 .field("dtmpr", &self.dtmpr())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn dtcol(&mut self) -> DTCOL_W<DTARrs> {
57 DTCOL_W::new(self, 0)
58 }
59 #[inline(always)]
61 pub fn dtrow(&mut self) -> DTROW_W<DTARrs> {
62 DTROW_W::new(self, 12)
63 }
64 #[inline(always)]
66 pub fn dtbank(&mut self) -> DTBANK_W<DTARrs> {
67 DTBANK_W::new(self, 28)
68 }
69 #[inline(always)]
71 pub fn dtmpr(&mut self) -> DTMPR_W<DTARrs> {
72 DTMPR_W::new(self, 31)
73 }
74}
75pub struct DTARrs;
81impl crate::RegisterSpec for DTARrs {
82 type Ux = u32;
83}
84impl crate::Readable for DTARrs {}
86impl crate::Writable for DTARrs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for DTARrs {}