esp32c6_lp/pmu/
main_state.rs

1#[doc = "Register `MAIN_STATE` reader"]
2pub type R = crate::R<MAIN_STATE_SPEC>;
3#[doc = "Field `MAIN_LAST_ST_STATE` reader - need_des"]
4pub type MAIN_LAST_ST_STATE_R = crate::FieldReader;
5#[doc = "Field `MAIN_TAR_ST_STATE` reader - need_des"]
6pub type MAIN_TAR_ST_STATE_R = crate::FieldReader;
7#[doc = "Field `MAIN_CUR_ST_STATE` reader - need_des"]
8pub type MAIN_CUR_ST_STATE_R = crate::FieldReader;
9impl R {
10    #[doc = "Bits 11:17 - need_des"]
11    #[inline(always)]
12    pub fn main_last_st_state(&self) -> MAIN_LAST_ST_STATE_R {
13        MAIN_LAST_ST_STATE_R::new(((self.bits >> 11) & 0x7f) as u8)
14    }
15    #[doc = "Bits 18:24 - need_des"]
16    #[inline(always)]
17    pub fn main_tar_st_state(&self) -> MAIN_TAR_ST_STATE_R {
18        MAIN_TAR_ST_STATE_R::new(((self.bits >> 18) & 0x7f) as u8)
19    }
20    #[doc = "Bits 25:31 - need_des"]
21    #[inline(always)]
22    pub fn main_cur_st_state(&self) -> MAIN_CUR_ST_STATE_R {
23        MAIN_CUR_ST_STATE_R::new(((self.bits >> 25) & 0x7f) as u8)
24    }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for R {
28    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29        f.debug_struct("MAIN_STATE")
30            .field("main_last_st_state", &self.main_last_st_state())
31            .field("main_tar_st_state", &self.main_tar_st_state())
32            .field("main_cur_st_state", &self.main_cur_st_state())
33            .finish()
34    }
35}
36#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`main_state::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct MAIN_STATE_SPEC;
38impl crate::RegisterSpec for MAIN_STATE_SPEC {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [`main_state::R`](R) reader structure"]
42impl crate::Readable for MAIN_STATE_SPEC {}
43#[doc = "`reset()` method sets MAIN_STATE to value 0x0810_0800"]
44impl crate::Resettable for MAIN_STATE_SPEC {
45    const RESET_VALUE: u32 = 0x0810_0800;
46}