stm32mp1/stm32mp157/ddrctrl/
stat.rs

1///Register `STAT` reader
2pub type R = crate::R<STATrs>;
3///Field `OPERATING_MODE` reader - OPERATING_MODE
4pub type OPERATING_MODE_R = crate::FieldReader;
5///Field `SELFREF_TYPE` reader - SELFREF_TYPE
6pub type SELFREF_TYPE_R = crate::FieldReader;
7///Field `SELFREF_CAM_NOT_EMPTY` reader - SELFREF_CAM_NOT_EMPTY
8pub type SELFREF_CAM_NOT_EMPTY_R = crate::BitReader;
9impl R {
10    ///Bits 0:2 - OPERATING_MODE
11    #[inline(always)]
12    pub fn operating_mode(&self) -> OPERATING_MODE_R {
13        OPERATING_MODE_R::new((self.bits & 7) as u8)
14    }
15    ///Bits 4:5 - SELFREF_TYPE
16    #[inline(always)]
17    pub fn selfref_type(&self) -> SELFREF_TYPE_R {
18        SELFREF_TYPE_R::new(((self.bits >> 4) & 3) as u8)
19    }
20    ///Bit 12 - SELFREF_CAM_NOT_EMPTY
21    #[inline(always)]
22    pub fn selfref_cam_not_empty(&self) -> SELFREF_CAM_NOT_EMPTY_R {
23        SELFREF_CAM_NOT_EMPTY_R::new(((self.bits >> 12) & 1) != 0)
24    }
25}
26impl core::fmt::Debug for R {
27    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28        f.debug_struct("STAT")
29            .field("operating_mode", &self.operating_mode())
30            .field("selfref_type", &self.selfref_type())
31            .field("selfref_cam_not_empty", &self.selfref_cam_not_empty())
32            .finish()
33    }
34}
35/**DDRCTRL operating mode status register
36
37You can [`read`](crate::Reg::read) this register and get [`stat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
38
39See register [structure](https://stm32-rs.github.io/stm32-rs/STM32MP157.html#DDRCTRL:STAT)*/
40pub struct STATrs;
41impl crate::RegisterSpec for STATrs {
42    type Ux = u32;
43}
44///`read()` method returns [`stat::R`](R) reader structure
45impl crate::Readable for STATrs {}
46///`reset()` method sets STAT to value 0
47impl crate::Resettable for STATrs {}