#[doc = "Register `INTR` reader"]
pub struct R(crate::R<INTR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<INTR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<INTR_SPEC>> for R {
    fn from(reader: crate::R<INTR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `INTR` writer"]
pub struct W(crate::W<INTR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<INTR_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<INTR_SPEC>> for W {
    fn from(writer: crate::W<INTR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `DATA0` writer - Interrupt pending on IO pad 0. Firmware writes 1 to clear the interrupt."]
pub struct DATA0_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA0_W<'a> {
    #[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 = "Field `DATA1` writer - Interrupt pending on IO pad 1. Firmware writes 1 to clear the interrupt."]
pub struct DATA1_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA1_W<'a> {
    #[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 = "Field `DATA2` writer - Interrupt pending on IO pad 2. Firmware writes 1 to clear the interrupt."]
pub struct DATA2_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA2_W<'a> {
    #[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 = "Field `DATA3` writer - Interrupt pending on IO pad 3. Firmware writes 1 to clear the interrupt."]
pub struct DATA3_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA3_W<'a> {
    #[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 = "Field `DATA4` writer - Interrupt pending on IO pad 4. Firmware writes 1 to clear the interrupt."]
pub struct DATA4_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA4_W<'a> {
    #[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 = "Field `DATA5` writer - Interrupt pending on IO pad 5. Firmware writes 1 to clear the interrupt."]
pub struct DATA5_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA5_W<'a> {
    #[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 = "Field `DATA6` writer - Interrupt pending on IO pad 6. Firmware writes 1 to clear the interrupt."]
pub struct DATA6_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA6_W<'a> {
    #[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 = "Field `DATA7` writer - Interrupt pending on IO pad 7. Firmware writes 1 to clear the interrupt."]
pub struct DATA7_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA7_W<'a> {
    #[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 = "Field `FLT_DATA` writer - Deglitched interrupt pending (selected by FLT_SELECT)."]
pub struct FLT_DATA_W<'a> {
    w: &'a mut W,
}
impl<'a> FLT_DATA_W<'a> {
    #[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 = "Field `PS_DATA0` reader - `"]
pub struct PS_DATA0_R(crate::FieldReader<bool, bool>);
impl PS_DATA0_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA0_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA0_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA1` reader - No description available"]
pub struct PS_DATA1_R(crate::FieldReader<bool, bool>);
impl PS_DATA1_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA1_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA1_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA2` reader - No description available"]
pub struct PS_DATA2_R(crate::FieldReader<bool, bool>);
impl PS_DATA2_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA2_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA2_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA3` reader - No description available"]
pub struct PS_DATA3_R(crate::FieldReader<bool, bool>);
impl PS_DATA3_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA3_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA3_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA4` reader - No description available"]
pub struct PS_DATA4_R(crate::FieldReader<bool, bool>);
impl PS_DATA4_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA4_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA4_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA5` reader - No description available"]
pub struct PS_DATA5_R(crate::FieldReader<bool, bool>);
impl PS_DATA5_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA5_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA5_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA6` reader - No description available"]
pub struct PS_DATA6_R(crate::FieldReader<bool, bool>);
impl PS_DATA6_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA6_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA6_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_DATA7` reader - No description available"]
pub struct PS_DATA7_R(crate::FieldReader<bool, bool>);
impl PS_DATA7_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_DATA7_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_DATA7_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `PS_FLT_DATA` reader - This is a duplicate of the contents of the PS register, provided here to allow reading of both pin state and interrupt state of the port in a single read operation."]
pub struct PS_FLT_DATA_R(crate::FieldReader<bool, bool>);
impl PS_FLT_DATA_R {
    pub(crate) fn new(bits: bool) -> Self {
        PS_FLT_DATA_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for PS_FLT_DATA_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 16 - `"]
    #[inline(always)]
    pub fn ps_data0(&self) -> PS_DATA0_R {
        PS_DATA0_R::new(((self.bits >> 16) & 0x01) != 0)
    }
    #[doc = "Bit 17 - No description available"]
    #[inline(always)]
    pub fn ps_data1(&self) -> PS_DATA1_R {
        PS_DATA1_R::new(((self.bits >> 17) & 0x01) != 0)
    }
    #[doc = "Bit 18 - No description available"]
    #[inline(always)]
    pub fn ps_data2(&self) -> PS_DATA2_R {
        PS_DATA2_R::new(((self.bits >> 18) & 0x01) != 0)
    }
    #[doc = "Bit 19 - No description available"]
    #[inline(always)]
    pub fn ps_data3(&self) -> PS_DATA3_R {
        PS_DATA3_R::new(((self.bits >> 19) & 0x01) != 0)
    }
    #[doc = "Bit 20 - No description available"]
    #[inline(always)]
    pub fn ps_data4(&self) -> PS_DATA4_R {
        PS_DATA4_R::new(((self.bits >> 20) & 0x01) != 0)
    }
    #[doc = "Bit 21 - No description available"]
    #[inline(always)]
    pub fn ps_data5(&self) -> PS_DATA5_R {
        PS_DATA5_R::new(((self.bits >> 21) & 0x01) != 0)
    }
    #[doc = "Bit 22 - No description available"]
    #[inline(always)]
    pub fn ps_data6(&self) -> PS_DATA6_R {
        PS_DATA6_R::new(((self.bits >> 22) & 0x01) != 0)
    }
    #[doc = "Bit 23 - No description available"]
    #[inline(always)]
    pub fn ps_data7(&self) -> PS_DATA7_R {
        PS_DATA7_R::new(((self.bits >> 23) & 0x01) != 0)
    }
    #[doc = "Bit 24 - This is a duplicate of the contents of the PS register, provided here to allow reading of both pin state and interrupt state of the port in a single read operation."]
    #[inline(always)]
    pub fn ps_flt_data(&self) -> PS_FLT_DATA_R {
        PS_FLT_DATA_R::new(((self.bits >> 24) & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Interrupt pending on IO pad 0. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data0(&mut self) -> DATA0_W {
        DATA0_W { w: self }
    }
    #[doc = "Bit 1 - Interrupt pending on IO pad 1. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data1(&mut self) -> DATA1_W {
        DATA1_W { w: self }
    }
    #[doc = "Bit 2 - Interrupt pending on IO pad 2. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data2(&mut self) -> DATA2_W {
        DATA2_W { w: self }
    }
    #[doc = "Bit 3 - Interrupt pending on IO pad 3. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data3(&mut self) -> DATA3_W {
        DATA3_W { w: self }
    }
    #[doc = "Bit 4 - Interrupt pending on IO pad 4. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data4(&mut self) -> DATA4_W {
        DATA4_W { w: self }
    }
    #[doc = "Bit 5 - Interrupt pending on IO pad 5. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data5(&mut self) -> DATA5_W {
        DATA5_W { w: self }
    }
    #[doc = "Bit 6 - Interrupt pending on IO pad 6. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data6(&mut self) -> DATA6_W {
        DATA6_W { w: self }
    }
    #[doc = "Bit 7 - Interrupt pending on IO pad 7. Firmware writes 1 to clear the interrupt."]
    #[inline(always)]
    pub fn data7(&mut self) -> DATA7_W {
        DATA7_W { w: self }
    }
    #[doc = "Bit 8 - Deglitched interrupt pending (selected by FLT_SELECT)."]
    #[inline(always)]
    pub fn flt_data(&mut self) -> FLT_DATA_W {
        FLT_DATA_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 = "Port interrupt status register\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 [intr](index.html) module"]
pub struct INTR_SPEC;
impl crate::RegisterSpec for INTR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [intr::R](R) reader structure"]
impl crate::Readable for INTR_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intr::W](W) writer structure"]
impl crate::Writable for INTR_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets INTR to value 0"]
impl crate::Resettable for INTR_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
