mimxrt685s_pac/pmc/
runctrl.rs1#[doc = "Register `RUNCTRL` reader"]
2pub type R = crate::R<RunctrlSpec>;
3#[doc = "Register `RUNCTRL` writer"]
4pub type W = crate::W<RunctrlSpec>;
5#[doc = "Field `CORELVL` reader - Vddcore voltage value when SYSCTL is in run mode"]
6pub type CorelvlR = crate::FieldReader;
7#[doc = "Field `CORELVL` writer - Vddcore voltage value when SYSCTL is in run mode"]
8pub type CorelvlW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9impl R {
10 #[doc = "Bits 0:5 - Vddcore voltage value when SYSCTL is in run mode"]
11 #[inline(always)]
12 pub fn corelvl(&self) -> CorelvlR {
13 CorelvlR::new((self.bits & 0x3f) as u8)
14 }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19 f.debug_struct("RUNCTRL")
20 .field("corelvl", &self.corelvl())
21 .finish()
22 }
23}
24impl W {
25 #[doc = "Bits 0:5 - Vddcore voltage value when SYSCTL is in run mode"]
26 #[inline(always)]
27 pub fn corelvl(&mut self) -> CorelvlW<RunctrlSpec> {
28 CorelvlW::new(self, 0)
29 }
30}
31#[doc = "PMC controls used during run mode\n\nYou can [`read`](crate::Reg::read) this register and get [`runctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`runctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct RunctrlSpec;
33impl crate::RegisterSpec for RunctrlSpec {
34 type Ux = u32;
35}
36#[doc = "`read()` method returns [`runctrl::R`](R) reader structure"]
37impl crate::Readable for RunctrlSpec {}
38#[doc = "`write(|w| ..)` method takes [`runctrl::W`](W) writer structure"]
39impl crate::Writable for RunctrlSpec {
40 type Safety = crate::Unsafe;
41 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
42 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43}
44#[doc = "`reset()` method sets RUNCTRL to value 0x21"]
45impl crate::Resettable for RunctrlSpec {
46 const RESET_VALUE: u32 = 0x21;
47}