pub type R = crate::R<PCGCCTLrs>;
pub type W = crate::W<PCGCCTLrs>;
pub type STPPCLK_R = crate::BitReader;
pub type STPPCLK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GATEHCLK_R = crate::BitReader;
pub type GATEHCLK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PHYSUSP_R = crate::BitReader;
pub type ENL1GTG_R = crate::BitReader;
pub type ENL1GTG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PHYSLEEP_R = crate::BitReader;
pub type SUSP_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn stppclk(&self) -> STPPCLK_R {
STPPCLK_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn gatehclk(&self) -> GATEHCLK_R {
GATEHCLK_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn physusp(&self) -> PHYSUSP_R {
PHYSUSP_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn enl1gtg(&self) -> ENL1GTG_R {
ENL1GTG_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn physleep(&self) -> PHYSLEEP_R {
PHYSLEEP_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn susp(&self) -> SUSP_R {
SUSP_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PCGCCTL")
.field("stppclk", &self.stppclk())
.field("gatehclk", &self.gatehclk())
.field("physusp", &self.physusp())
.field("enl1gtg", &self.enl1gtg())
.field("physleep", &self.physleep())
.field("susp", &self.susp())
.finish()
}
}
impl W {
#[inline(always)]
pub fn stppclk(&mut self) -> STPPCLK_W<PCGCCTLrs> {
STPPCLK_W::new(self, 0)
}
#[inline(always)]
pub fn gatehclk(&mut self) -> GATEHCLK_W<PCGCCTLrs> {
GATEHCLK_W::new(self, 1)
}
#[inline(always)]
pub fn enl1gtg(&mut self) -> ENL1GTG_W<PCGCCTLrs> {
ENL1GTG_W::new(self, 5)
}
}
pub struct PCGCCTLrs;
impl crate::RegisterSpec for PCGCCTLrs {
type Ux = u32;
}
impl crate::Readable for PCGCCTLrs {}
impl crate::Writable for PCGCCTLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PCGCCTLrs {
const RESET_VALUE: u32 = 0x200b_8000;
}