pub type R = crate::R<HFPERCLKEN0rs>;
pub type W = crate::W<HFPERCLKEN0rs>;
pub type Timer0R = crate::BitReader;
pub type Timer0W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Timer1R = crate::BitReader;
pub type Timer1W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Usart0R = crate::BitReader;
pub type Usart0W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Usart1R = crate::BitReader;
pub type Usart1W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Acmp0R = crate::BitReader;
pub type Acmp0W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Acmp1R = crate::BitReader;
pub type Acmp1W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CryotimerR = crate::BitReader;
pub type CryotimerW<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2c0R = crate::BitReader;
pub type I2c0W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Adc0R = crate::BitReader;
pub type Adc0W<'a, REG> = crate::BitWriter<'a, REG>;
pub type Idac0R = crate::BitReader;
pub type Idac0W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn timer0(&self) -> Timer0R {
Timer0R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn timer1(&self) -> Timer1R {
Timer1R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn usart0(&self) -> Usart0R {
Usart0R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn usart1(&self) -> Usart1R {
Usart1R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn acmp0(&self) -> Acmp0R {
Acmp0R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn acmp1(&self) -> Acmp1R {
Acmp1R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn cryotimer(&self) -> CryotimerR {
CryotimerR::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn i2c0(&self) -> I2c0R {
I2c0R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn adc0(&self) -> Adc0R {
Adc0R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn idac0(&self) -> Idac0R {
Idac0R::new(((self.bits >> 9) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("HFPERCLKEN0")
.field("timer0", &self.timer0())
.field("timer1", &self.timer1())
.field("usart0", &self.usart0())
.field("usart1", &self.usart1())
.field("acmp0", &self.acmp0())
.field("acmp1", &self.acmp1())
.field("cryotimer", &self.cryotimer())
.field("i2c0", &self.i2c0())
.field("adc0", &self.adc0())
.field("idac0", &self.idac0())
.finish()
}
}
impl W {
#[inline(always)]
pub fn timer0(&mut self) -> Timer0W<'_, HFPERCLKEN0rs> {
Timer0W::new(self, 0)
}
#[inline(always)]
pub fn timer1(&mut self) -> Timer1W<'_, HFPERCLKEN0rs> {
Timer1W::new(self, 1)
}
#[inline(always)]
pub fn usart0(&mut self) -> Usart0W<'_, HFPERCLKEN0rs> {
Usart0W::new(self, 2)
}
#[inline(always)]
pub fn usart1(&mut self) -> Usart1W<'_, HFPERCLKEN0rs> {
Usart1W::new(self, 3)
}
#[inline(always)]
pub fn acmp0(&mut self) -> Acmp0W<'_, HFPERCLKEN0rs> {
Acmp0W::new(self, 4)
}
#[inline(always)]
pub fn acmp1(&mut self) -> Acmp1W<'_, HFPERCLKEN0rs> {
Acmp1W::new(self, 5)
}
#[inline(always)]
pub fn cryotimer(&mut self) -> CryotimerW<'_, HFPERCLKEN0rs> {
CryotimerW::new(self, 6)
}
#[inline(always)]
pub fn i2c0(&mut self) -> I2c0W<'_, HFPERCLKEN0rs> {
I2c0W::new(self, 7)
}
#[inline(always)]
pub fn adc0(&mut self) -> Adc0W<'_, HFPERCLKEN0rs> {
Adc0W::new(self, 8)
}
#[inline(always)]
pub fn idac0(&mut self) -> Idac0W<'_, HFPERCLKEN0rs> {
Idac0W::new(self, 9)
}
}
pub struct HFPERCLKEN0rs;
impl crate::RegisterSpec for HFPERCLKEN0rs {
type Ux = u32;
}
impl crate::Readable for HFPERCLKEN0rs {}
impl crate::Writable for HFPERCLKEN0rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for HFPERCLKEN0rs {}