#[doc = "Register `EVT_EN` reader"]
pub type R = crate::R<EVT_EN_SPEC>;
#[doc = "Register `EVT_EN` writer"]
pub type W = crate::W<EVT_EN_SPEC>;
#[doc = "Field `EVT_TIMER0_STOP_EN` reader - set this bit high to enable timer0 stop event generate"]
pub type EVT_TIMER0_STOP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER0_STOP_EN` writer - set this bit high to enable timer0 stop event generate"]
pub type EVT_TIMER0_STOP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER1_STOP_EN` reader - set this bit high to enable timer1 stop event generate"]
pub type EVT_TIMER1_STOP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER1_STOP_EN` writer - set this bit high to enable timer1 stop event generate"]
pub type EVT_TIMER1_STOP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER2_STOP_EN` reader - set this bit high to enable timer2 stop event generate"]
pub type EVT_TIMER2_STOP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER2_STOP_EN` writer - set this bit high to enable timer2 stop event generate"]
pub type EVT_TIMER2_STOP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER0_TEZ_EN` reader - set this bit high to enable timer0 equal zero event generate"]
pub type EVT_TIMER0_TEZ_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER0_TEZ_EN` writer - set this bit high to enable timer0 equal zero event generate"]
pub type EVT_TIMER0_TEZ_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER1_TEZ_EN` reader - set this bit high to enable timer1 equal zero event generate"]
pub type EVT_TIMER1_TEZ_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER1_TEZ_EN` writer - set this bit high to enable timer1 equal zero event generate"]
pub type EVT_TIMER1_TEZ_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER2_TEZ_EN` reader - set this bit high to enable timer2 equal zero event generate"]
pub type EVT_TIMER2_TEZ_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER2_TEZ_EN` writer - set this bit high to enable timer2 equal zero event generate"]
pub type EVT_TIMER2_TEZ_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER0_TEP_EN` reader - set this bit high to enable timer0 equal period event generate"]
pub type EVT_TIMER0_TEP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER0_TEP_EN` writer - set this bit high to enable timer0 equal period event generate"]
pub type EVT_TIMER0_TEP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER1_TEP_EN` reader - set this bit high to enable timer1 equal period event generate"]
pub type EVT_TIMER1_TEP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER1_TEP_EN` writer - set this bit high to enable timer1 equal period event generate"]
pub type EVT_TIMER1_TEP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TIMER2_TEP_EN` reader - set this bit high to enable timer2 equal period event generate"]
pub type EVT_TIMER2_TEP_EN_R = crate::BitReader;
#[doc = "Field `EVT_TIMER2_TEP_EN` writer - set this bit high to enable timer2 equal period event generate"]
pub type EVT_TIMER2_TEP_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP0_TEA_EN` reader - set this bit high to enable PWM generator0 timer equal a event generate"]
pub type EVT_OP0_TEA_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP0_TEA_EN` writer - set this bit high to enable PWM generator0 timer equal a event generate"]
pub type EVT_OP0_TEA_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP1_TEA_EN` reader - set this bit high to enable PWM generator1 timer equal a event generate"]
pub type EVT_OP1_TEA_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP1_TEA_EN` writer - set this bit high to enable PWM generator1 timer equal a event generate"]
pub type EVT_OP1_TEA_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP2_TEA_EN` reader - set this bit high to enable PWM generator2 timer equal a event generate"]
pub type EVT_OP2_TEA_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP2_TEA_EN` writer - set this bit high to enable PWM generator2 timer equal a event generate"]
pub type EVT_OP2_TEA_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP0_TEB_EN` reader - set this bit high to enable PWM generator0 timer equal b event generate"]
pub type EVT_OP0_TEB_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP0_TEB_EN` writer - set this bit high to enable PWM generator0 timer equal b event generate"]
pub type EVT_OP0_TEB_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP1_TEB_EN` reader - set this bit high to enable PWM generator1 timer equal b event generate"]
pub type EVT_OP1_TEB_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP1_TEB_EN` writer - set this bit high to enable PWM generator1 timer equal b event generate"]
pub type EVT_OP1_TEB_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_OP2_TEB_EN` reader - set this bit high to enable PWM generator2 timer equal b event generate"]
pub type EVT_OP2_TEB_EN_R = crate::BitReader;
#[doc = "Field `EVT_OP2_TEB_EN` writer - set this bit high to enable PWM generator2 timer equal b event generate"]
pub type EVT_OP2_TEB_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F0_EN` reader - set this bit high to enable fault0 event generate"]
pub type EVT_F0_EN_R = crate::BitReader;
#[doc = "Field `EVT_F0_EN` writer - set this bit high to enable fault0 event generate"]
pub type EVT_F0_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F1_EN` reader - set this bit high to enable fault1 event generate"]
pub type EVT_F1_EN_R = crate::BitReader;
#[doc = "Field `EVT_F1_EN` writer - set this bit high to enable fault1 event generate"]
pub type EVT_F1_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F2_EN` reader - set this bit high to enable fault2 event generate"]
pub type EVT_F2_EN_R = crate::BitReader;
#[doc = "Field `EVT_F2_EN` writer - set this bit high to enable fault2 event generate"]
pub type EVT_F2_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F0_CLR_EN` reader - set this bit high to enable fault0 clear event generate"]
pub type EVT_F0_CLR_EN_R = crate::BitReader;
#[doc = "Field `EVT_F0_CLR_EN` writer - set this bit high to enable fault0 clear event generate"]
pub type EVT_F0_CLR_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F1_CLR_EN` reader - set this bit high to enable fault1 clear event generate"]
pub type EVT_F1_CLR_EN_R = crate::BitReader;
#[doc = "Field `EVT_F1_CLR_EN` writer - set this bit high to enable fault1 clear event generate"]
pub type EVT_F1_CLR_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_F2_CLR_EN` reader - set this bit high to enable fault2 clear event generate"]
pub type EVT_F2_CLR_EN_R = crate::BitReader;
#[doc = "Field `EVT_F2_CLR_EN` writer - set this bit high to enable fault2 clear event generate"]
pub type EVT_F2_CLR_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ0_CBC_EN` reader - set this bit high to enable cycle by cycle trip0 event generate"]
pub type EVT_TZ0_CBC_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ0_CBC_EN` writer - set this bit high to enable cycle by cycle trip0 event generate"]
pub type EVT_TZ0_CBC_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ1_CBC_EN` reader - set this bit high to enable cycle by cycle trip1 event generate"]
pub type EVT_TZ1_CBC_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ1_CBC_EN` writer - set this bit high to enable cycle by cycle trip1 event generate"]
pub type EVT_TZ1_CBC_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ2_CBC_EN` reader - set this bit high to enable cycle by cycle trip2 event generate"]
pub type EVT_TZ2_CBC_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ2_CBC_EN` writer - set this bit high to enable cycle by cycle trip2 event generate"]
pub type EVT_TZ2_CBC_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ0_OST_EN` reader - set this bit high to enable one shot trip0 event generate"]
pub type EVT_TZ0_OST_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ0_OST_EN` writer - set this bit high to enable one shot trip0 event generate"]
pub type EVT_TZ0_OST_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ1_OST_EN` reader - set this bit high to enable one shot trip1 event generate"]
pub type EVT_TZ1_OST_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ1_OST_EN` writer - set this bit high to enable one shot trip1 event generate"]
pub type EVT_TZ1_OST_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_TZ2_OST_EN` reader - set this bit high to enable one shot trip2 event generate"]
pub type EVT_TZ2_OST_EN_R = crate::BitReader;
#[doc = "Field `EVT_TZ2_OST_EN` writer - set this bit high to enable one shot trip2 event generate"]
pub type EVT_TZ2_OST_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_CAP0_EN` reader - set this bit high to enable capture0 event generate"]
pub type EVT_CAP0_EN_R = crate::BitReader;
#[doc = "Field `EVT_CAP0_EN` writer - set this bit high to enable capture0 event generate"]
pub type EVT_CAP0_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_CAP1_EN` reader - set this bit high to enable capture1 event generate"]
pub type EVT_CAP1_EN_R = crate::BitReader;
#[doc = "Field `EVT_CAP1_EN` writer - set this bit high to enable capture1 event generate"]
pub type EVT_CAP1_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `EVT_CAP2_EN` reader - set this bit high to enable capture2 event generate"]
pub type EVT_CAP2_EN_R = crate::BitReader;
#[doc = "Field `EVT_CAP2_EN` writer - set this bit high to enable capture2 event generate"]
pub type EVT_CAP2_EN_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
impl R {
#[doc = "Bit 0 - set this bit high to enable timer0 stop event generate"]
#[inline(always)]
pub fn evt_timer0_stop_en(&self) -> EVT_TIMER0_STOP_EN_R {
EVT_TIMER0_STOP_EN_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - set this bit high to enable timer1 stop event generate"]
#[inline(always)]
pub fn evt_timer1_stop_en(&self) -> EVT_TIMER1_STOP_EN_R {
EVT_TIMER1_STOP_EN_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - set this bit high to enable timer2 stop event generate"]
#[inline(always)]
pub fn evt_timer2_stop_en(&self) -> EVT_TIMER2_STOP_EN_R {
EVT_TIMER2_STOP_EN_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - set this bit high to enable timer0 equal zero event generate"]
#[inline(always)]
pub fn evt_timer0_tez_en(&self) -> EVT_TIMER0_TEZ_EN_R {
EVT_TIMER0_TEZ_EN_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - set this bit high to enable timer1 equal zero event generate"]
#[inline(always)]
pub fn evt_timer1_tez_en(&self) -> EVT_TIMER1_TEZ_EN_R {
EVT_TIMER1_TEZ_EN_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - set this bit high to enable timer2 equal zero event generate"]
#[inline(always)]
pub fn evt_timer2_tez_en(&self) -> EVT_TIMER2_TEZ_EN_R {
EVT_TIMER2_TEZ_EN_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - set this bit high to enable timer0 equal period event generate"]
#[inline(always)]
pub fn evt_timer0_tep_en(&self) -> EVT_TIMER0_TEP_EN_R {
EVT_TIMER0_TEP_EN_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - set this bit high to enable timer1 equal period event generate"]
#[inline(always)]
pub fn evt_timer1_tep_en(&self) -> EVT_TIMER1_TEP_EN_R {
EVT_TIMER1_TEP_EN_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - set this bit high to enable timer2 equal period event generate"]
#[inline(always)]
pub fn evt_timer2_tep_en(&self) -> EVT_TIMER2_TEP_EN_R {
EVT_TIMER2_TEP_EN_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - set this bit high to enable PWM generator0 timer equal a event generate"]
#[inline(always)]
pub fn evt_op0_tea_en(&self) -> EVT_OP0_TEA_EN_R {
EVT_OP0_TEA_EN_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 10 - set this bit high to enable PWM generator1 timer equal a event generate"]
#[inline(always)]
pub fn evt_op1_tea_en(&self) -> EVT_OP1_TEA_EN_R {
EVT_OP1_TEA_EN_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - set this bit high to enable PWM generator2 timer equal a event generate"]
#[inline(always)]
pub fn evt_op2_tea_en(&self) -> EVT_OP2_TEA_EN_R {
EVT_OP2_TEA_EN_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - set this bit high to enable PWM generator0 timer equal b event generate"]
#[inline(always)]
pub fn evt_op0_teb_en(&self) -> EVT_OP0_TEB_EN_R {
EVT_OP0_TEB_EN_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - set this bit high to enable PWM generator1 timer equal b event generate"]
#[inline(always)]
pub fn evt_op1_teb_en(&self) -> EVT_OP1_TEB_EN_R {
EVT_OP1_TEB_EN_R::new(((self.bits >> 13) & 1) != 0)
}
#[doc = "Bit 14 - set this bit high to enable PWM generator2 timer equal b event generate"]
#[inline(always)]
pub fn evt_op2_teb_en(&self) -> EVT_OP2_TEB_EN_R {
EVT_OP2_TEB_EN_R::new(((self.bits >> 14) & 1) != 0)
}
#[doc = "Bit 15 - set this bit high to enable fault0 event generate"]
#[inline(always)]
pub fn evt_f0_en(&self) -> EVT_F0_EN_R {
EVT_F0_EN_R::new(((self.bits >> 15) & 1) != 0)
}
#[doc = "Bit 16 - set this bit high to enable fault1 event generate"]
#[inline(always)]
pub fn evt_f1_en(&self) -> EVT_F1_EN_R {
EVT_F1_EN_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 17 - set this bit high to enable fault2 event generate"]
#[inline(always)]
pub fn evt_f2_en(&self) -> EVT_F2_EN_R {
EVT_F2_EN_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 18 - set this bit high to enable fault0 clear event generate"]
#[inline(always)]
pub fn evt_f0_clr_en(&self) -> EVT_F0_CLR_EN_R {
EVT_F0_CLR_EN_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bit 19 - set this bit high to enable fault1 clear event generate"]
#[inline(always)]
pub fn evt_f1_clr_en(&self) -> EVT_F1_CLR_EN_R {
EVT_F1_CLR_EN_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - set this bit high to enable fault2 clear event generate"]
#[inline(always)]
pub fn evt_f2_clr_en(&self) -> EVT_F2_CLR_EN_R {
EVT_F2_CLR_EN_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 21 - set this bit high to enable cycle by cycle trip0 event generate"]
#[inline(always)]
pub fn evt_tz0_cbc_en(&self) -> EVT_TZ0_CBC_EN_R {
EVT_TZ0_CBC_EN_R::new(((self.bits >> 21) & 1) != 0)
}
#[doc = "Bit 22 - set this bit high to enable cycle by cycle trip1 event generate"]
#[inline(always)]
pub fn evt_tz1_cbc_en(&self) -> EVT_TZ1_CBC_EN_R {
EVT_TZ1_CBC_EN_R::new(((self.bits >> 22) & 1) != 0)
}
#[doc = "Bit 23 - set this bit high to enable cycle by cycle trip2 event generate"]
#[inline(always)]
pub fn evt_tz2_cbc_en(&self) -> EVT_TZ2_CBC_EN_R {
EVT_TZ2_CBC_EN_R::new(((self.bits >> 23) & 1) != 0)
}
#[doc = "Bit 24 - set this bit high to enable one shot trip0 event generate"]
#[inline(always)]
pub fn evt_tz0_ost_en(&self) -> EVT_TZ0_OST_EN_R {
EVT_TZ0_OST_EN_R::new(((self.bits >> 24) & 1) != 0)
}
#[doc = "Bit 25 - set this bit high to enable one shot trip1 event generate"]
#[inline(always)]
pub fn evt_tz1_ost_en(&self) -> EVT_TZ1_OST_EN_R {
EVT_TZ1_OST_EN_R::new(((self.bits >> 25) & 1) != 0)
}
#[doc = "Bit 26 - set this bit high to enable one shot trip2 event generate"]
#[inline(always)]
pub fn evt_tz2_ost_en(&self) -> EVT_TZ2_OST_EN_R {
EVT_TZ2_OST_EN_R::new(((self.bits >> 26) & 1) != 0)
}
#[doc = "Bit 27 - set this bit high to enable capture0 event generate"]
#[inline(always)]
pub fn evt_cap0_en(&self) -> EVT_CAP0_EN_R {
EVT_CAP0_EN_R::new(((self.bits >> 27) & 1) != 0)
}
#[doc = "Bit 28 - set this bit high to enable capture1 event generate"]
#[inline(always)]
pub fn evt_cap1_en(&self) -> EVT_CAP1_EN_R {
EVT_CAP1_EN_R::new(((self.bits >> 28) & 1) != 0)
}
#[doc = "Bit 29 - set this bit high to enable capture2 event generate"]
#[inline(always)]
pub fn evt_cap2_en(&self) -> EVT_CAP2_EN_R {
EVT_CAP2_EN_R::new(((self.bits >> 29) & 1) != 0)
}
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EVT_EN")
.field(
"evt_timer0_stop_en",
&format_args!("{}", self.evt_timer0_stop_en().bit()),
)
.field(
"evt_timer1_stop_en",
&format_args!("{}", self.evt_timer1_stop_en().bit()),
)
.field(
"evt_timer2_stop_en",
&format_args!("{}", self.evt_timer2_stop_en().bit()),
)
.field(
"evt_timer0_tez_en",
&format_args!("{}", self.evt_timer0_tez_en().bit()),
)
.field(
"evt_timer1_tez_en",
&format_args!("{}", self.evt_timer1_tez_en().bit()),
)
.field(
"evt_timer2_tez_en",
&format_args!("{}", self.evt_timer2_tez_en().bit()),
)
.field(
"evt_timer0_tep_en",
&format_args!("{}", self.evt_timer0_tep_en().bit()),
)
.field(
"evt_timer1_tep_en",
&format_args!("{}", self.evt_timer1_tep_en().bit()),
)
.field(
"evt_timer2_tep_en",
&format_args!("{}", self.evt_timer2_tep_en().bit()),
)
.field(
"evt_op0_tea_en",
&format_args!("{}", self.evt_op0_tea_en().bit()),
)
.field(
"evt_op1_tea_en",
&format_args!("{}", self.evt_op1_tea_en().bit()),
)
.field(
"evt_op2_tea_en",
&format_args!("{}", self.evt_op2_tea_en().bit()),
)
.field(
"evt_op0_teb_en",
&format_args!("{}", self.evt_op0_teb_en().bit()),
)
.field(
"evt_op1_teb_en",
&format_args!("{}", self.evt_op1_teb_en().bit()),
)
.field(
"evt_op2_teb_en",
&format_args!("{}", self.evt_op2_teb_en().bit()),
)
.field("evt_f0_en", &format_args!("{}", self.evt_f0_en().bit()))
.field("evt_f1_en", &format_args!("{}", self.evt_f1_en().bit()))
.field("evt_f2_en", &format_args!("{}", self.evt_f2_en().bit()))
.field(
"evt_f0_clr_en",
&format_args!("{}", self.evt_f0_clr_en().bit()),
)
.field(
"evt_f1_clr_en",
&format_args!("{}", self.evt_f1_clr_en().bit()),
)
.field(
"evt_f2_clr_en",
&format_args!("{}", self.evt_f2_clr_en().bit()),
)
.field(
"evt_tz0_cbc_en",
&format_args!("{}", self.evt_tz0_cbc_en().bit()),
)
.field(
"evt_tz1_cbc_en",
&format_args!("{}", self.evt_tz1_cbc_en().bit()),
)
.field(
"evt_tz2_cbc_en",
&format_args!("{}", self.evt_tz2_cbc_en().bit()),
)
.field(
"evt_tz0_ost_en",
&format_args!("{}", self.evt_tz0_ost_en().bit()),
)
.field(
"evt_tz1_ost_en",
&format_args!("{}", self.evt_tz1_ost_en().bit()),
)
.field(
"evt_tz2_ost_en",
&format_args!("{}", self.evt_tz2_ost_en().bit()),
)
.field("evt_cap0_en", &format_args!("{}", self.evt_cap0_en().bit()))
.field("evt_cap1_en", &format_args!("{}", self.evt_cap1_en().bit()))
.field("evt_cap2_en", &format_args!("{}", self.evt_cap2_en().bit()))
.finish()
}
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for crate::generic::Reg<EVT_EN_SPEC> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
self.read().fmt(f)
}
}
impl W {
#[doc = "Bit 0 - set this bit high to enable timer0 stop event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer0_stop_en(&mut self) -> EVT_TIMER0_STOP_EN_W<EVT_EN_SPEC, 0> {
EVT_TIMER0_STOP_EN_W::new(self)
}
#[doc = "Bit 1 - set this bit high to enable timer1 stop event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer1_stop_en(&mut self) -> EVT_TIMER1_STOP_EN_W<EVT_EN_SPEC, 1> {
EVT_TIMER1_STOP_EN_W::new(self)
}
#[doc = "Bit 2 - set this bit high to enable timer2 stop event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer2_stop_en(&mut self) -> EVT_TIMER2_STOP_EN_W<EVT_EN_SPEC, 2> {
EVT_TIMER2_STOP_EN_W::new(self)
}
#[doc = "Bit 3 - set this bit high to enable timer0 equal zero event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer0_tez_en(&mut self) -> EVT_TIMER0_TEZ_EN_W<EVT_EN_SPEC, 3> {
EVT_TIMER0_TEZ_EN_W::new(self)
}
#[doc = "Bit 4 - set this bit high to enable timer1 equal zero event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer1_tez_en(&mut self) -> EVT_TIMER1_TEZ_EN_W<EVT_EN_SPEC, 4> {
EVT_TIMER1_TEZ_EN_W::new(self)
}
#[doc = "Bit 5 - set this bit high to enable timer2 equal zero event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer2_tez_en(&mut self) -> EVT_TIMER2_TEZ_EN_W<EVT_EN_SPEC, 5> {
EVT_TIMER2_TEZ_EN_W::new(self)
}
#[doc = "Bit 6 - set this bit high to enable timer0 equal period event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer0_tep_en(&mut self) -> EVT_TIMER0_TEP_EN_W<EVT_EN_SPEC, 6> {
EVT_TIMER0_TEP_EN_W::new(self)
}
#[doc = "Bit 7 - set this bit high to enable timer1 equal period event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer1_tep_en(&mut self) -> EVT_TIMER1_TEP_EN_W<EVT_EN_SPEC, 7> {
EVT_TIMER1_TEP_EN_W::new(self)
}
#[doc = "Bit 8 - set this bit high to enable timer2 equal period event generate"]
#[inline(always)]
#[must_use]
pub fn evt_timer2_tep_en(&mut self) -> EVT_TIMER2_TEP_EN_W<EVT_EN_SPEC, 8> {
EVT_TIMER2_TEP_EN_W::new(self)
}
#[doc = "Bit 9 - set this bit high to enable PWM generator0 timer equal a event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op0_tea_en(&mut self) -> EVT_OP0_TEA_EN_W<EVT_EN_SPEC, 9> {
EVT_OP0_TEA_EN_W::new(self)
}
#[doc = "Bit 10 - set this bit high to enable PWM generator1 timer equal a event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op1_tea_en(&mut self) -> EVT_OP1_TEA_EN_W<EVT_EN_SPEC, 10> {
EVT_OP1_TEA_EN_W::new(self)
}
#[doc = "Bit 11 - set this bit high to enable PWM generator2 timer equal a event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op2_tea_en(&mut self) -> EVT_OP2_TEA_EN_W<EVT_EN_SPEC, 11> {
EVT_OP2_TEA_EN_W::new(self)
}
#[doc = "Bit 12 - set this bit high to enable PWM generator0 timer equal b event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op0_teb_en(&mut self) -> EVT_OP0_TEB_EN_W<EVT_EN_SPEC, 12> {
EVT_OP0_TEB_EN_W::new(self)
}
#[doc = "Bit 13 - set this bit high to enable PWM generator1 timer equal b event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op1_teb_en(&mut self) -> EVT_OP1_TEB_EN_W<EVT_EN_SPEC, 13> {
EVT_OP1_TEB_EN_W::new(self)
}
#[doc = "Bit 14 - set this bit high to enable PWM generator2 timer equal b event generate"]
#[inline(always)]
#[must_use]
pub fn evt_op2_teb_en(&mut self) -> EVT_OP2_TEB_EN_W<EVT_EN_SPEC, 14> {
EVT_OP2_TEB_EN_W::new(self)
}
#[doc = "Bit 15 - set this bit high to enable fault0 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f0_en(&mut self) -> EVT_F0_EN_W<EVT_EN_SPEC, 15> {
EVT_F0_EN_W::new(self)
}
#[doc = "Bit 16 - set this bit high to enable fault1 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f1_en(&mut self) -> EVT_F1_EN_W<EVT_EN_SPEC, 16> {
EVT_F1_EN_W::new(self)
}
#[doc = "Bit 17 - set this bit high to enable fault2 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f2_en(&mut self) -> EVT_F2_EN_W<EVT_EN_SPEC, 17> {
EVT_F2_EN_W::new(self)
}
#[doc = "Bit 18 - set this bit high to enable fault0 clear event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f0_clr_en(&mut self) -> EVT_F0_CLR_EN_W<EVT_EN_SPEC, 18> {
EVT_F0_CLR_EN_W::new(self)
}
#[doc = "Bit 19 - set this bit high to enable fault1 clear event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f1_clr_en(&mut self) -> EVT_F1_CLR_EN_W<EVT_EN_SPEC, 19> {
EVT_F1_CLR_EN_W::new(self)
}
#[doc = "Bit 20 - set this bit high to enable fault2 clear event generate"]
#[inline(always)]
#[must_use]
pub fn evt_f2_clr_en(&mut self) -> EVT_F2_CLR_EN_W<EVT_EN_SPEC, 20> {
EVT_F2_CLR_EN_W::new(self)
}
#[doc = "Bit 21 - set this bit high to enable cycle by cycle trip0 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz0_cbc_en(&mut self) -> EVT_TZ0_CBC_EN_W<EVT_EN_SPEC, 21> {
EVT_TZ0_CBC_EN_W::new(self)
}
#[doc = "Bit 22 - set this bit high to enable cycle by cycle trip1 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz1_cbc_en(&mut self) -> EVT_TZ1_CBC_EN_W<EVT_EN_SPEC, 22> {
EVT_TZ1_CBC_EN_W::new(self)
}
#[doc = "Bit 23 - set this bit high to enable cycle by cycle trip2 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz2_cbc_en(&mut self) -> EVT_TZ2_CBC_EN_W<EVT_EN_SPEC, 23> {
EVT_TZ2_CBC_EN_W::new(self)
}
#[doc = "Bit 24 - set this bit high to enable one shot trip0 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz0_ost_en(&mut self) -> EVT_TZ0_OST_EN_W<EVT_EN_SPEC, 24> {
EVT_TZ0_OST_EN_W::new(self)
}
#[doc = "Bit 25 - set this bit high to enable one shot trip1 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz1_ost_en(&mut self) -> EVT_TZ1_OST_EN_W<EVT_EN_SPEC, 25> {
EVT_TZ1_OST_EN_W::new(self)
}
#[doc = "Bit 26 - set this bit high to enable one shot trip2 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_tz2_ost_en(&mut self) -> EVT_TZ2_OST_EN_W<EVT_EN_SPEC, 26> {
EVT_TZ2_OST_EN_W::new(self)
}
#[doc = "Bit 27 - set this bit high to enable capture0 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_cap0_en(&mut self) -> EVT_CAP0_EN_W<EVT_EN_SPEC, 27> {
EVT_CAP0_EN_W::new(self)
}
#[doc = "Bit 28 - set this bit high to enable capture1 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_cap1_en(&mut self) -> EVT_CAP1_EN_W<EVT_EN_SPEC, 28> {
EVT_CAP1_EN_W::new(self)
}
#[doc = "Bit 29 - set this bit high to enable capture2 event generate"]
#[inline(always)]
#[must_use]
pub fn evt_cap2_en(&mut self) -> EVT_CAP2_EN_W<EVT_EN_SPEC, 29> {
EVT_CAP2_EN_W::new(self)
}
#[doc = r" Writes raw bits to the register."]
#[doc = r""]
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
}
#[doc = "MCPWM event enable register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`evt_en::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`evt_en::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct EVT_EN_SPEC;
impl crate::RegisterSpec for EVT_EN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [`evt_en::R`](R) reader structure"]
impl crate::Readable for EVT_EN_SPEC {}
#[doc = "`write(|w| ..)` method takes [`evt_en::W`](W) writer structure"]
impl crate::Writable for EVT_EN_SPEC {
const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets EVT_EN to value 0"]
impl crate::Resettable for EVT_EN_SPEC {
const RESET_VALUE: Self::Ux = 0;
}