#[doc = "Register `FTEN` reader"]
pub struct R(crate::R<FTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<FTEN_SPEC>> for R {
fn from(reader: crate::R<FTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FTEN` writer"]
pub struct W(crate::W<FTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl core::convert::From<crate::W<FTEN_SPEC>> for W {
fn from(writer: crate::W<FTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Falling edge trigger enable of line 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FTEN0_A {
#[doc = "0: Falling edge trigger is disabled"]
DISABLED = 0,
#[doc = "1: Falling edge trigger is enabled"]
ENABLED = 1,
}
impl From<FTEN0_A> for bool {
#[inline(always)]
fn from(variant: FTEN0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `FTEN0` reader - Falling edge trigger enable of line 0"]
pub struct FTEN0_R(crate::FieldReader<bool, FTEN0_A>);
impl FTEN0_R {
pub(crate) fn new(bits: bool) -> Self {
FTEN0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FTEN0_A {
match self.bits {
false => FTEN0_A::DISABLED,
true => FTEN0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == FTEN0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == FTEN0_A::ENABLED
}
}
impl core::ops::Deref for FTEN0_R {
type Target = crate::FieldReader<bool, FTEN0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FTEN0` writer - Falling edge trigger enable of line 0"]
pub struct FTEN0_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN0_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN0_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
self.w
}
}
#[doc = "Falling edge trigger enable of line 1"]
pub type FTEN1_A = FTEN0_A;
#[doc = "Field `FTEN1` reader - Falling edge trigger enable of line 1"]
pub type FTEN1_R = FTEN0_R;
#[doc = "Field `FTEN1` writer - Falling edge trigger enable of line 1"]
pub struct FTEN1_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN1_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN1_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Falling edge trigger enable of line 2"]
pub type FTEN2_A = FTEN0_A;
#[doc = "Field `FTEN2` reader - Falling edge trigger enable of line 2"]
pub type FTEN2_R = FTEN0_R;
#[doc = "Field `FTEN2` writer - Falling edge trigger enable of line 2"]
pub struct FTEN2_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN2_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN2_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN2_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
self.w
}
}
#[doc = "Falling edge trigger enable of line 3"]
pub type FTEN3_A = FTEN0_A;
#[doc = "Field `FTEN3` reader - Falling edge trigger enable of line 3"]
pub type FTEN3_R = FTEN0_R;
#[doc = "Field `FTEN3` writer - Falling edge trigger enable of line 3"]
pub struct FTEN3_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN3_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN3_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN3_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
self.w
}
}
#[doc = "Falling edge trigger enable of line 4"]
pub type FTEN4_A = FTEN0_A;
#[doc = "Field `FTEN4` reader - Falling edge trigger enable of line 4"]
pub type FTEN4_R = FTEN0_R;
#[doc = "Field `FTEN4` writer - Falling edge trigger enable of line 4"]
pub struct FTEN4_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN4_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN4_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN4_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
self.w
}
}
#[doc = "Falling edge trigger enable of line 5"]
pub type FTEN5_A = FTEN0_A;
#[doc = "Field `FTEN5` reader - Falling edge trigger enable of line 5"]
pub type FTEN5_R = FTEN0_R;
#[doc = "Field `FTEN5` writer - Falling edge trigger enable of line 5"]
pub struct FTEN5_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN5_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN5_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN5_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
self.w
}
}
#[doc = "Falling edge trigger enable of line 6"]
pub type FTEN6_A = FTEN0_A;
#[doc = "Field `FTEN6` reader - Falling edge trigger enable of line 6"]
pub type FTEN6_R = FTEN0_R;
#[doc = "Field `FTEN6` writer - Falling edge trigger enable of line 6"]
pub struct FTEN6_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN6_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN6_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN6_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Falling edge trigger enable of line 7"]
pub type FTEN7_A = FTEN0_A;
#[doc = "Field `FTEN7` reader - Falling edge trigger enable of line 7"]
pub type FTEN7_R = FTEN0_R;
#[doc = "Field `FTEN7` writer - Falling edge trigger enable of line 7"]
pub struct FTEN7_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN7_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN7_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN7_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
self.w
}
}
#[doc = "Falling edge trigger enable of line 8"]
pub type FTEN8_A = FTEN0_A;
#[doc = "Field `FTEN8` reader - Falling edge trigger enable of line 8"]
pub type FTEN8_R = FTEN0_R;
#[doc = "Field `FTEN8` writer - Falling edge trigger enable of line 8"]
pub struct FTEN8_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN8_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN8_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN8_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN8_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "Falling edge trigger enable of line 9"]
pub type FTEN9_A = FTEN0_A;
#[doc = "Field `FTEN9` reader - Falling edge trigger enable of line 9"]
pub type FTEN9_R = FTEN0_R;
#[doc = "Field `FTEN9` writer - Falling edge trigger enable of line 9"]
pub struct FTEN9_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN9_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN9_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN9_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN9_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Falling edge trigger enable of line 10"]
pub type FTEN10_A = FTEN0_A;
#[doc = "Field `FTEN10` reader - Falling edge trigger enable of line 10"]
pub type FTEN10_R = FTEN0_R;
#[doc = "Field `FTEN10` writer - Falling edge trigger enable of line 10"]
pub struct FTEN10_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN10_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN10_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN10_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN10_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Falling edge trigger enable of line 11"]
pub type FTEN11_A = FTEN0_A;
#[doc = "Field `FTEN11` reader - Falling edge trigger enable of line 11"]
pub type FTEN11_R = FTEN0_R;
#[doc = "Field `FTEN11` writer - Falling edge trigger enable of line 11"]
pub struct FTEN11_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN11_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN11_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN11_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN11_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Falling edge trigger enable of line 12"]
pub type FTEN12_A = FTEN0_A;
#[doc = "Field `FTEN12` reader - Falling edge trigger enable of line 12"]
pub type FTEN12_R = FTEN0_R;
#[doc = "Field `FTEN12` writer - Falling edge trigger enable of line 12"]
pub struct FTEN12_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN12_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN12_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN12_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN12_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
self.w
}
}
#[doc = "Falling edge trigger enable of line 13"]
pub type FTEN13_A = FTEN0_A;
#[doc = "Field `FTEN13` reader - Falling edge trigger enable of line 13"]
pub type FTEN13_R = FTEN0_R;
#[doc = "Field `FTEN13` writer - Falling edge trigger enable of line 13"]
pub struct FTEN13_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN13_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN13_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN13_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN13_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
self.w
}
}
#[doc = "Falling edge trigger enable of line 14"]
pub type FTEN14_A = FTEN0_A;
#[doc = "Field `FTEN14` reader - Falling edge trigger enable of line 14"]
pub type FTEN14_R = FTEN0_R;
#[doc = "Field `FTEN14` writer - Falling edge trigger enable of line 14"]
pub struct FTEN14_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN14_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN14_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN14_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN14_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
#[doc = "Falling edge trigger enable of line 15"]
pub type FTEN15_A = FTEN0_A;
#[doc = "Field `FTEN15` reader - Falling edge trigger enable of line 15"]
pub type FTEN15_R = FTEN0_R;
#[doc = "Field `FTEN15` writer - Falling edge trigger enable of line 15"]
pub struct FTEN15_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN15_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN15_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN15_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN15_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Falling edge trigger enable of line 16"]
pub type FTEN16_A = FTEN0_A;
#[doc = "Field `FTEN16` reader - Falling edge trigger enable of line 16"]
pub type FTEN16_R = FTEN0_R;
#[doc = "Field `FTEN16` writer - Falling edge trigger enable of line 16"]
pub struct FTEN16_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN16_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN16_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN16_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN16_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
self.w
}
}
#[doc = "Falling edge trigger enable of line 17"]
pub type FTEN17_A = FTEN0_A;
#[doc = "Field `FTEN17` reader - Falling edge trigger enable of line 17"]
pub type FTEN17_R = FTEN0_R;
#[doc = "Field `FTEN17` writer - Falling edge trigger enable of line 17"]
pub struct FTEN17_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN17_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN17_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN17_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN17_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
self.w
}
}
#[doc = "Falling edge trigger enable of line 18"]
pub type FTEN18_A = FTEN0_A;
#[doc = "Field `FTEN18` reader - Falling edge trigger enable of line 18"]
pub type FTEN18_R = FTEN0_R;
#[doc = "Field `FTEN18` writer - Falling edge trigger enable of line 18"]
pub struct FTEN18_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN18_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN18_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN18_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN18_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
self.w
}
}
#[doc = "Falling edge trigger enable of line 19"]
pub type FTEN19_A = FTEN0_A;
#[doc = "Field `FTEN19` reader - Falling edge trigger enable of line 19"]
pub type FTEN19_R = FTEN0_R;
#[doc = "Field `FTEN19` writer - Falling edge trigger enable of line 19"]
pub struct FTEN19_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN19_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN19_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN19_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN19_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
self.w
}
}
#[doc = "Falling edge trigger enable of line 21"]
pub type FTEN21_A = FTEN0_A;
#[doc = "Field `FTEN21` reader - Falling edge trigger enable of line 21"]
pub type FTEN21_R = FTEN0_R;
#[doc = "Field `FTEN21` writer - Falling edge trigger enable of line 21"]
pub struct FTEN21_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN21_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN21_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN21_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN21_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21);
self.w
}
}
#[doc = "Falling edge trigger enable of line 22"]
pub type FTEN22_A = FTEN0_A;
#[doc = "Field `FTEN22` reader - Falling edge trigger enable of line 22"]
pub type FTEN22_R = FTEN0_R;
#[doc = "Field `FTEN22` writer - Falling edge trigger enable of line 22"]
pub struct FTEN22_W<'a> {
w: &'a mut W,
}
impl<'a> FTEN22_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FTEN22_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Falling edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FTEN22_A::DISABLED)
}
#[doc = "Falling edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FTEN22_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22);
self.w
}
}
impl R {
#[doc = "Bit 0 - Falling edge trigger enable of line 0"]
#[inline(always)]
pub fn ften0(&self) -> FTEN0_R {
FTEN0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Falling edge trigger enable of line 1"]
#[inline(always)]
pub fn ften1(&self) -> FTEN1_R {
FTEN1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Falling edge trigger enable of line 2"]
#[inline(always)]
pub fn ften2(&self) -> FTEN2_R {
FTEN2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Falling edge trigger enable of line 3"]
#[inline(always)]
pub fn ften3(&self) -> FTEN3_R {
FTEN3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Falling edge trigger enable of line 4"]
#[inline(always)]
pub fn ften4(&self) -> FTEN4_R {
FTEN4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Falling edge trigger enable of line 5"]
#[inline(always)]
pub fn ften5(&self) -> FTEN5_R {
FTEN5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Falling edge trigger enable of line 6"]
#[inline(always)]
pub fn ften6(&self) -> FTEN6_R {
FTEN6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Falling edge trigger enable of line 7"]
#[inline(always)]
pub fn ften7(&self) -> FTEN7_R {
FTEN7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Falling edge trigger enable of line 8"]
#[inline(always)]
pub fn ften8(&self) -> FTEN8_R {
FTEN8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Falling edge trigger enable of line 9"]
#[inline(always)]
pub fn ften9(&self) -> FTEN9_R {
FTEN9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Falling edge trigger enable of line 10"]
#[inline(always)]
pub fn ften10(&self) -> FTEN10_R {
FTEN10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Falling edge trigger enable of line 11"]
#[inline(always)]
pub fn ften11(&self) -> FTEN11_R {
FTEN11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Falling edge trigger enable of line 12"]
#[inline(always)]
pub fn ften12(&self) -> FTEN12_R {
FTEN12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Falling edge trigger enable of line 13"]
#[inline(always)]
pub fn ften13(&self) -> FTEN13_R {
FTEN13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - Falling edge trigger enable of line 14"]
#[inline(always)]
pub fn ften14(&self) -> FTEN14_R {
FTEN14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - Falling edge trigger enable of line 15"]
#[inline(always)]
pub fn ften15(&self) -> FTEN15_R {
FTEN15_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16 - Falling edge trigger enable of line 16"]
#[inline(always)]
pub fn ften16(&self) -> FTEN16_R {
FTEN16_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Falling edge trigger enable of line 17"]
#[inline(always)]
pub fn ften17(&self) -> FTEN17_R {
FTEN17_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Falling edge trigger enable of line 18"]
#[inline(always)]
pub fn ften18(&self) -> FTEN18_R {
FTEN18_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Falling edge trigger enable of line 19"]
#[inline(always)]
pub fn ften19(&self) -> FTEN19_R {
FTEN19_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 21 - Falling edge trigger enable of line 21"]
#[inline(always)]
pub fn ften21(&self) -> FTEN21_R {
FTEN21_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - Falling edge trigger enable of line 22"]
#[inline(always)]
pub fn ften22(&self) -> FTEN22_R {
FTEN22_R::new(((self.bits >> 22) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Falling edge trigger enable of line 0"]
#[inline(always)]
pub fn ften0(&mut self) -> FTEN0_W {
FTEN0_W { w: self }
}
#[doc = "Bit 1 - Falling edge trigger enable of line 1"]
#[inline(always)]
pub fn ften1(&mut self) -> FTEN1_W {
FTEN1_W { w: self }
}
#[doc = "Bit 2 - Falling edge trigger enable of line 2"]
#[inline(always)]
pub fn ften2(&mut self) -> FTEN2_W {
FTEN2_W { w: self }
}
#[doc = "Bit 3 - Falling edge trigger enable of line 3"]
#[inline(always)]
pub fn ften3(&mut self) -> FTEN3_W {
FTEN3_W { w: self }
}
#[doc = "Bit 4 - Falling edge trigger enable of line 4"]
#[inline(always)]
pub fn ften4(&mut self) -> FTEN4_W {
FTEN4_W { w: self }
}
#[doc = "Bit 5 - Falling edge trigger enable of line 5"]
#[inline(always)]
pub fn ften5(&mut self) -> FTEN5_W {
FTEN5_W { w: self }
}
#[doc = "Bit 6 - Falling edge trigger enable of line 6"]
#[inline(always)]
pub fn ften6(&mut self) -> FTEN6_W {
FTEN6_W { w: self }
}
#[doc = "Bit 7 - Falling edge trigger enable of line 7"]
#[inline(always)]
pub fn ften7(&mut self) -> FTEN7_W {
FTEN7_W { w: self }
}
#[doc = "Bit 8 - Falling edge trigger enable of line 8"]
#[inline(always)]
pub fn ften8(&mut self) -> FTEN8_W {
FTEN8_W { w: self }
}
#[doc = "Bit 9 - Falling edge trigger enable of line 9"]
#[inline(always)]
pub fn ften9(&mut self) -> FTEN9_W {
FTEN9_W { w: self }
}
#[doc = "Bit 10 - Falling edge trigger enable of line 10"]
#[inline(always)]
pub fn ften10(&mut self) -> FTEN10_W {
FTEN10_W { w: self }
}
#[doc = "Bit 11 - Falling edge trigger enable of line 11"]
#[inline(always)]
pub fn ften11(&mut self) -> FTEN11_W {
FTEN11_W { w: self }
}
#[doc = "Bit 12 - Falling edge trigger enable of line 12"]
#[inline(always)]
pub fn ften12(&mut self) -> FTEN12_W {
FTEN12_W { w: self }
}
#[doc = "Bit 13 - Falling edge trigger enable of line 13"]
#[inline(always)]
pub fn ften13(&mut self) -> FTEN13_W {
FTEN13_W { w: self }
}
#[doc = "Bit 14 - Falling edge trigger enable of line 14"]
#[inline(always)]
pub fn ften14(&mut self) -> FTEN14_W {
FTEN14_W { w: self }
}
#[doc = "Bit 15 - Falling edge trigger enable of line 15"]
#[inline(always)]
pub fn ften15(&mut self) -> FTEN15_W {
FTEN15_W { w: self }
}
#[doc = "Bit 16 - Falling edge trigger enable of line 16"]
#[inline(always)]
pub fn ften16(&mut self) -> FTEN16_W {
FTEN16_W { w: self }
}
#[doc = "Bit 17 - Falling edge trigger enable of line 17"]
#[inline(always)]
pub fn ften17(&mut self) -> FTEN17_W {
FTEN17_W { w: self }
}
#[doc = "Bit 18 - Falling edge trigger enable of line 18"]
#[inline(always)]
pub fn ften18(&mut self) -> FTEN18_W {
FTEN18_W { w: self }
}
#[doc = "Bit 19 - Falling edge trigger enable of line 19"]
#[inline(always)]
pub fn ften19(&mut self) -> FTEN19_W {
FTEN19_W { w: self }
}
#[doc = "Bit 21 - Falling edge trigger enable of line 21"]
#[inline(always)]
pub fn ften21(&mut self) -> FTEN21_W {
FTEN21_W { w: self }
}
#[doc = "Bit 22 - Falling edge trigger enable of line 22"]
#[inline(always)]
pub fn ften22(&mut self) -> FTEN22_W {
FTEN22_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Falling Egde Trigger Enable register (EXTI_FTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ften](index.html) module"]
pub struct FTEN_SPEC;
impl crate::RegisterSpec for FTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ften::R](R) reader structure"]
impl crate::Readable for FTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ften::W](W) writer structure"]
impl crate::Writable for FTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FTEN to value 0"]
impl crate::Resettable for FTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}