esp32c6_lp/pmu/
pwr_state.rs

1#[doc = "Register `PWR_STATE` reader"]
2pub type R = crate::R<PWR_STATE_SPEC>;
3#[doc = "Field `BACKUP_ST_STATE` reader - need_des"]
4pub type BACKUP_ST_STATE_R = crate::FieldReader;
5#[doc = "Field `LP_PWR_ST_STATE` reader - need_des"]
6pub type LP_PWR_ST_STATE_R = crate::FieldReader;
7#[doc = "Field `HP_PWR_ST_STATE` reader - need_des"]
8pub type HP_PWR_ST_STATE_R = crate::FieldReader<u16>;
9impl R {
10    #[doc = "Bits 13:17 - need_des"]
11    #[inline(always)]
12    pub fn backup_st_state(&self) -> BACKUP_ST_STATE_R {
13        BACKUP_ST_STATE_R::new(((self.bits >> 13) & 0x1f) as u8)
14    }
15    #[doc = "Bits 18:22 - need_des"]
16    #[inline(always)]
17    pub fn lp_pwr_st_state(&self) -> LP_PWR_ST_STATE_R {
18        LP_PWR_ST_STATE_R::new(((self.bits >> 18) & 0x1f) as u8)
19    }
20    #[doc = "Bits 23:31 - need_des"]
21    #[inline(always)]
22    pub fn hp_pwr_st_state(&self) -> HP_PWR_ST_STATE_R {
23        HP_PWR_ST_STATE_R::new(((self.bits >> 23) & 0x01ff) as u16)
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("PWR_STATE")
30            .field("backup_st_state", &self.backup_st_state())
31            .field("lp_pwr_st_state", &self.lp_pwr_st_state())
32            .field("hp_pwr_st_state", &self.hp_pwr_st_state())
33            .finish()
34    }
35}
36#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`pwr_state::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct PWR_STATE_SPEC;
38impl crate::RegisterSpec for PWR_STATE_SPEC {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [`pwr_state::R`](R) reader structure"]
42impl crate::Readable for PWR_STATE_SPEC {}
43#[doc = "`reset()` method sets PWR_STATE to value 0x0080_2000"]
44impl crate::Resettable for PWR_STATE_SPEC {
45    const RESET_VALUE: u32 = 0x0080_2000;
46}