stm32mp1/stm32mp157/ddrctrl/
perfhpr1.rs

1///Register `PERFHPR1` reader
2pub type R = crate::R<PERFHPR1rs>;
3///Register `PERFHPR1` writer
4pub type W = crate::W<PERFHPR1rs>;
5///Field `HPR_MAX_STARVE` reader - HPR_MAX_STARVE
6pub type HPR_MAX_STARVE_R = crate::FieldReader<u16>;
7///Field `HPR_MAX_STARVE` writer - HPR_MAX_STARVE
8pub type HPR_MAX_STARVE_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9///Field `HPR_XACT_RUN_LENGTH` reader - HPR_XACT_RUN_LENGTH
10pub type HPR_XACT_RUN_LENGTH_R = crate::FieldReader;
11///Field `HPR_XACT_RUN_LENGTH` writer - HPR_XACT_RUN_LENGTH
12pub type HPR_XACT_RUN_LENGTH_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13impl R {
14    ///Bits 0:15 - HPR_MAX_STARVE
15    #[inline(always)]
16    pub fn hpr_max_starve(&self) -> HPR_MAX_STARVE_R {
17        HPR_MAX_STARVE_R::new((self.bits & 0xffff) as u16)
18    }
19    ///Bits 24:31 - HPR_XACT_RUN_LENGTH
20    #[inline(always)]
21    pub fn hpr_xact_run_length(&self) -> HPR_XACT_RUN_LENGTH_R {
22        HPR_XACT_RUN_LENGTH_R::new(((self.bits >> 24) & 0xff) as u8)
23    }
24}
25impl core::fmt::Debug for R {
26    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27        f.debug_struct("PERFHPR1")
28            .field("hpr_max_starve", &self.hpr_max_starve())
29            .field("hpr_xact_run_length", &self.hpr_xact_run_length())
30            .finish()
31    }
32}
33impl W {
34    ///Bits 0:15 - HPR_MAX_STARVE
35    #[inline(always)]
36    pub fn hpr_max_starve(&mut self) -> HPR_MAX_STARVE_W<PERFHPR1rs> {
37        HPR_MAX_STARVE_W::new(self, 0)
38    }
39    ///Bits 24:31 - HPR_XACT_RUN_LENGTH
40    #[inline(always)]
41    pub fn hpr_xact_run_length(&mut self) -> HPR_XACT_RUN_LENGTH_W<PERFHPR1rs> {
42        HPR_XACT_RUN_LENGTH_W::new(self, 24)
43    }
44}
45/**DDRCTRL high priority read CAM register 1
46
47You can [`read`](crate::Reg::read) this register and get [`perfhpr1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`perfhpr1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
48
49See register [structure](https://stm32-rs.github.io/stm32-rs/STM32MP157.html#DDRCTRL:PERFHPR1)*/
50pub struct PERFHPR1rs;
51impl crate::RegisterSpec for PERFHPR1rs {
52    type Ux = u32;
53}
54///`read()` method returns [`perfhpr1::R`](R) reader structure
55impl crate::Readable for PERFHPR1rs {}
56///`write(|w| ..)` method takes [`perfhpr1::W`](W) writer structure
57impl crate::Writable for PERFHPR1rs {
58    type Safety = crate::Unsafe;
59}
60///`reset()` method sets PERFHPR1 to value 0x0f00_0001
61impl crate::Resettable for PERFHPR1rs {
62    const RESET_VALUE: u32 = 0x0f00_0001;
63}