pub type R = crate::R<APB4FZ1rs>;
pub type W = crate::W<APB4FZ1rs>;
pub type I2C4_R = crate::BitReader;
pub type I2C4_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPTIM2_R = crate::BitReader;
pub type LPTIM2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPTIM3_R = crate::BitReader;
pub type LPTIM3_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RTC_R = crate::BitReader;
pub type RTC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WDGLSCD_R = crate::BitReader;
pub type WDGLSCD_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn i2c4(&self) -> I2C4_R {
I2C4_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn lptim2(&self) -> LPTIM2_R {
LPTIM2_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn lptim3(&self) -> LPTIM3_R {
LPTIM3_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rtc(&self) -> RTC_R {
RTC_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn wdglscd(&self) -> WDGLSCD_R {
WDGLSCD_R::new(((self.bits >> 18) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB4FZ1")
.field("i2c4", &self.i2c4())
.field("lptim2", &self.lptim2())
.field("lptim3", &self.lptim3())
.field("rtc", &self.rtc())
.field("wdglscd", &self.wdglscd())
.finish()
}
}
impl W {
#[inline(always)]
pub fn i2c4(&mut self) -> I2C4_W<APB4FZ1rs> {
I2C4_W::new(self, 7)
}
#[inline(always)]
pub fn lptim2(&mut self) -> LPTIM2_W<APB4FZ1rs> {
LPTIM2_W::new(self, 9)
}
#[inline(always)]
pub fn lptim3(&mut self) -> LPTIM3_W<APB4FZ1rs> {
LPTIM3_W::new(self, 10)
}
#[inline(always)]
pub fn rtc(&mut self) -> RTC_W<APB4FZ1rs> {
RTC_W::new(self, 16)
}
#[inline(always)]
pub fn wdglscd(&mut self) -> WDGLSCD_W<APB4FZ1rs> {
WDGLSCD_W::new(self, 18)
}
}
pub struct APB4FZ1rs;
impl crate::RegisterSpec for APB4FZ1rs {
type Ux = u32;
}
impl crate::Readable for APB4FZ1rs {}
impl crate::Writable for APB4FZ1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB4FZ1rs {}