pub type R = crate::R<APB1FZRrs>;
pub type W = crate::W<APB1FZRrs>;
pub type TIM2_R = crate::BitReader;
pub type TIM2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM3_R = crate::BitReader;
pub type TIM3_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM4_R = crate::BitReader;
pub type TIM4_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM5_R = crate::BitReader;
pub type TIM5_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM6_R = crate::BitReader;
pub type TIM6_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM7_R = crate::BitReader;
pub type TIM7_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM12_R = crate::BitReader;
pub type TIM12_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM13_R = crate::BitReader;
pub type TIM13_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TIM14_R = crate::BitReader;
pub type TIM14_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPTIM1_R = crate::BitReader;
pub type LPTIM1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WWDG_R = crate::BitReader;
pub type WWDG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2C1_R = crate::BitReader;
pub type I2C1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2C2_R = crate::BitReader;
pub type I2C2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type I2C3_R = crate::BitReader;
pub type I2C3_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tim2(&self) -> TIM2_R {
TIM2_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn tim3(&self) -> TIM3_R {
TIM3_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn tim4(&self) -> TIM4_R {
TIM4_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn tim5(&self) -> TIM5_R {
TIM5_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn tim6(&self) -> TIM6_R {
TIM6_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn tim7(&self) -> TIM7_R {
TIM7_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tim12(&self) -> TIM12_R {
TIM12_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn tim13(&self) -> TIM13_R {
TIM13_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn tim14(&self) -> TIM14_R {
TIM14_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn lptim1(&self) -> LPTIM1_R {
LPTIM1_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn wwdg(&self) -> WWDG_R {
WWDG_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn i2c1(&self) -> I2C1_R {
I2C1_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn i2c2(&self) -> I2C2_R {
I2C2_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn i2c3(&self) -> I2C3_R {
I2C3_R::new(((self.bits >> 23) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB1FZR")
.field("tim2", &self.tim2())
.field("tim3", &self.tim3())
.field("tim4", &self.tim4())
.field("tim5", &self.tim5())
.field("tim6", &self.tim6())
.field("tim7", &self.tim7())
.field("tim12", &self.tim12())
.field("tim13", &self.tim13())
.field("tim14", &self.tim14())
.field("lptim1", &self.lptim1())
.field("wwdg", &self.wwdg())
.field("i2c1", &self.i2c1())
.field("i2c2", &self.i2c2())
.field("i2c3", &self.i2c3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tim2(&mut self) -> TIM2_W<APB1FZRrs> {
TIM2_W::new(self, 0)
}
#[inline(always)]
pub fn tim3(&mut self) -> TIM3_W<APB1FZRrs> {
TIM3_W::new(self, 1)
}
#[inline(always)]
pub fn tim4(&mut self) -> TIM4_W<APB1FZRrs> {
TIM4_W::new(self, 2)
}
#[inline(always)]
pub fn tim5(&mut self) -> TIM5_W<APB1FZRrs> {
TIM5_W::new(self, 3)
}
#[inline(always)]
pub fn tim6(&mut self) -> TIM6_W<APB1FZRrs> {
TIM6_W::new(self, 4)
}
#[inline(always)]
pub fn tim7(&mut self) -> TIM7_W<APB1FZRrs> {
TIM7_W::new(self, 5)
}
#[inline(always)]
pub fn tim12(&mut self) -> TIM12_W<APB1FZRrs> {
TIM12_W::new(self, 6)
}
#[inline(always)]
pub fn tim13(&mut self) -> TIM13_W<APB1FZRrs> {
TIM13_W::new(self, 7)
}
#[inline(always)]
pub fn tim14(&mut self) -> TIM14_W<APB1FZRrs> {
TIM14_W::new(self, 8)
}
#[inline(always)]
pub fn lptim1(&mut self) -> LPTIM1_W<APB1FZRrs> {
LPTIM1_W::new(self, 9)
}
#[inline(always)]
pub fn wwdg(&mut self) -> WWDG_W<APB1FZRrs> {
WWDG_W::new(self, 11)
}
#[inline(always)]
pub fn i2c1(&mut self) -> I2C1_W<APB1FZRrs> {
I2C1_W::new(self, 21)
}
#[inline(always)]
pub fn i2c2(&mut self) -> I2C2_W<APB1FZRrs> {
I2C2_W::new(self, 22)
}
#[inline(always)]
pub fn i2c3(&mut self) -> I2C3_W<APB1FZRrs> {
I2C3_W::new(self, 23)
}
}
pub struct APB1FZRrs;
impl crate::RegisterSpec for APB1FZRrs {
type Ux = u32;
}
impl crate::Readable for APB1FZRrs {}
impl crate::Writable for APB1FZRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB1FZRrs {}