pub type R = crate::R<HFBUSCLKEN0rs>;
pub type W = crate::W<HFBUSCLKEN0rs>;
pub type LeR = crate::BitReader;
pub type LeW<'a, REG> = crate::BitWriter<'a, REG>;
pub type CryptoR = crate::BitReader;
pub type CryptoW<'a, REG> = crate::BitWriter<'a, REG>;
pub type GpioR = crate::BitReader;
pub type GpioW<'a, REG> = crate::BitWriter<'a, REG>;
pub type PrsR = crate::BitReader;
pub type PrsW<'a, REG> = crate::BitWriter<'a, REG>;
pub type LdmaR = crate::BitReader;
pub type LdmaW<'a, REG> = crate::BitWriter<'a, REG>;
pub type GpcrcR = crate::BitReader;
pub type GpcrcW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn le(&self) -> LeR {
LeR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn crypto(&self) -> CryptoR {
CryptoR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn gpio(&self) -> GpioR {
GpioR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn prs(&self) -> PrsR {
PrsR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ldma(&self) -> LdmaR {
LdmaR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn gpcrc(&self) -> GpcrcR {
GpcrcR::new(((self.bits >> 5) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("HFBUSCLKEN0")
.field("le", &self.le())
.field("crypto", &self.crypto())
.field("gpio", &self.gpio())
.field("prs", &self.prs())
.field("ldma", &self.ldma())
.field("gpcrc", &self.gpcrc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn le(&mut self) -> LeW<'_, HFBUSCLKEN0rs> {
LeW::new(self, 0)
}
#[inline(always)]
pub fn crypto(&mut self) -> CryptoW<'_, HFBUSCLKEN0rs> {
CryptoW::new(self, 1)
}
#[inline(always)]
pub fn gpio(&mut self) -> GpioW<'_, HFBUSCLKEN0rs> {
GpioW::new(self, 2)
}
#[inline(always)]
pub fn prs(&mut self) -> PrsW<'_, HFBUSCLKEN0rs> {
PrsW::new(self, 3)
}
#[inline(always)]
pub fn ldma(&mut self) -> LdmaW<'_, HFBUSCLKEN0rs> {
LdmaW::new(self, 4)
}
#[inline(always)]
pub fn gpcrc(&mut self) -> GpcrcW<'_, HFBUSCLKEN0rs> {
GpcrcW::new(self, 5)
}
}
pub struct HFBUSCLKEN0rs;
impl crate::RegisterSpec for HFBUSCLKEN0rs {
type Ux = u32;
}
impl crate::Readable for HFBUSCLKEN0rs {}
impl crate::Writable for HFBUSCLKEN0rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for HFBUSCLKEN0rs {}