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 PHYSUSP_W<'a, REG> = crate::BitWriter<'a, REG>;
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)
}
}
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())
.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 physusp(&mut self) -> PHYSUSP_W<PCGCCTLrs> {
PHYSUSP_W::new(self, 4)
}
}
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 {}