pub type R = crate::R<FTSR3rs>;
pub type W = crate::W<FTSR3rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FALLING_TRIGGER {
Disabled = 0,
Enabled = 1,
}
impl From<FALLING_TRIGGER> for bool {
#[inline(always)]
fn from(variant: FALLING_TRIGGER) -> Self {
variant as u8 != 0
}
}
pub type TR82_R = crate::BitReader<FALLING_TRIGGER>;
impl TR82_R {
#[inline(always)]
pub const fn variant(&self) -> FALLING_TRIGGER {
match self.bits {
false => FALLING_TRIGGER::Disabled,
true => FALLING_TRIGGER::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FALLING_TRIGGER::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FALLING_TRIGGER::Enabled
}
}
pub type TR82_W<'a, REG> = crate::BitWriter<'a, REG, FALLING_TRIGGER>;
impl<'a, REG> TR82_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FALLING_TRIGGER::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FALLING_TRIGGER::Enabled)
}
}
pub use TR82_R as TR84_R;
pub use TR82_R as TR85_R;
pub use TR82_R as TR86_R;
pub use TR82_W as TR84_W;
pub use TR82_W as TR85_W;
pub use TR82_W as TR86_W;
impl R {
#[inline(always)]
pub fn tr82(&self) -> TR82_R {
TR82_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn tr84(&self) -> TR84_R {
TR84_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn tr85(&self) -> TR85_R {
TR85_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn tr86(&self) -> TR86_R {
TR86_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FTSR3")
.field("tr82", &self.tr82())
.field("tr84", &self.tr84())
.field("tr85", &self.tr85())
.field("tr86", &self.tr86())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tr82(&mut self) -> TR82_W<FTSR3rs> {
TR82_W::new(self, 18)
}
#[inline(always)]
pub fn tr84(&mut self) -> TR84_W<FTSR3rs> {
TR84_W::new(self, 20)
}
#[inline(always)]
pub fn tr85(&mut self) -> TR85_W<FTSR3rs> {
TR85_W::new(self, 21)
}
#[inline(always)]
pub fn tr86(&mut self) -> TR86_W<FTSR3rs> {
TR86_W::new(self, 22)
}
}
pub struct FTSR3rs;
impl crate::RegisterSpec for FTSR3rs {
type Ux = u32;
}
impl crate::Readable for FTSR3rs {}
impl crate::Writable for FTSR3rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for FTSR3rs {}