#[doc = "Register `RTEN` reader"]
pub struct R(crate::R<RTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<RTEN_SPEC>> for R {
fn from(reader: crate::R<RTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RTEN` writer"]
pub struct W(crate::W<RTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RTEN_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<RTEN_SPEC>> for W {
fn from(writer: crate::W<RTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Rising edge trigger enable of line 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTEN0_A {
#[doc = "0: Rising edge trigger is disabled"]
DISABLED = 0,
#[doc = "1: Rising edge trigger is enabled"]
ENABLED = 1,
}
impl From<RTEN0_A> for bool {
#[inline(always)]
fn from(variant: RTEN0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RTEN0` reader - Rising edge trigger enable of line 0"]
pub struct RTEN0_R(crate::FieldReader<bool, RTEN0_A>);
impl RTEN0_R {
pub(crate) fn new(bits: bool) -> Self {
RTEN0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RTEN0_A {
match self.bits {
false => RTEN0_A::DISABLED,
true => RTEN0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
**self == RTEN0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
**self == RTEN0_A::ENABLED
}
}
impl core::ops::Deref for RTEN0_R {
type Target = crate::FieldReader<bool, RTEN0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RTEN0` writer - Rising edge trigger enable of line 0"]
pub struct RTEN0_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN0_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN0_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 = "Rising edge trigger enable of line 1"]
pub type RTEN1_A = RTEN0_A;
#[doc = "Field `RTEN1` reader - Rising edge trigger enable of line 1"]
pub type RTEN1_R = RTEN0_R;
#[doc = "Field `RTEN1` writer - Rising edge trigger enable of line 1"]
pub struct RTEN1_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN1_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN1_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 = "Rising edge trigger enable of line 2"]
pub type RTEN2_A = RTEN0_A;
#[doc = "Field `RTEN2` reader - Rising edge trigger enable of line 2"]
pub type RTEN2_R = RTEN0_R;
#[doc = "Field `RTEN2` writer - Rising edge trigger enable of line 2"]
pub struct RTEN2_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN2_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN2_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN2_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 = "Rising edge trigger enable of line 3"]
pub type RTEN3_A = RTEN0_A;
#[doc = "Field `RTEN3` reader - Rising edge trigger enable of line 3"]
pub type RTEN3_R = RTEN0_R;
#[doc = "Field `RTEN3` writer - Rising edge trigger enable of line 3"]
pub struct RTEN3_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN3_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN3_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN3_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 = "Rising edge trigger enable of line 4"]
pub type RTEN4_A = RTEN0_A;
#[doc = "Field `RTEN4` reader - Rising edge trigger enable of line 4"]
pub type RTEN4_R = RTEN0_R;
#[doc = "Field `RTEN4` writer - Rising edge trigger enable of line 4"]
pub struct RTEN4_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN4_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN4_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN4_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 = "Rising edge trigger enable of line 5"]
pub type RTEN5_A = RTEN0_A;
#[doc = "Field `RTEN5` reader - Rising edge trigger enable of line 5"]
pub type RTEN5_R = RTEN0_R;
#[doc = "Field `RTEN5` writer - Rising edge trigger enable of line 5"]
pub struct RTEN5_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN5_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN5_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN5_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 = "Rising edge trigger enable of line 6"]
pub type RTEN6_A = RTEN0_A;
#[doc = "Field `RTEN6` reader - Rising edge trigger enable of line 6"]
pub type RTEN6_R = RTEN0_R;
#[doc = "Field `RTEN6` writer - Rising edge trigger enable of line 6"]
pub struct RTEN6_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN6_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN6_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN6_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 = "Rising edge trigger enable of line 7"]
pub type RTEN7_A = RTEN0_A;
#[doc = "Field `RTEN7` reader - Rising edge trigger enable of line 7"]
pub type RTEN7_R = RTEN0_R;
#[doc = "Field `RTEN7` writer - Rising edge trigger enable of line 7"]
pub struct RTEN7_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN7_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN7_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN7_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 = "Rising edge trigger enable of line 8"]
pub type RTEN8_A = RTEN0_A;
#[doc = "Field `RTEN8` reader - Rising edge trigger enable of line 8"]
pub type RTEN8_R = RTEN0_R;
#[doc = "Field `RTEN8` writer - Rising edge trigger enable of line 8"]
pub struct RTEN8_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN8_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN8_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN8_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN8_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 = "Rising edge trigger enable of line 9"]
pub type RTEN9_A = RTEN0_A;
#[doc = "Field `RTEN9` reader - Rising edge trigger enable of line 9"]
pub type RTEN9_R = RTEN0_R;
#[doc = "Field `RTEN9` writer - Rising edge trigger enable of line 9"]
pub struct RTEN9_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN9_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN9_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN9_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN9_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 = "Rising edge trigger enable of line 10"]
pub type RTEN10_A = RTEN0_A;
#[doc = "Field `RTEN10` reader - Rising edge trigger enable of line 10"]
pub type RTEN10_R = RTEN0_R;
#[doc = "Field `RTEN10` writer - Rising edge trigger enable of line 10"]
pub struct RTEN10_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN10_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN10_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN10_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN10_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 = "Rising edge trigger enable of line 11"]
pub type RTEN11_A = RTEN0_A;
#[doc = "Field `RTEN11` reader - Rising edge trigger enable of line 11"]
pub type RTEN11_R = RTEN0_R;
#[doc = "Field `RTEN11` writer - Rising edge trigger enable of line 11"]
pub struct RTEN11_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN11_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN11_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN11_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN11_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 = "Rising edge trigger enable of line 12"]
pub type RTEN12_A = RTEN0_A;
#[doc = "Field `RTEN12` reader - Rising edge trigger enable of line 12"]
pub type RTEN12_R = RTEN0_R;
#[doc = "Field `RTEN12` writer - Rising edge trigger enable of line 12"]
pub struct RTEN12_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN12_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN12_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN12_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN12_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 = "Rising edge trigger enable of line 13"]
pub type RTEN13_A = RTEN0_A;
#[doc = "Field `RTEN13` reader - Rising edge trigger enable of line 13"]
pub type RTEN13_R = RTEN0_R;
#[doc = "Field `RTEN13` writer - Rising edge trigger enable of line 13"]
pub struct RTEN13_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN13_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN13_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN13_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN13_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 = "Rising edge trigger enable of line 14"]
pub type RTEN14_A = RTEN0_A;
#[doc = "Field `RTEN14` reader - Rising edge trigger enable of line 14"]
pub type RTEN14_R = RTEN0_R;
#[doc = "Field `RTEN14` writer - Rising edge trigger enable of line 14"]
pub struct RTEN14_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN14_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN14_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN14_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN14_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 = "Rising edge trigger enable of line 15"]
pub type RTEN15_A = RTEN0_A;
#[doc = "Field `RTEN15` reader - Rising edge trigger enable of line 15"]
pub type RTEN15_R = RTEN0_R;
#[doc = "Field `RTEN15` writer - Rising edge trigger enable of line 15"]
pub struct RTEN15_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN15_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN15_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN15_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN15_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 = "Rising edge trigger enable of line 16"]
pub type RTEN16_A = RTEN0_A;
#[doc = "Field `RTEN16` reader - Rising edge trigger enable of line 16"]
pub type RTEN16_R = RTEN0_R;
#[doc = "Field `RTEN16` writer - Rising edge trigger enable of line 16"]
pub struct RTEN16_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN16_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN16_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN16_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN16_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 = "Rising edge trigger enable of line 17"]
pub type RTEN17_A = RTEN0_A;
#[doc = "Field `RTEN17` reader - Rising edge trigger enable of line 17"]
pub type RTEN17_R = RTEN0_R;
#[doc = "Field `RTEN17` writer - Rising edge trigger enable of line 17"]
pub struct RTEN17_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN17_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN17_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN17_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN17_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 = "Rising edge trigger enable of line 18"]
pub type RTEN18_A = RTEN0_A;
#[doc = "Field `RTEN18` reader - Rising edge trigger enable of line 18"]
pub type RTEN18_R = RTEN0_R;
#[doc = "Field `RTEN18` writer - Rising edge trigger enable of line 18"]
pub struct RTEN18_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN18_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN18_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN18_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN18_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 = "Rising edge trigger enable of line 19"]
pub type RTEN19_A = RTEN0_A;
#[doc = "Field `RTEN19` reader - Rising edge trigger enable of line 19"]
pub type RTEN19_R = RTEN0_R;
#[doc = "Field `RTEN19` writer - Rising edge trigger enable of line 19"]
pub struct RTEN19_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN19_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN19_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN19_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN19_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 = "Rising edge trigger enable of line 21"]
pub type RTEN21_A = RTEN0_A;
#[doc = "Field `RTEN21` reader - Rising edge trigger enable of line 21"]
pub type RTEN21_R = RTEN0_R;
#[doc = "Field `RTEN21` writer - Rising edge trigger enable of line 21"]
pub struct RTEN21_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN21_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN21_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN21_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN21_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 = "Rising edge trigger enable of line 22"]
pub type RTEN22_A = RTEN0_A;
#[doc = "Field `RTEN22` reader - Rising edge trigger enable of line 22"]
pub type RTEN22_R = RTEN0_R;
#[doc = "Field `RTEN22` writer - Rising edge trigger enable of line 22"]
pub struct RTEN22_W<'a> {
w: &'a mut W,
}
impl<'a> RTEN22_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTEN22_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Rising edge trigger is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RTEN22_A::DISABLED)
}
#[doc = "Rising edge trigger is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RTEN22_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 - Rising edge trigger enable of line 0"]
#[inline(always)]
pub fn rten0(&self) -> RTEN0_R {
RTEN0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Rising edge trigger enable of line 1"]
#[inline(always)]
pub fn rten1(&self) -> RTEN1_R {
RTEN1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Rising edge trigger enable of line 2"]
#[inline(always)]
pub fn rten2(&self) -> RTEN2_R {
RTEN2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Rising edge trigger enable of line 3"]
#[inline(always)]
pub fn rten3(&self) -> RTEN3_R {
RTEN3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Rising edge trigger enable of line 4"]
#[inline(always)]
pub fn rten4(&self) -> RTEN4_R {
RTEN4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Rising edge trigger enable of line 5"]
#[inline(always)]
pub fn rten5(&self) -> RTEN5_R {
RTEN5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Rising edge trigger enable of line 6"]
#[inline(always)]
pub fn rten6(&self) -> RTEN6_R {
RTEN6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Rising edge trigger enable of line 7"]
#[inline(always)]
pub fn rten7(&self) -> RTEN7_R {
RTEN7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Rising edge trigger enable of line 8"]
#[inline(always)]
pub fn rten8(&self) -> RTEN8_R {
RTEN8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Rising edge trigger enable of line 9"]
#[inline(always)]
pub fn rten9(&self) -> RTEN9_R {
RTEN9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Rising edge trigger enable of line 10"]
#[inline(always)]
pub fn rten10(&self) -> RTEN10_R {
RTEN10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Rising edge trigger enable of line 11"]
#[inline(always)]
pub fn rten11(&self) -> RTEN11_R {
RTEN11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Rising edge trigger enable of line 12"]
#[inline(always)]
pub fn rten12(&self) -> RTEN12_R {
RTEN12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Rising edge trigger enable of line 13"]
#[inline(always)]
pub fn rten13(&self) -> RTEN13_R {
RTEN13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - Rising edge trigger enable of line 14"]
#[inline(always)]
pub fn rten14(&self) -> RTEN14_R {
RTEN14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - Rising edge trigger enable of line 15"]
#[inline(always)]
pub fn rten15(&self) -> RTEN15_R {
RTEN15_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16 - Rising edge trigger enable of line 16"]
#[inline(always)]
pub fn rten16(&self) -> RTEN16_R {
RTEN16_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Rising edge trigger enable of line 17"]
#[inline(always)]
pub fn rten17(&self) -> RTEN17_R {
RTEN17_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Rising edge trigger enable of line 18"]
#[inline(always)]
pub fn rten18(&self) -> RTEN18_R {
RTEN18_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Rising edge trigger enable of line 19"]
#[inline(always)]
pub fn rten19(&self) -> RTEN19_R {
RTEN19_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 21 - Rising edge trigger enable of line 21"]
#[inline(always)]
pub fn rten21(&self) -> RTEN21_R {
RTEN21_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - Rising edge trigger enable of line 22"]
#[inline(always)]
pub fn rten22(&self) -> RTEN22_R {
RTEN22_R::new(((self.bits >> 22) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Rising edge trigger enable of line 0"]
#[inline(always)]
pub fn rten0(&mut self) -> RTEN0_W {
RTEN0_W { w: self }
}
#[doc = "Bit 1 - Rising edge trigger enable of line 1"]
#[inline(always)]
pub fn rten1(&mut self) -> RTEN1_W {
RTEN1_W { w: self }
}
#[doc = "Bit 2 - Rising edge trigger enable of line 2"]
#[inline(always)]
pub fn rten2(&mut self) -> RTEN2_W {
RTEN2_W { w: self }
}
#[doc = "Bit 3 - Rising edge trigger enable of line 3"]
#[inline(always)]
pub fn rten3(&mut self) -> RTEN3_W {
RTEN3_W { w: self }
}
#[doc = "Bit 4 - Rising edge trigger enable of line 4"]
#[inline(always)]
pub fn rten4(&mut self) -> RTEN4_W {
RTEN4_W { w: self }
}
#[doc = "Bit 5 - Rising edge trigger enable of line 5"]
#[inline(always)]
pub fn rten5(&mut self) -> RTEN5_W {
RTEN5_W { w: self }
}
#[doc = "Bit 6 - Rising edge trigger enable of line 6"]
#[inline(always)]
pub fn rten6(&mut self) -> RTEN6_W {
RTEN6_W { w: self }
}
#[doc = "Bit 7 - Rising edge trigger enable of line 7"]
#[inline(always)]
pub fn rten7(&mut self) -> RTEN7_W {
RTEN7_W { w: self }
}
#[doc = "Bit 8 - Rising edge trigger enable of line 8"]
#[inline(always)]
pub fn rten8(&mut self) -> RTEN8_W {
RTEN8_W { w: self }
}
#[doc = "Bit 9 - Rising edge trigger enable of line 9"]
#[inline(always)]
pub fn rten9(&mut self) -> RTEN9_W {
RTEN9_W { w: self }
}
#[doc = "Bit 10 - Rising edge trigger enable of line 10"]
#[inline(always)]
pub fn rten10(&mut self) -> RTEN10_W {
RTEN10_W { w: self }
}
#[doc = "Bit 11 - Rising edge trigger enable of line 11"]
#[inline(always)]
pub fn rten11(&mut self) -> RTEN11_W {
RTEN11_W { w: self }
}
#[doc = "Bit 12 - Rising edge trigger enable of line 12"]
#[inline(always)]
pub fn rten12(&mut self) -> RTEN12_W {
RTEN12_W { w: self }
}
#[doc = "Bit 13 - Rising edge trigger enable of line 13"]
#[inline(always)]
pub fn rten13(&mut self) -> RTEN13_W {
RTEN13_W { w: self }
}
#[doc = "Bit 14 - Rising edge trigger enable of line 14"]
#[inline(always)]
pub fn rten14(&mut self) -> RTEN14_W {
RTEN14_W { w: self }
}
#[doc = "Bit 15 - Rising edge trigger enable of line 15"]
#[inline(always)]
pub fn rten15(&mut self) -> RTEN15_W {
RTEN15_W { w: self }
}
#[doc = "Bit 16 - Rising edge trigger enable of line 16"]
#[inline(always)]
pub fn rten16(&mut self) -> RTEN16_W {
RTEN16_W { w: self }
}
#[doc = "Bit 17 - Rising edge trigger enable of line 17"]
#[inline(always)]
pub fn rten17(&mut self) -> RTEN17_W {
RTEN17_W { w: self }
}
#[doc = "Bit 18 - Rising edge trigger enable of line 18"]
#[inline(always)]
pub fn rten18(&mut self) -> RTEN18_W {
RTEN18_W { w: self }
}
#[doc = "Bit 19 - Rising edge trigger enable of line 19"]
#[inline(always)]
pub fn rten19(&mut self) -> RTEN19_W {
RTEN19_W { w: self }
}
#[doc = "Bit 21 - Rising edge trigger enable of line 21"]
#[inline(always)]
pub fn rten21(&mut self) -> RTEN21_W {
RTEN21_W { w: self }
}
#[doc = "Bit 22 - Rising edge trigger enable of line 22"]
#[inline(always)]
pub fn rten22(&mut self) -> RTEN22_W {
RTEN22_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 = "Rising Edge Trigger Enable register (EXTI_RTEN)\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 [rten](index.html) module"]
pub struct RTEN_SPEC;
impl crate::RegisterSpec for RTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rten::R](R) reader structure"]
impl crate::Readable for RTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rten::W](W) writer structure"]
impl crate::Writable for RTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RTEN to value 0"]
impl crate::Resettable for RTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}