pub type R = crate::R<EEFR2rs>;
pub type W = crate::W<EEFR2rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EE6LTCH {
Disabled = 0,
Enabled = 1,
}
impl From<EE6LTCH> for bool {
#[inline(always)]
fn from(variant: EE6LTCH) -> Self {
variant as u8 != 0
}
}
pub type EELTCH_R = crate::BitReader<EE6LTCH>;
impl EELTCH_R {
#[inline(always)]
pub const fn variant(&self) -> EE6LTCH {
match self.bits {
false => EE6LTCH::Disabled,
true => EE6LTCH::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EE6LTCH::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EE6LTCH::Enabled
}
}
pub type EELTCH_W<'a, REG> = crate::BitWriter<'a, REG, EE6LTCH>;
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(EE6LTCH::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EE6LTCH::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum EE6FLTR {
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<EE6FLTR> for u8 {
#[inline(always)]
fn from(variant: EE6FLTR) -> Self {
variant as _
}
}
impl crate::FieldSpec for EE6FLTR {
type Ux = u8;
}
impl crate::IsEnum for EE6FLTR {}
pub type EEFLTR_R = crate::FieldReader<EE6FLTR>;
impl EEFLTR_R {
#[inline(always)]
pub const fn variant(&self) -> EE6FLTR {
match self.bits {
0 => EE6FLTR::Disabled,
1 => EE6FLTR::BlankResetToCompare1,
2 => EE6FLTR::BlankResetToCompare2,
3 => EE6FLTR::BlankResetToCompare3,
4 => EE6FLTR::BlankResetToCompare4,
5 => EE6FLTR::BlankTimfltr1,
6 => EE6FLTR::BlankTimfltr2,
7 => EE6FLTR::BlankTimfltr3,
8 => EE6FLTR::BlankTimfltr4,
9 => EE6FLTR::BlankTimfltr5,
10 => EE6FLTR::BlankTimfltr6,
11 => EE6FLTR::BlankTimfltr7,
12 => EE6FLTR::BlankTimfltr8,
13 => EE6FLTR::WindowResetToCompare2,
14 => EE6FLTR::WindowResetToCompare3,
15 => EE6FLTR::WindowTimwin,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EE6FLTR::Disabled
}
#[inline(always)]
pub fn is_blank_reset_to_compare1(&self) -> bool {
*self == EE6FLTR::BlankResetToCompare1
}
#[inline(always)]
pub fn is_blank_reset_to_compare2(&self) -> bool {
*self == EE6FLTR::BlankResetToCompare2
}
#[inline(always)]
pub fn is_blank_reset_to_compare3(&self) -> bool {
*self == EE6FLTR::BlankResetToCompare3
}
#[inline(always)]
pub fn is_blank_reset_to_compare4(&self) -> bool {
*self == EE6FLTR::BlankResetToCompare4
}
#[inline(always)]
pub fn is_blank_timfltr1(&self) -> bool {
*self == EE6FLTR::BlankTimfltr1
}
#[inline(always)]
pub fn is_blank_timfltr2(&self) -> bool {
*self == EE6FLTR::BlankTimfltr2
}
#[inline(always)]
pub fn is_blank_timfltr3(&self) -> bool {
*self == EE6FLTR::BlankTimfltr3
}
#[inline(always)]
pub fn is_blank_timfltr4(&self) -> bool {
*self == EE6FLTR::BlankTimfltr4
}
#[inline(always)]
pub fn is_blank_timfltr5(&self) -> bool {
*self == EE6FLTR::BlankTimfltr5
}
#[inline(always)]
pub fn is_blank_timfltr6(&self) -> bool {
*self == EE6FLTR::BlankTimfltr6
}
#[inline(always)]
pub fn is_blank_timfltr7(&self) -> bool {
*self == EE6FLTR::BlankTimfltr7
}
#[inline(always)]
pub fn is_blank_timfltr8(&self) -> bool {
*self == EE6FLTR::BlankTimfltr8
}
#[inline(always)]
pub fn is_window_reset_to_compare2(&self) -> bool {
*self == EE6FLTR::WindowResetToCompare2
}
#[inline(always)]
pub fn is_window_reset_to_compare3(&self) -> bool {
*self == EE6FLTR::WindowResetToCompare3
}
#[inline(always)]
pub fn is_window_timwin(&self) -> bool {
*self == EE6FLTR::WindowTimwin
}
}
pub type EEFLTR_W<'a, REG> = crate::FieldWriter<'a, REG, 4, EE6FLTR, 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(EE6FLTR::Disabled)
}
#[inline(always)]
pub fn blank_reset_to_compare1(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankResetToCompare1)
}
#[inline(always)]
pub fn blank_reset_to_compare2(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankResetToCompare2)
}
#[inline(always)]
pub fn blank_reset_to_compare3(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankResetToCompare3)
}
#[inline(always)]
pub fn blank_reset_to_compare4(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankResetToCompare4)
}
#[inline(always)]
pub fn blank_timfltr1(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr1)
}
#[inline(always)]
pub fn blank_timfltr2(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr2)
}
#[inline(always)]
pub fn blank_timfltr3(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr3)
}
#[inline(always)]
pub fn blank_timfltr4(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr4)
}
#[inline(always)]
pub fn blank_timfltr5(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr5)
}
#[inline(always)]
pub fn blank_timfltr6(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr6)
}
#[inline(always)]
pub fn blank_timfltr7(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr7)
}
#[inline(always)]
pub fn blank_timfltr8(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::BlankTimfltr8)
}
#[inline(always)]
pub fn window_reset_to_compare2(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::WindowResetToCompare2)
}
#[inline(always)]
pub fn window_reset_to_compare3(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::WindowResetToCompare3)
}
#[inline(always)]
pub fn window_timwin(self) -> &'a mut crate::W<REG> {
self.variant(EE6FLTR::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 ee6ltch(&self) -> EELTCH_R {
EELTCH_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ee7ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn ee8ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn ee9ltch(&self) -> EELTCH_R {
EELTCH_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn ee10ltch(&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 ee6fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 1) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee7fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 7) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee8fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 13) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee9fltr(&self) -> EEFLTR_R {
EEFLTR_R::new(((self.bits >> 19) & 0x0f) as u8)
}
#[inline(always)]
pub fn ee10fltr(&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("EEFR2")
.field("ee6fltr", &self.ee6fltr())
.field("ee7fltr", &self.ee7fltr())
.field("ee8fltr", &self.ee8fltr())
.field("ee9fltr", &self.ee9fltr())
.field("ee10fltr", &self.ee10fltr())
.field("ee6ltch", &self.ee6ltch())
.field("ee7ltch", &self.ee7ltch())
.field("ee8ltch", &self.ee8ltch())
.field("ee9ltch", &self.ee9ltch())
.field("ee10ltch", &self.ee10ltch())
.finish()
}
}
impl W {
#[inline(always)]
pub fn eeltch(&mut self, n: u8) -> EELTCH_W<EEFR2rs> {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EELTCH_W::new(self, n * 6)
}
#[inline(always)]
pub fn ee6ltch(&mut self) -> EELTCH_W<EEFR2rs> {
EELTCH_W::new(self, 0)
}
#[inline(always)]
pub fn ee7ltch(&mut self) -> EELTCH_W<EEFR2rs> {
EELTCH_W::new(self, 6)
}
#[inline(always)]
pub fn ee8ltch(&mut self) -> EELTCH_W<EEFR2rs> {
EELTCH_W::new(self, 12)
}
#[inline(always)]
pub fn ee9ltch(&mut self) -> EELTCH_W<EEFR2rs> {
EELTCH_W::new(self, 18)
}
#[inline(always)]
pub fn ee10ltch(&mut self) -> EELTCH_W<EEFR2rs> {
EELTCH_W::new(self, 24)
}
#[inline(always)]
pub fn eefltr(&mut self, n: u8) -> EEFLTR_W<EEFR2rs> {
#[allow(clippy::no_effect)] [(); 5][n as usize];
EEFLTR_W::new(self, n * 6 + 1)
}
#[inline(always)]
pub fn ee6fltr(&mut self) -> EEFLTR_W<EEFR2rs> {
EEFLTR_W::new(self, 1)
}
#[inline(always)]
pub fn ee7fltr(&mut self) -> EEFLTR_W<EEFR2rs> {
EEFLTR_W::new(self, 7)
}
#[inline(always)]
pub fn ee8fltr(&mut self) -> EEFLTR_W<EEFR2rs> {
EEFLTR_W::new(self, 13)
}
#[inline(always)]
pub fn ee9fltr(&mut self) -> EEFLTR_W<EEFR2rs> {
EEFLTR_W::new(self, 19)
}
#[inline(always)]
pub fn ee10fltr(&mut self) -> EEFLTR_W<EEFR2rs> {
EEFLTR_W::new(self, 25)
}
}
pub struct EEFR2rs;
impl crate::RegisterSpec for EEFR2rs {
type Ux = u32;
}
impl crate::Readable for EEFR2rs {}
impl crate::Writable for EEFR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EEFR2rs {}