pub type R = crate::R<EEFR1rs>;
pub type W = crate::W<EEFR1rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EE1LTCH {
Disabled = 0,
Enabled = 1,
}
impl From<EE1LTCH> for bool {
#[inline(always)]
fn from(variant: EE1LTCH) -> Self {
variant as u8 != 0
}
}
pub type EELTCH_R = crate::BitReader<EE1LTCH>;
impl EELTCH_R {
#[inline(always)]
pub const fn variant(&self) -> EE1LTCH {
match self.bits {
false => EE1LTCH::Disabled,
true => EE1LTCH::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EE1LTCH::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EE1LTCH::Enabled
}
}
pub type EELTCH_W<'a, REG> = crate::BitWriter<'a, REG, EE1LTCH>;
impl<'a, REG> EELTCH_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EE1LTCH::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EE1LTCH::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EE1FLTR {
Disabled = 0,
BlankResetToCompare1 = 1,
BlankResetToCompare2 = 2,
BlankResetToCompare3 = 3,
BlankResetToCompare4 = 4,
BlankTimfltr1 = 5,
BlankTimfltr2 = 6,
BlankTimfltr3 = 7,
BlankTimfltr4 = 8,
BlankTimfltr5 = 9,
BlankTimfltr6 = 10,
BlankTimfltr7 = 11,
BlankTimfltr8 = 12,
WindowResetToCompare2 = 13,
WindowResetToCompare3 = 14,
WindowTimwin = 15,
}
impl From<EE1FLTR> for u8 {
#[inline(always)]
fn from(variant: EE1FLTR) -> Self {
variant as _
}
}
impl crate::FieldSpec for EE1FLTR {
type Ux = u8;
}
impl crate::IsEnum for EE1FLTR {}
pub type EEFLTR_R = crate::FieldReader<EE1FLTR>;
impl EEFLTR_R {
#[inline(always)]
pub const fn variant(&self) -> EE1FLTR {
match self.bits {
0 => EE1FLTR::Disabled,
1 => EE1FLTR::BlankResetToCompare1,
2 => EE1FLTR::BlankResetToCompare2,
3 => EE1FLTR::BlankResetToCompare3,
4 => EE1FLTR::BlankResetToCompare4,
5 => EE1FLTR::BlankTimfltr1,
6 => EE1FLTR::BlankTimfltr2,
7 => EE1FLTR::BlankTimfltr3,
8 => EE1FLTR::BlankTimfltr4,
9 => EE1FLTR::BlankTimfltr5,
10 => EE1FLTR::BlankTimfltr6,
11 => EE1FLTR::BlankTimfltr7,
12 => EE1FLTR::BlankTimfltr8,
13 => EE1FLTR::WindowResetToCompare2,
14 => EE1FLTR::WindowResetToCompare3,
15 => EE1FLTR::WindowTimwin,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EE1FLTR::Disabled
}
#[inline(always)]
pub fn is_blank_reset_to_compare1(&self) -> bool {
*self == EE1FLTR::BlankResetToCompare1
}
#[inline(always)]
pub fn is_blank_reset_to_compare2(&self) -> bool {
*self == EE1FLTR::BlankResetToCompare2
}
#[inline(always)]
pub fn is_blank_reset_to_compare3(&self) -> bool {
*self == EE1FLTR::BlankResetToCompare3
}
#[inline(always)]
pub fn is_blank_reset_to_compare4(&self) -> bool {
*self == EE1FLTR::BlankResetToCompare4
}
#[inline(always)]
pub fn is_blank_timfltr1(&self) -> bool {
*self == EE1FLTR::BlankTimfltr1
}
#[inline(always)]
pub fn is_blank_timfltr2(&self) -> bool {
*self == EE1FLTR::BlankTimfltr2
}
#[inline(always)]
pub fn is_blank_timfltr3(&self) -> bool {
*self == EE1FLTR::BlankTimfltr3
}
#[inline(always)]
pub fn is_blank_timfltr4(&self) -> bool {
*self == EE1FLTR::BlankTimfltr4
}
#[inline(always)]
pub fn is_blank_timfltr5(&self) -> bool {
*self == EE1FLTR::BlankTimfltr5
}
#[inline(always)]
pub fn is_blank_timfltr6(&self) -> bool {
*self == EE1FLTR::BlankTimfltr6
}
#[inline(always)]
pub fn is_blank_timfltr7(&self) -> bool {
*self == EE1FLTR::BlankTimfltr7
}
#[inline(always)]
pub fn is_blank_timfltr8(&self) -> bool {
*self == EE1FLTR::BlankTimfltr8
}
#[inline(always)]
pub fn is_window_reset_to_compare2(&self) -> bool {
*self == EE1FLTR::WindowResetToCompare2
}
#[inline(always)]
pub fn is_window_reset_to_compare3(&self) -> bool {
*self == EE1FLTR::WindowResetToCompare3
}
#[inline(always)]
pub fn is_window_timwin(&self) -> bool {
*self == EE1FLTR::WindowTimwin
}
}
pub type EEFLTR_W<'a, REG> = crate::FieldWriter<'a, REG, 4, EE1FLTR, crate::Safe>;
impl<'a, REG> EEFLTR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::Disabled)
}
#[inline(always)]
pub fn blank_reset_to_compare1(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankResetToCompare1)
}
#[inline(always)]
pub fn blank_reset_to_compare2(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankResetToCompare2)
}
#[inline(always)]
pub fn blank_reset_to_compare3(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankResetToCompare3)
}
#[inline(always)]
pub fn blank_reset_to_compare4(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankResetToCompare4)
}
#[inline(always)]
pub fn blank_timfltr1(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr1)
}
#[inline(always)]
pub fn blank_timfltr2(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr2)
}
#[inline(always)]
pub fn blank_timfltr3(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr3)
}
#[inline(always)]
pub fn blank_timfltr4(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr4)
}
#[inline(always)]
pub fn blank_timfltr5(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr5)
}
#[inline(always)]
pub fn blank_timfltr6(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr6)
}
#[inline(always)]
pub fn blank_timfltr7(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr7)
}
#[inline(always)]
pub fn blank_timfltr8(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::BlankTimfltr8)
}
#[inline(always)]
pub fn window_reset_to_compare2(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::WindowResetToCompare2)
}
#[inline(always)]
pub fn window_reset_to_compare3(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::WindowResetToCompare3)
}
#[inline(always)]
pub fn window_timwin(self) -> &'a mut crate::W<REG> {
self.variant(EE1FLTR::WindowTimwin)
}
}
impl R {
#[inline(always)]
pub fn eeltch(&self, n: u8) -> EELTCH_R {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EELTCH_R::new(((self.bits >> (n * 6)) & 1) != 0)
}
#[inline(always)]
pub fn eeltch_iter(&self) -> impl Iterator<Item = EELTCH_R> + '_ {
(0..5).map(move |n| EELTCH_R::new(((self.bits >> (n * 6)) & 1) != 0))
}
#[inline(always)]
pub fn ee1ltch(&self) -> EELTCH_R {
EELTCH_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ee2ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn ee3ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn ee4ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn ee5ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn eefltr(&self, n: u8) -> EEFLTR_R {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EEFLTR_R::new(((self.bits >> (n * 6 + 1)) & 0x0f) as u8)
}
#[inline(always)]
pub fn eefltr_iter(&self) -> impl Iterator<Item = EEFLTR_R> + '_ {
(0..5).map(move |n| EEFLTR_R::new(((self.bits >> (n * 6 + 1)) & 0x0f) as u8))
}
#[inline(always)]
pub fn ee1fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 1) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee2fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 7) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee3fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 13) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee4fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 19) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee5fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 25) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EEFR1")
.field("ee1fltr", &self.ee1fltr())
.field("ee2fltr", &self.ee2fltr())
.field("ee3fltr", &self.ee3fltr())
.field("ee4fltr", &self.ee4fltr())
.field("ee5fltr", &self.ee5fltr())
.field("ee1ltch", &self.ee1ltch())
.field("ee2ltch", &self.ee2ltch())
.field("ee3ltch", &self.ee3ltch())
.field("ee4ltch", &self.ee4ltch())
.field("ee5ltch", &self.ee5ltch())
.finish()
}
}
impl W {
#[inline(always)]
pub fn eeltch(&mut self, n: u8) -> EELTCH_W<EEFR1rs> {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EELTCH_W::new(self, n * 6)
}
#[inline(always)]
pub fn ee1ltch(&mut self) -> EELTCH_W<EEFR1rs> {
EELTCH_W::new(self, 0)
}
#[inline(always)]
pub fn ee2ltch(&mut self) -> EELTCH_W<EEFR1rs> {
EELTCH_W::new(self, 6)
}
#[inline(always)]
pub fn ee3ltch(&mut self) -> EELTCH_W<EEFR1rs> {
EELTCH_W::new(self, 12)
}
#[inline(always)]
pub fn ee4ltch(&mut self) -> EELTCH_W<EEFR1rs> {
EELTCH_W::new(self, 18)
}
#[inline(always)]
pub fn ee5ltch(&mut self) -> EELTCH_W<EEFR1rs> {
EELTCH_W::new(self, 24)
}
#[inline(always)]
pub fn eefltr(&mut self, n: u8) -> EEFLTR_W<EEFR1rs> {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EEFLTR_W::new(self, n * 6 + 1)
}
#[inline(always)]
pub fn ee1fltr(&mut self) -> EEFLTR_W<EEFR1rs> {
EEFLTR_W::new(self, 1)
}
#[inline(always)]
pub fn ee2fltr(&mut self) -> EEFLTR_W<EEFR1rs> {
EEFLTR_W::new(self, 7)
}
#[inline(always)]
pub fn ee3fltr(&mut self) -> EEFLTR_W<EEFR1rs> {
EEFLTR_W::new(self, 13)
}
#[inline(always)]
pub fn ee4fltr(&mut self) -> EEFLTR_W<EEFR1rs> {
EEFLTR_W::new(self, 19)
}
#[inline(always)]
pub fn ee5fltr(&mut self) -> EEFLTR_W<EEFR1rs> {
EEFLTR_W::new(self, 25)
}
}
pub struct EEFR1rs;
impl crate::RegisterSpec for EEFR1rs {
type Ux = u32;
}
impl crate::Readable for EEFR1rs {}
impl crate::Writable for EEFR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EEFR1rs {}