stm32mp1/stm32mp157/ddrphyc/
dtar.rs

1///Register `DTAR` reader
2pub type R = crate::R<DTARrs>;
3///Register `DTAR` writer
4pub type W = crate::W<DTARrs>;
5///Field `DTCOL` reader - DTCOL
6pub type DTCOL_R = crate::FieldReader<u16>;
7///Field `DTCOL` writer - DTCOL
8pub type DTCOL_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9///Field `DTROW` reader - DTROW
10pub type DTROW_R = crate::FieldReader<u16>;
11///Field `DTROW` writer - DTROW
12pub type DTROW_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
13///Field `DTBANK` reader - DTBANK
14pub type DTBANK_R = crate::FieldReader;
15///Field `DTBANK` writer - DTBANK
16pub type DTBANK_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17///Field `DTMPR` reader - DTMPR
18pub type DTMPR_R = crate::BitReader;
19///Field `DTMPR` writer - DTMPR
20pub type DTMPR_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    ///Bits 0:11 - DTCOL
23    #[inline(always)]
24    pub fn dtcol(&self) -> DTCOL_R {
25        DTCOL_R::new((self.bits & 0x0fff) as u16)
26    }
27    ///Bits 12:27 - DTROW
28    #[inline(always)]
29    pub fn dtrow(&self) -> DTROW_R {
30        DTROW_R::new(((self.bits >> 12) & 0xffff) as u16)
31    }
32    ///Bits 28:30 - DTBANK
33    #[inline(always)]
34    pub fn dtbank(&self) -> DTBANK_R {
35        DTBANK_R::new(((self.bits >> 28) & 7) as u8)
36    }
37    ///Bit 31 - DTMPR
38    #[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    ///Bits 0:11 - DTCOL
55    #[inline(always)]
56    pub fn dtcol(&mut self) -> DTCOL_W<DTARrs> {
57        DTCOL_W::new(self, 0)
58    }
59    ///Bits 12:27 - DTROW
60    #[inline(always)]
61    pub fn dtrow(&mut self) -> DTROW_W<DTARrs> {
62        DTROW_W::new(self, 12)
63    }
64    ///Bits 28:30 - DTBANK
65    #[inline(always)]
66    pub fn dtbank(&mut self) -> DTBANK_W<DTARrs> {
67        DTBANK_W::new(self, 28)
68    }
69    ///Bit 31 - DTMPR
70    #[inline(always)]
71    pub fn dtmpr(&mut self) -> DTMPR_W<DTARrs> {
72        DTMPR_W::new(self, 31)
73    }
74}
75/**DDRPHYC DTA register
76
77You can [`read`](crate::Reg::read) this register and get [`dtar::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dtar::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
78
79See register [structure](https://stm32-rs.github.io/stm32-rs/STM32MP157.html#DDRPHYC:DTAR)*/
80pub struct DTARrs;
81impl crate::RegisterSpec for DTARrs {
82    type Ux = u32;
83}
84///`read()` method returns [`dtar::R`](R) reader structure
85impl crate::Readable for DTARrs {}
86///`write(|w| ..)` method takes [`dtar::W`](W) writer structure
87impl crate::Writable for DTARrs {
88    type Safety = crate::Unsafe;
89}
90///`reset()` method sets DTAR to value 0
91impl crate::Resettable for DTARrs {}