pub type R = crate::R<APB1_FZrs>;
pub type W = crate::W<APB1_FZrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_TIMER2_STOP {
Continue = 0,
Stop = 1,
}
impl From<DBG_TIMER2_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_TIMER2_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_TIMER2_STOP_R = crate::BitReader<DBG_TIMER2_STOP>;
impl DBG_TIMER2_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_TIMER2_STOP {
match self.bits {
false => DBG_TIMER2_STOP::Continue,
true => DBG_TIMER2_STOP::Stop,
}
}
#[inline(always)]
pub fn is_continue(&self) -> bool {
*self == DBG_TIMER2_STOP::Continue
}
#[inline(always)]
pub fn is_stop(&self) -> bool {
*self == DBG_TIMER2_STOP::Stop
}
}
pub type DBG_TIMER2_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_TIMER2_STOP>;
impl<'a, REG> DBG_TIMER2_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn continue_(self) -> &'a mut crate::W<REG> {
self.variant(DBG_TIMER2_STOP::Continue)
}
#[inline(always)]
pub fn stop(self) -> &'a mut crate::W<REG> {
self.variant(DBG_TIMER2_STOP::Stop)
}
}
pub use DBG_TIMER2_STOP_R as DBG_TIMER6_STOP_R;
pub use DBG_TIMER2_STOP_W as DBG_TIMER6_STOP_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_RTC_STOP {
Continue = 0,
Stop = 1,
}
impl From<DBG_RTC_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_RTC_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_RTC_STOP_R = crate::BitReader<DBG_RTC_STOP>;
impl DBG_RTC_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_RTC_STOP {
match self.bits {
false => DBG_RTC_STOP::Continue,
true => DBG_RTC_STOP::Stop,
}
}
#[inline(always)]
pub fn is_continue(&self) -> bool {
*self == DBG_RTC_STOP::Continue
}
#[inline(always)]
pub fn is_stop(&self) -> bool {
*self == DBG_RTC_STOP::Stop
}
}
pub type DBG_RTC_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_RTC_STOP>;
impl<'a, REG> DBG_RTC_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn continue_(self) -> &'a mut crate::W<REG> {
self.variant(DBG_RTC_STOP::Continue)
}
#[inline(always)]
pub fn stop(self) -> &'a mut crate::W<REG> {
self.variant(DBG_RTC_STOP::Stop)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_WWDG_STOP {
Continue = 0,
Stop = 1,
}
impl From<DBG_WWDG_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_WWDG_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_WWDG_STOP_R = crate::BitReader<DBG_WWDG_STOP>;
impl DBG_WWDG_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_WWDG_STOP {
match self.bits {
false => DBG_WWDG_STOP::Continue,
true => DBG_WWDG_STOP::Stop,
}
}
#[inline(always)]
pub fn is_continue(&self) -> bool {
*self == DBG_WWDG_STOP::Continue
}
#[inline(always)]
pub fn is_stop(&self) -> bool {
*self == DBG_WWDG_STOP::Stop
}
}
pub type DBG_WWDG_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_WWDG_STOP>;
impl<'a, REG> DBG_WWDG_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn continue_(self) -> &'a mut crate::W<REG> {
self.variant(DBG_WWDG_STOP::Continue)
}
#[inline(always)]
pub fn stop(self) -> &'a mut crate::W<REG> {
self.variant(DBG_WWDG_STOP::Stop)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_IWDG_STOP {
Continue = 0,
Stop = 1,
}
impl From<DBG_IWDG_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_IWDG_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_IWDG_STOP_R = crate::BitReader<DBG_IWDG_STOP>;
impl DBG_IWDG_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_IWDG_STOP {
match self.bits {
false => DBG_IWDG_STOP::Continue,
true => DBG_IWDG_STOP::Stop,
}
}
#[inline(always)]
pub fn is_continue(&self) -> bool {
*self == DBG_IWDG_STOP::Continue
}
#[inline(always)]
pub fn is_stop(&self) -> bool {
*self == DBG_IWDG_STOP::Stop
}
}
pub type DBG_IWDG_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_IWDG_STOP>;
impl<'a, REG> DBG_IWDG_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn continue_(self) -> &'a mut crate::W<REG> {
self.variant(DBG_IWDG_STOP::Continue)
}
#[inline(always)]
pub fn stop(self) -> &'a mut crate::W<REG> {
self.variant(DBG_IWDG_STOP::Stop)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_I2C1_STOP {
NormalMode = 0,
SmbusTimeoutFrozen = 1,
}
impl From<DBG_I2C1_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_I2C1_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_I2C1_STOP_R = crate::BitReader<DBG_I2C1_STOP>;
impl DBG_I2C1_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_I2C1_STOP {
match self.bits {
false => DBG_I2C1_STOP::NormalMode,
true => DBG_I2C1_STOP::SmbusTimeoutFrozen,
}
}
#[inline(always)]
pub fn is_normal_mode(&self) -> bool {
*self == DBG_I2C1_STOP::NormalMode
}
#[inline(always)]
pub fn is_smbus_timeout_frozen(&self) -> bool {
*self == DBG_I2C1_STOP::SmbusTimeoutFrozen
}
}
pub type DBG_I2C1_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_I2C1_STOP>;
impl<'a, REG> DBG_I2C1_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn normal_mode(self) -> &'a mut crate::W<REG> {
self.variant(DBG_I2C1_STOP::NormalMode)
}
#[inline(always)]
pub fn smbus_timeout_frozen(self) -> &'a mut crate::W<REG> {
self.variant(DBG_I2C1_STOP::SmbusTimeoutFrozen)
}
}
pub use DBG_I2C1_STOP_R as DBG_I2C2_STOP_R;
pub use DBG_I2C1_STOP_W as DBG_I2C2_STOP_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DBG_LPTIMER_STOP {
Continue = 0,
Stop = 1,
}
impl From<DBG_LPTIMER_STOP> for bool {
#[inline(always)]
fn from(variant: DBG_LPTIMER_STOP) -> Self {
variant as u8 != 0
}
}
pub type DBG_LPTIMER_STOP_R = crate::BitReader<DBG_LPTIMER_STOP>;
impl DBG_LPTIMER_STOP_R {
#[inline(always)]
pub const fn variant(&self) -> DBG_LPTIMER_STOP {
match self.bits {
false => DBG_LPTIMER_STOP::Continue,
true => DBG_LPTIMER_STOP::Stop,
}
}
#[inline(always)]
pub fn is_continue(&self) -> bool {
*self == DBG_LPTIMER_STOP::Continue
}
#[inline(always)]
pub fn is_stop(&self) -> bool {
*self == DBG_LPTIMER_STOP::Stop
}
}
pub type DBG_LPTIMER_STOP_W<'a, REG> = crate::BitWriter<'a, REG, DBG_LPTIMER_STOP>;
impl<'a, REG> DBG_LPTIMER_STOP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn continue_(self) -> &'a mut crate::W<REG> {
self.variant(DBG_LPTIMER_STOP::Continue)
}
#[inline(always)]
pub fn stop(self) -> &'a mut crate::W<REG> {
self.variant(DBG_LPTIMER_STOP::Stop)
}
}
impl R {
#[inline(always)]
pub fn dbg_timer2_stop(&self) -> DBG_TIMER2_STOP_R {
DBG_TIMER2_STOP_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn dbg_timer6_stop(&self) -> DBG_TIMER6_STOP_R {
DBG_TIMER6_STOP_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn dbg_rtc_stop(&self) -> DBG_RTC_STOP_R {
DBG_RTC_STOP_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn dbg_wwdg_stop(&self) -> DBG_WWDG_STOP_R {
DBG_WWDG_STOP_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn dbg_iwdg_stop(&self) -> DBG_IWDG_STOP_R {
DBG_IWDG_STOP_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn dbg_i2c1_stop(&self) -> DBG_I2C1_STOP_R {
DBG_I2C1_STOP_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn dbg_i2c2_stop(&self) -> DBG_I2C2_STOP_R {
DBG_I2C2_STOP_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn dbg_lptimer_stop(&self) -> DBG_LPTIMER_STOP_R {
DBG_LPTIMER_STOP_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB1_FZ")
.field("dbg_timer2_stop", &self.dbg_timer2_stop())
.field("dbg_timer6_stop", &self.dbg_timer6_stop())
.field("dbg_rtc_stop", &self.dbg_rtc_stop())
.field("dbg_wwdg_stop", &self.dbg_wwdg_stop())
.field("dbg_iwdg_stop", &self.dbg_iwdg_stop())
.field("dbg_i2c1_stop", &self.dbg_i2c1_stop())
.field("dbg_i2c2_stop", &self.dbg_i2c2_stop())
.field("dbg_lptimer_stop", &self.dbg_lptimer_stop())
.finish()
}
}
impl W {
#[inline(always)]
pub fn dbg_timer2_stop(&mut self) -> DBG_TIMER2_STOP_W<APB1_FZrs> {
DBG_TIMER2_STOP_W::new(self, 0)
}
#[inline(always)]
pub fn dbg_timer6_stop(&mut self) -> DBG_TIMER6_STOP_W<APB1_FZrs> {
DBG_TIMER6_STOP_W::new(self, 4)
}
#[inline(always)]
pub fn dbg_rtc_stop(&mut self) -> DBG_RTC_STOP_W<APB1_FZrs> {
DBG_RTC_STOP_W::new(self, 10)
}
#[inline(always)]
pub fn dbg_wwdg_stop(&mut self) -> DBG_WWDG_STOP_W<APB1_FZrs> {
DBG_WWDG_STOP_W::new(self, 11)
}
#[inline(always)]
pub fn dbg_iwdg_stop(&mut self) -> DBG_IWDG_STOP_W<APB1_FZrs> {
DBG_IWDG_STOP_W::new(self, 12)
}
#[inline(always)]
pub fn dbg_i2c1_stop(&mut self) -> DBG_I2C1_STOP_W<APB1_FZrs> {
DBG_I2C1_STOP_W::new(self, 21)
}
#[inline(always)]
pub fn dbg_i2c2_stop(&mut self) -> DBG_I2C2_STOP_W<APB1_FZrs> {
DBG_I2C2_STOP_W::new(self, 22)
}
#[inline(always)]
pub fn dbg_lptimer_stop(&mut self) -> DBG_LPTIMER_STOP_W<APB1_FZrs> {
DBG_LPTIMER_STOP_W::new(self, 31)
}
}
pub struct APB1_FZrs;
impl crate::RegisterSpec for APB1_FZrs {
type Ux = u32;
}
impl crate::Readable for APB1_FZrs {}
impl crate::Writable for APB1_FZrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB1_FZrs {}