pub type R = crate::R<EVCRrs>;
pub type W = crate::W<EVCRrs>;
pub type EV1EN_R = crate::BitReader;
pub type EV1EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EV2EN_R = crate::BitReader;
pub type EV2EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EV3EN_R = crate::BitReader;
pub type EV3EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type EV4EN_R = crate::BitReader;
pub type EV4EN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ev1en(&self) -> EV1EN_R {
EV1EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ev2en(&self) -> EV2EN_R {
EV2EN_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ev3en(&self) -> EV3EN_R {
EV3EN_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn ev4en(&self) -> EV4EN_R {
EV4EN_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EVCR")
.field("ev1en", &self.ev1en())
.field("ev2en", &self.ev2en())
.field("ev3en", &self.ev3en())
.field("ev4en", &self.ev4en())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ev1en(&mut self) -> EV1EN_W<EVCRrs> {
EV1EN_W::new(self, 0)
}
#[inline(always)]
pub fn ev2en(&mut self) -> EV2EN_W<EVCRrs> {
EV2EN_W::new(self, 1)
}
#[inline(always)]
pub fn ev3en(&mut self) -> EV3EN_W<EVCRrs> {
EV3EN_W::new(self, 2)
}
#[inline(always)]
pub fn ev4en(&mut self) -> EV4EN_W<EVCRrs> {
EV4EN_W::new(self, 3)
}
}
pub struct EVCRrs;
impl crate::RegisterSpec for EVCRrs {
type Ux = u32;
}
impl crate::Readable for EVCRrs {}
impl crate::Writable for EVCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EVCRrs {}