#[doc = "Register `PD` reader"]
pub struct R(crate::R<PD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<PD_SPEC>> for R {
fn from(reader: crate::R<PD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PD` writer"]
pub struct W(crate::W<PD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PD_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<PD_SPEC>> for W {
fn from(writer: crate::W<PD_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Interrupt pending status of line 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PD0_A {
#[doc = "0: No trigger request occurred"]
NOTPENDING = 0,
#[doc = "1: Selected trigger request occurred"]
PENDING = 1,
}
impl From<PD0_A> for bool {
#[inline(always)]
fn from(variant: PD0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PD0` reader - Interrupt pending status of line 0"]
pub struct PD0_R(crate::FieldReader<bool, PD0_A>);
impl PD0_R {
pub(crate) fn new(bits: bool) -> Self {
PD0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PD0_A {
match self.bits {
false => PD0_A::NOTPENDING,
true => PD0_A::PENDING,
}
}
#[doc = "Checks if the value of the field is `NOTPENDING`"]
#[inline(always)]
pub fn is_not_pending(&self) -> bool {
**self == PD0_A::NOTPENDING
}
#[doc = "Checks if the value of the field is `PENDING`"]
#[inline(always)]
pub fn is_pending(&self) -> bool {
**self == PD0_A::PENDING
}
}
impl core::ops::Deref for PD0_R {
type Target = crate::FieldReader<bool, PD0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Interrupt pending status of line 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PD0_AW {
#[doc = "1: Clears pending bit"]
CLEAR = 1,
}
impl From<PD0_AW> for bool {
#[inline(always)]
fn from(variant: PD0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PD0` writer - Interrupt pending status of line 0"]
pub struct PD0_W<'a> {
w: &'a mut W,
}
impl<'a> PD0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD0_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD0_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 1"]
pub type PD1_A = PD0_A;
#[doc = "Field `PD1` reader - Interrupt pending status of line 1"]
pub type PD1_R = PD0_R;
#[doc = "Interrupt pending status of line 1"]
pub type PD1_AW = PD0_AW;
#[doc = "Field `PD1` writer - Interrupt pending status of line 1"]
pub struct PD1_W<'a> {
w: &'a mut W,
}
impl<'a> PD1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD1_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD1_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 2"]
pub type PD2_A = PD0_A;
#[doc = "Field `PD2` reader - Interrupt pending status of line 2"]
pub type PD2_R = PD0_R;
#[doc = "Interrupt pending status of line 2"]
pub type PD2_AW = PD0_AW;
#[doc = "Field `PD2` writer - Interrupt pending status of line 2"]
pub struct PD2_W<'a> {
w: &'a mut W,
}
impl<'a> PD2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD2_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD2_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 3"]
pub type PD3_A = PD0_A;
#[doc = "Field `PD3` reader - Interrupt pending status of line 3"]
pub type PD3_R = PD0_R;
#[doc = "Interrupt pending status of line 3"]
pub type PD3_AW = PD0_AW;
#[doc = "Field `PD3` writer - Interrupt pending status of line 3"]
pub struct PD3_W<'a> {
w: &'a mut W,
}
impl<'a> PD3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD3_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD3_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 4"]
pub type PD4_A = PD0_A;
#[doc = "Field `PD4` reader - Interrupt pending status of line 4"]
pub type PD4_R = PD0_R;
#[doc = "Interrupt pending status of line 4"]
pub type PD4_AW = PD0_AW;
#[doc = "Field `PD4` writer - Interrupt pending status of line 4"]
pub struct PD4_W<'a> {
w: &'a mut W,
}
impl<'a> PD4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD4_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD4_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 5"]
pub type PD5_A = PD0_A;
#[doc = "Field `PD5` reader - Interrupt pending status of line 5"]
pub type PD5_R = PD0_R;
#[doc = "Interrupt pending status of line 5"]
pub type PD5_AW = PD0_AW;
#[doc = "Field `PD5` writer - Interrupt pending status of line 5"]
pub struct PD5_W<'a> {
w: &'a mut W,
}
impl<'a> PD5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD5_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD5_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 6"]
pub type PD6_A = PD0_A;
#[doc = "Field `PD6` reader - Interrupt pending status of line 6"]
pub type PD6_R = PD0_R;
#[doc = "Interrupt pending status of line 6"]
pub type PD6_AW = PD0_AW;
#[doc = "Field `PD6` writer - Interrupt pending status of line 6"]
pub struct PD6_W<'a> {
w: &'a mut W,
}
impl<'a> PD6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD6_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD6_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 7"]
pub type PD7_A = PD0_A;
#[doc = "Field `PD7` reader - Interrupt pending status of line 7"]
pub type PD7_R = PD0_R;
#[doc = "Interrupt pending status of line 7"]
pub type PD7_AW = PD0_AW;
#[doc = "Field `PD7` writer - Interrupt pending status of line 7"]
pub struct PD7_W<'a> {
w: &'a mut W,
}
impl<'a> PD7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD7_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD7_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 8"]
pub type PD8_A = PD0_A;
#[doc = "Field `PD8` reader - Interrupt pending status of line 8"]
pub type PD8_R = PD0_R;
#[doc = "Interrupt pending status of line 8"]
pub type PD8_AW = PD0_AW;
#[doc = "Field `PD8` writer - Interrupt pending status of line 8"]
pub struct PD8_W<'a> {
w: &'a mut W,
}
impl<'a> PD8_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD8_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD8_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 9"]
pub type PD9_A = PD0_A;
#[doc = "Field `PD9` reader - Interrupt pending status of line 9"]
pub type PD9_R = PD0_R;
#[doc = "Interrupt pending status of line 9"]
pub type PD9_AW = PD0_AW;
#[doc = "Field `PD9` writer - Interrupt pending status of line 9"]
pub struct PD9_W<'a> {
w: &'a mut W,
}
impl<'a> PD9_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD9_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD9_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 10"]
pub type PD10_A = PD0_A;
#[doc = "Field `PD10` reader - Interrupt pending status of line 10"]
pub type PD10_R = PD0_R;
#[doc = "Interrupt pending status of line 10"]
pub type PD10_AW = PD0_AW;
#[doc = "Field `PD10` writer - Interrupt pending status of line 10"]
pub struct PD10_W<'a> {
w: &'a mut W,
}
impl<'a> PD10_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD10_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD10_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 11"]
pub type PD11_A = PD0_A;
#[doc = "Field `PD11` reader - Interrupt pending status of line 11"]
pub type PD11_R = PD0_R;
#[doc = "Interrupt pending status of line 11"]
pub type PD11_AW = PD0_AW;
#[doc = "Field `PD11` writer - Interrupt pending status of line 11"]
pub struct PD11_W<'a> {
w: &'a mut W,
}
impl<'a> PD11_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD11_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD11_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 12"]
pub type PD12_A = PD0_A;
#[doc = "Field `PD12` reader - Interrupt pending status of line 12"]
pub type PD12_R = PD0_R;
#[doc = "Interrupt pending status of line 12"]
pub type PD12_AW = PD0_AW;
#[doc = "Field `PD12` writer - Interrupt pending status of line 12"]
pub struct PD12_W<'a> {
w: &'a mut W,
}
impl<'a> PD12_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD12_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD12_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 13"]
pub type PD13_A = PD0_A;
#[doc = "Field `PD13` reader - Interrupt pending status of line 13"]
pub type PD13_R = PD0_R;
#[doc = "Interrupt pending status of line 13"]
pub type PD13_AW = PD0_AW;
#[doc = "Field `PD13` writer - Interrupt pending status of line 13"]
pub struct PD13_W<'a> {
w: &'a mut W,
}
impl<'a> PD13_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD13_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD13_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 14"]
pub type PD14_A = PD0_A;
#[doc = "Field `PD14` reader - Interrupt pending status of line 14"]
pub type PD14_R = PD0_R;
#[doc = "Interrupt pending status of line 14"]
pub type PD14_AW = PD0_AW;
#[doc = "Field `PD14` writer - Interrupt pending status of line 14"]
pub struct PD14_W<'a> {
w: &'a mut W,
}
impl<'a> PD14_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD14_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD14_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 15"]
pub type PD15_A = PD0_A;
#[doc = "Field `PD15` reader - Interrupt pending status of line 15"]
pub type PD15_R = PD0_R;
#[doc = "Interrupt pending status of line 15"]
pub type PD15_AW = PD0_AW;
#[doc = "Field `PD15` writer - Interrupt pending status of line 15"]
pub struct PD15_W<'a> {
w: &'a mut W,
}
impl<'a> PD15_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD15_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD15_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 16"]
pub type PD16_A = PD0_A;
#[doc = "Field `PD16` reader - Interrupt pending status of line 16"]
pub type PD16_R = PD0_R;
#[doc = "Interrupt pending status of line 16"]
pub type PD16_AW = PD0_AW;
#[doc = "Field `PD16` writer - Interrupt pending status of line 16"]
pub struct PD16_W<'a> {
w: &'a mut W,
}
impl<'a> PD16_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD16_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD16_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 17"]
pub type PD17_A = PD0_A;
#[doc = "Field `PD17` reader - Interrupt pending status of line 17"]
pub type PD17_R = PD0_R;
#[doc = "Interrupt pending status of line 17"]
pub type PD17_AW = PD0_AW;
#[doc = "Field `PD17` writer - Interrupt pending status of line 17"]
pub struct PD17_W<'a> {
w: &'a mut W,
}
impl<'a> PD17_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD17_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD17_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 18"]
pub type PD18_A = PD0_A;
#[doc = "Field `PD18` reader - Interrupt pending status of line 18"]
pub type PD18_R = PD0_R;
#[doc = "Interrupt pending status of line 18"]
pub type PD18_AW = PD0_AW;
#[doc = "Field `PD18` writer - Interrupt pending status of line 18"]
pub struct PD18_W<'a> {
w: &'a mut W,
}
impl<'a> PD18_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD18_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD18_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 19"]
pub type PD19_A = PD0_A;
#[doc = "Field `PD19` reader - Interrupt pending status of line 19"]
pub type PD19_R = PD0_R;
#[doc = "Interrupt pending status of line 19"]
pub type PD19_AW = PD0_AW;
#[doc = "Field `PD19` writer - Interrupt pending status of line 19"]
pub struct PD19_W<'a> {
w: &'a mut W,
}
impl<'a> PD19_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD19_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD19_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 21"]
pub type PD21_A = PD0_A;
#[doc = "Field `PD21` reader - Interrupt pending status of line 21"]
pub type PD21_R = PD0_R;
#[doc = "Interrupt pending status of line 21"]
pub type PD21_AW = PD0_AW;
#[doc = "Field `PD21` writer - Interrupt pending status of line 21"]
pub struct PD21_W<'a> {
w: &'a mut W,
}
impl<'a> PD21_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD21_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD21_AW::CLEAR)
}
#[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 = "Interrupt pending status of line 22"]
pub type PD22_A = PD0_A;
#[doc = "Field `PD22` reader - Interrupt pending status of line 22"]
pub type PD22_R = PD0_R;
#[doc = "Interrupt pending status of line 22"]
pub type PD22_AW = PD0_AW;
#[doc = "Field `PD22` writer - Interrupt pending status of line 22"]
pub struct PD22_W<'a> {
w: &'a mut W,
}
impl<'a> PD22_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PD22_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clears pending bit"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PD22_AW::CLEAR)
}
#[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 - Interrupt pending status of line 0"]
#[inline(always)]
pub fn pd0(&self) -> PD0_R {
PD0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Interrupt pending status of line 1"]
#[inline(always)]
pub fn pd1(&self) -> PD1_R {
PD1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Interrupt pending status of line 2"]
#[inline(always)]
pub fn pd2(&self) -> PD2_R {
PD2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Interrupt pending status of line 3"]
#[inline(always)]
pub fn pd3(&self) -> PD3_R {
PD3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Interrupt pending status of line 4"]
#[inline(always)]
pub fn pd4(&self) -> PD4_R {
PD4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Interrupt pending status of line 5"]
#[inline(always)]
pub fn pd5(&self) -> PD5_R {
PD5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Interrupt pending status of line 6"]
#[inline(always)]
pub fn pd6(&self) -> PD6_R {
PD6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Interrupt pending status of line 7"]
#[inline(always)]
pub fn pd7(&self) -> PD7_R {
PD7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Interrupt pending status of line 8"]
#[inline(always)]
pub fn pd8(&self) -> PD8_R {
PD8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Interrupt pending status of line 9"]
#[inline(always)]
pub fn pd9(&self) -> PD9_R {
PD9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Interrupt pending status of line 10"]
#[inline(always)]
pub fn pd10(&self) -> PD10_R {
PD10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Interrupt pending status of line 11"]
#[inline(always)]
pub fn pd11(&self) -> PD11_R {
PD11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Interrupt pending status of line 12"]
#[inline(always)]
pub fn pd12(&self) -> PD12_R {
PD12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Interrupt pending status of line 13"]
#[inline(always)]
pub fn pd13(&self) -> PD13_R {
PD13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - Interrupt pending status of line 14"]
#[inline(always)]
pub fn pd14(&self) -> PD14_R {
PD14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - Interrupt pending status of line 15"]
#[inline(always)]
pub fn pd15(&self) -> PD15_R {
PD15_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16 - Interrupt pending status of line 16"]
#[inline(always)]
pub fn pd16(&self) -> PD16_R {
PD16_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Interrupt pending status of line 17"]
#[inline(always)]
pub fn pd17(&self) -> PD17_R {
PD17_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Interrupt pending status of line 18"]
#[inline(always)]
pub fn pd18(&self) -> PD18_R {
PD18_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Interrupt pending status of line 19"]
#[inline(always)]
pub fn pd19(&self) -> PD19_R {
PD19_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 21 - Interrupt pending status of line 21"]
#[inline(always)]
pub fn pd21(&self) -> PD21_R {
PD21_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 22 - Interrupt pending status of line 22"]
#[inline(always)]
pub fn pd22(&self) -> PD22_R {
PD22_R::new(((self.bits >> 22) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Interrupt pending status of line 0"]
#[inline(always)]
pub fn pd0(&mut self) -> PD0_W {
PD0_W { w: self }
}
#[doc = "Bit 1 - Interrupt pending status of line 1"]
#[inline(always)]
pub fn pd1(&mut self) -> PD1_W {
PD1_W { w: self }
}
#[doc = "Bit 2 - Interrupt pending status of line 2"]
#[inline(always)]
pub fn pd2(&mut self) -> PD2_W {
PD2_W { w: self }
}
#[doc = "Bit 3 - Interrupt pending status of line 3"]
#[inline(always)]
pub fn pd3(&mut self) -> PD3_W {
PD3_W { w: self }
}
#[doc = "Bit 4 - Interrupt pending status of line 4"]
#[inline(always)]
pub fn pd4(&mut self) -> PD4_W {
PD4_W { w: self }
}
#[doc = "Bit 5 - Interrupt pending status of line 5"]
#[inline(always)]
pub fn pd5(&mut self) -> PD5_W {
PD5_W { w: self }
}
#[doc = "Bit 6 - Interrupt pending status of line 6"]
#[inline(always)]
pub fn pd6(&mut self) -> PD6_W {
PD6_W { w: self }
}
#[doc = "Bit 7 - Interrupt pending status of line 7"]
#[inline(always)]
pub fn pd7(&mut self) -> PD7_W {
PD7_W { w: self }
}
#[doc = "Bit 8 - Interrupt pending status of line 8"]
#[inline(always)]
pub fn pd8(&mut self) -> PD8_W {
PD8_W { w: self }
}
#[doc = "Bit 9 - Interrupt pending status of line 9"]
#[inline(always)]
pub fn pd9(&mut self) -> PD9_W {
PD9_W { w: self }
}
#[doc = "Bit 10 - Interrupt pending status of line 10"]
#[inline(always)]
pub fn pd10(&mut self) -> PD10_W {
PD10_W { w: self }
}
#[doc = "Bit 11 - Interrupt pending status of line 11"]
#[inline(always)]
pub fn pd11(&mut self) -> PD11_W {
PD11_W { w: self }
}
#[doc = "Bit 12 - Interrupt pending status of line 12"]
#[inline(always)]
pub fn pd12(&mut self) -> PD12_W {
PD12_W { w: self }
}
#[doc = "Bit 13 - Interrupt pending status of line 13"]
#[inline(always)]
pub fn pd13(&mut self) -> PD13_W {
PD13_W { w: self }
}
#[doc = "Bit 14 - Interrupt pending status of line 14"]
#[inline(always)]
pub fn pd14(&mut self) -> PD14_W {
PD14_W { w: self }
}
#[doc = "Bit 15 - Interrupt pending status of line 15"]
#[inline(always)]
pub fn pd15(&mut self) -> PD15_W {
PD15_W { w: self }
}
#[doc = "Bit 16 - Interrupt pending status of line 16"]
#[inline(always)]
pub fn pd16(&mut self) -> PD16_W {
PD16_W { w: self }
}
#[doc = "Bit 17 - Interrupt pending status of line 17"]
#[inline(always)]
pub fn pd17(&mut self) -> PD17_W {
PD17_W { w: self }
}
#[doc = "Bit 18 - Interrupt pending status of line 18"]
#[inline(always)]
pub fn pd18(&mut self) -> PD18_W {
PD18_W { w: self }
}
#[doc = "Bit 19 - Interrupt pending status of line 19"]
#[inline(always)]
pub fn pd19(&mut self) -> PD19_W {
PD19_W { w: self }
}
#[doc = "Bit 21 - Interrupt pending status of line 21"]
#[inline(always)]
pub fn pd21(&mut self) -> PD21_W {
PD21_W { w: self }
}
#[doc = "Bit 22 - Interrupt pending status of line 22"]
#[inline(always)]
pub fn pd22(&mut self) -> PD22_W {
PD22_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 = "Pending register (EXTI_PD)\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 [pd](index.html) module"]
pub struct PD_SPEC;
impl crate::RegisterSpec for PD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pd::R](R) reader structure"]
impl crate::Readable for PD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pd::W](W) writer structure"]
impl crate::Writable for PD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PD to value 0"]
impl crate::Resettable for PD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}