#[doc = "Register `PAD_HOLD` reader"]
pub type R = crate::R<PAD_HOLD_SPEC>;
#[doc = "Register `PAD_HOLD` writer"]
pub type W = crate::W<PAD_HOLD_SPEC>;
#[doc = "Field `TOUCH_PAD0` reader - Sets the touch GPIO 0 to hold."]
pub type TOUCH_PAD0_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD0` writer - Sets the touch GPIO 0 to hold."]
pub type TOUCH_PAD0_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD1` reader - Sets the touch GPIO 1 to hold."]
pub type TOUCH_PAD1_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD1` writer - Sets the touch GPIO 1 to hold."]
pub type TOUCH_PAD1_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD2` reader - Sets the touch GPIO 2 to hold."]
pub type TOUCH_PAD2_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD2` writer - Sets the touch GPIO 2 to hold."]
pub type TOUCH_PAD2_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD3` reader - Sets the touch GPIO 3 to hold."]
pub type TOUCH_PAD3_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD3` writer - Sets the touch GPIO 3 to hold."]
pub type TOUCH_PAD3_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD4` reader - Sets the touch GPIO 4 to hold."]
pub type TOUCH_PAD4_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD4` writer - Sets the touch GPIO 4 to hold."]
pub type TOUCH_PAD4_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD5` reader - Sets the touch GPIO 5 to hold."]
pub type TOUCH_PAD5_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD5` writer - Sets the touch GPIO 5 to hold."]
pub type TOUCH_PAD5_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD6` reader - Sets the touch GPIO 6 to hold."]
pub type TOUCH_PAD6_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD6` writer - Sets the touch GPIO 6 to hold."]
pub type TOUCH_PAD6_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD7` reader - Sets the touch GPIO 7 to hold."]
pub type TOUCH_PAD7_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD7` writer - Sets the touch GPIO 7 to hold."]
pub type TOUCH_PAD7_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD8` reader - Sets the touch GPIO 8 to hold."]
pub type TOUCH_PAD8_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD8` writer - Sets the touch GPIO 8 to hold."]
pub type TOUCH_PAD8_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD9` reader - Sets the touch GPIO 9 to hold."]
pub type TOUCH_PAD9_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD9` writer - Sets the touch GPIO 9 to hold."]
pub type TOUCH_PAD9_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD10` reader - Sets the touch GPIO 10 to hold."]
pub type TOUCH_PAD10_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD10` writer - Sets the touch GPIO 10 to hold."]
pub type TOUCH_PAD10_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD11` reader - Sets the touch GPIO 11 to hold."]
pub type TOUCH_PAD11_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD11` writer - Sets the touch GPIO 11 to hold."]
pub type TOUCH_PAD11_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD12` reader - Sets the touch GPIO 12 to hold."]
pub type TOUCH_PAD12_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD12` writer - Sets the touch GPIO 12 to hold."]
pub type TOUCH_PAD12_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD13` reader - Sets the touch GPIO 13 to hold."]
pub type TOUCH_PAD13_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD13` writer - Sets the touch GPIO 13 to hold."]
pub type TOUCH_PAD13_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD14` reader - Sets the touch GPIO 14 to hold."]
pub type TOUCH_PAD14_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD14` writer - Sets the touch GPIO 14 to hold."]
pub type TOUCH_PAD14_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `X32P` reader - Sets the x32p to hold."]
pub type X32P_R = crate::BitReader;
#[doc = "Field `X32P` writer - Sets the x32p to hold."]
pub type X32P_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `X32N` reader - Sets the x32n to hold."]
pub type X32N_R = crate::BitReader;
#[doc = "Field `X32N` writer - Sets the x32n to hold."]
pub type X32N_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PDAC1` reader - Sets the pdac1 to hold."]
pub type PDAC1_R = crate::BitReader;
#[doc = "Field `PDAC1` writer - Sets the pdac1 to hold."]
pub type PDAC1_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PDAC2` reader - Sets the pdac2 to hold."]
pub type PDAC2_R = crate::BitReader;
#[doc = "Field `PDAC2` writer - Sets the pdac2 to hold."]
pub type PDAC2_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD19` reader - Sets the RTG GPIO 19 to hold."]
pub type PAD19_R = crate::BitReader;
#[doc = "Field `PAD19` writer - Sets the RTG GPIO 19 to hold."]
pub type PAD19_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD20` reader - Sets the RTG GPIO 20 to hold."]
pub type PAD20_R = crate::BitReader;
#[doc = "Field `PAD20` writer - Sets the RTG GPIO 20 to hold."]
pub type PAD20_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD21` reader - Sets the RTG GPIO 21 to hold."]
pub type PAD21_R = crate::BitReader;
#[doc = "Field `PAD21` writer - Sets the RTG GPIO 21 to hold."]
pub type PAD21_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - Sets the touch GPIO 0 to hold."]
    #[inline(always)]
    pub fn touch_pad0(&self) -> TOUCH_PAD0_R {
        TOUCH_PAD0_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Sets the touch GPIO 1 to hold."]
    #[inline(always)]
    pub fn touch_pad1(&self) -> TOUCH_PAD1_R {
        TOUCH_PAD1_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Sets the touch GPIO 2 to hold."]
    #[inline(always)]
    pub fn touch_pad2(&self) -> TOUCH_PAD2_R {
        TOUCH_PAD2_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Sets the touch GPIO 3 to hold."]
    #[inline(always)]
    pub fn touch_pad3(&self) -> TOUCH_PAD3_R {
        TOUCH_PAD3_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Sets the touch GPIO 4 to hold."]
    #[inline(always)]
    pub fn touch_pad4(&self) -> TOUCH_PAD4_R {
        TOUCH_PAD4_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Sets the touch GPIO 5 to hold."]
    #[inline(always)]
    pub fn touch_pad5(&self) -> TOUCH_PAD5_R {
        TOUCH_PAD5_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Sets the touch GPIO 6 to hold."]
    #[inline(always)]
    pub fn touch_pad6(&self) -> TOUCH_PAD6_R {
        TOUCH_PAD6_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Sets the touch GPIO 7 to hold."]
    #[inline(always)]
    pub fn touch_pad7(&self) -> TOUCH_PAD7_R {
        TOUCH_PAD7_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Sets the touch GPIO 8 to hold."]
    #[inline(always)]
    pub fn touch_pad8(&self) -> TOUCH_PAD8_R {
        TOUCH_PAD8_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - Sets the touch GPIO 9 to hold."]
    #[inline(always)]
    pub fn touch_pad9(&self) -> TOUCH_PAD9_R {
        TOUCH_PAD9_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Sets the touch GPIO 10 to hold."]
    #[inline(always)]
    pub fn touch_pad10(&self) -> TOUCH_PAD10_R {
        TOUCH_PAD10_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Sets the touch GPIO 11 to hold."]
    #[inline(always)]
    pub fn touch_pad11(&self) -> TOUCH_PAD11_R {
        TOUCH_PAD11_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12 - Sets the touch GPIO 12 to hold."]
    #[inline(always)]
    pub fn touch_pad12(&self) -> TOUCH_PAD12_R {
        TOUCH_PAD12_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - Sets the touch GPIO 13 to hold."]
    #[inline(always)]
    pub fn touch_pad13(&self) -> TOUCH_PAD13_R {
        TOUCH_PAD13_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 14 - Sets the touch GPIO 14 to hold."]
    #[inline(always)]
    pub fn touch_pad14(&self) -> TOUCH_PAD14_R {
        TOUCH_PAD14_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - Sets the x32p to hold."]
    #[inline(always)]
    pub fn x32p(&self) -> X32P_R {
        X32P_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 16 - Sets the x32n to hold."]
    #[inline(always)]
    pub fn x32n(&self) -> X32N_R {
        X32N_R::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - Sets the pdac1 to hold."]
    #[inline(always)]
    pub fn pdac1(&self) -> PDAC1_R {
        PDAC1_R::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "Bit 18 - Sets the pdac2 to hold."]
    #[inline(always)]
    pub fn pdac2(&self) -> PDAC2_R {
        PDAC2_R::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bit 19 - Sets the RTG GPIO 19 to hold."]
    #[inline(always)]
    pub fn pad19(&self) -> PAD19_R {
        PAD19_R::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bit 20 - Sets the RTG GPIO 20 to hold."]
    #[inline(always)]
    pub fn pad20(&self) -> PAD20_R {
        PAD20_R::new(((self.bits >> 20) & 1) != 0)
    }
    #[doc = "Bit 21 - Sets the RTG GPIO 21 to hold."]
    #[inline(always)]
    pub fn pad21(&self) -> PAD21_R {
        PAD21_R::new(((self.bits >> 21) & 1) != 0)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("PAD_HOLD")
            .field("touch_pad0", &self.touch_pad0())
            .field("touch_pad1", &self.touch_pad1())
            .field("touch_pad2", &self.touch_pad2())
            .field("touch_pad3", &self.touch_pad3())
            .field("touch_pad4", &self.touch_pad4())
            .field("touch_pad5", &self.touch_pad5())
            .field("touch_pad6", &self.touch_pad6())
            .field("touch_pad7", &self.touch_pad7())
            .field("touch_pad8", &self.touch_pad8())
            .field("touch_pad9", &self.touch_pad9())
            .field("touch_pad10", &self.touch_pad10())
            .field("touch_pad11", &self.touch_pad11())
            .field("touch_pad12", &self.touch_pad12())
            .field("touch_pad13", &self.touch_pad13())
            .field("touch_pad14", &self.touch_pad14())
            .field("x32p", &self.x32p())
            .field("x32n", &self.x32n())
            .field("pdac1", &self.pdac1())
            .field("pdac2", &self.pdac2())
            .field("pad19", &self.pad19())
            .field("pad20", &self.pad20())
            .field("pad21", &self.pad21())
            .finish()
    }
}
impl W {
    #[doc = "Bit 0 - Sets the touch GPIO 0 to hold."]
    #[inline(always)]
    pub fn touch_pad0(&mut self) -> TOUCH_PAD0_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD0_W::new(self, 0)
    }
    #[doc = "Bit 1 - Sets the touch GPIO 1 to hold."]
    #[inline(always)]
    pub fn touch_pad1(&mut self) -> TOUCH_PAD1_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD1_W::new(self, 1)
    }
    #[doc = "Bit 2 - Sets the touch GPIO 2 to hold."]
    #[inline(always)]
    pub fn touch_pad2(&mut self) -> TOUCH_PAD2_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD2_W::new(self, 2)
    }
    #[doc = "Bit 3 - Sets the touch GPIO 3 to hold."]
    #[inline(always)]
    pub fn touch_pad3(&mut self) -> TOUCH_PAD3_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD3_W::new(self, 3)
    }
    #[doc = "Bit 4 - Sets the touch GPIO 4 to hold."]
    #[inline(always)]
    pub fn touch_pad4(&mut self) -> TOUCH_PAD4_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD4_W::new(self, 4)
    }
    #[doc = "Bit 5 - Sets the touch GPIO 5 to hold."]
    #[inline(always)]
    pub fn touch_pad5(&mut self) -> TOUCH_PAD5_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD5_W::new(self, 5)
    }
    #[doc = "Bit 6 - Sets the touch GPIO 6 to hold."]
    #[inline(always)]
    pub fn touch_pad6(&mut self) -> TOUCH_PAD6_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD6_W::new(self, 6)
    }
    #[doc = "Bit 7 - Sets the touch GPIO 7 to hold."]
    #[inline(always)]
    pub fn touch_pad7(&mut self) -> TOUCH_PAD7_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD7_W::new(self, 7)
    }
    #[doc = "Bit 8 - Sets the touch GPIO 8 to hold."]
    #[inline(always)]
    pub fn touch_pad8(&mut self) -> TOUCH_PAD8_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD8_W::new(self, 8)
    }
    #[doc = "Bit 9 - Sets the touch GPIO 9 to hold."]
    #[inline(always)]
    pub fn touch_pad9(&mut self) -> TOUCH_PAD9_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD9_W::new(self, 9)
    }
    #[doc = "Bit 10 - Sets the touch GPIO 10 to hold."]
    #[inline(always)]
    pub fn touch_pad10(&mut self) -> TOUCH_PAD10_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD10_W::new(self, 10)
    }
    #[doc = "Bit 11 - Sets the touch GPIO 11 to hold."]
    #[inline(always)]
    pub fn touch_pad11(&mut self) -> TOUCH_PAD11_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD11_W::new(self, 11)
    }
    #[doc = "Bit 12 - Sets the touch GPIO 12 to hold."]
    #[inline(always)]
    pub fn touch_pad12(&mut self) -> TOUCH_PAD12_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD12_W::new(self, 12)
    }
    #[doc = "Bit 13 - Sets the touch GPIO 13 to hold."]
    #[inline(always)]
    pub fn touch_pad13(&mut self) -> TOUCH_PAD13_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD13_W::new(self, 13)
    }
    #[doc = "Bit 14 - Sets the touch GPIO 14 to hold."]
    #[inline(always)]
    pub fn touch_pad14(&mut self) -> TOUCH_PAD14_W<'_, PAD_HOLD_SPEC> {
        TOUCH_PAD14_W::new(self, 14)
    }
    #[doc = "Bit 15 - Sets the x32p to hold."]
    #[inline(always)]
    pub fn x32p(&mut self) -> X32P_W<'_, PAD_HOLD_SPEC> {
        X32P_W::new(self, 15)
    }
    #[doc = "Bit 16 - Sets the x32n to hold."]
    #[inline(always)]
    pub fn x32n(&mut self) -> X32N_W<'_, PAD_HOLD_SPEC> {
        X32N_W::new(self, 16)
    }
    #[doc = "Bit 17 - Sets the pdac1 to hold."]
    #[inline(always)]
    pub fn pdac1(&mut self) -> PDAC1_W<'_, PAD_HOLD_SPEC> {
        PDAC1_W::new(self, 17)
    }
    #[doc = "Bit 18 - Sets the pdac2 to hold."]
    #[inline(always)]
    pub fn pdac2(&mut self) -> PDAC2_W<'_, PAD_HOLD_SPEC> {
        PDAC2_W::new(self, 18)
    }
    #[doc = "Bit 19 - Sets the RTG GPIO 19 to hold."]
    #[inline(always)]
    pub fn pad19(&mut self) -> PAD19_W<'_, PAD_HOLD_SPEC> {
        PAD19_W::new(self, 19)
    }
    #[doc = "Bit 20 - Sets the RTG GPIO 20 to hold."]
    #[inline(always)]
    pub fn pad20(&mut self) -> PAD20_W<'_, PAD_HOLD_SPEC> {
        PAD20_W::new(self, 20)
    }
    #[doc = "Bit 21 - Sets the RTG GPIO 21 to hold."]
    #[inline(always)]
    pub fn pad21(&mut self) -> PAD21_W<'_, PAD_HOLD_SPEC> {
        PAD21_W::new(self, 21)
    }
}
#[doc = "Configures the hold options for RTC GPIOs\n\nYou can [`read`](crate::Reg::read) this register and get [`pad_hold::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pad_hold::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PAD_HOLD_SPEC;
impl crate::RegisterSpec for PAD_HOLD_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`pad_hold::R`](R) reader structure"]
impl crate::Readable for PAD_HOLD_SPEC {}
#[doc = "`write(|w| ..)` method takes [`pad_hold::W`](W) writer structure"]
impl crate::Writable for PAD_HOLD_SPEC {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PAD_HOLD to value 0"]
impl crate::Resettable for PAD_HOLD_SPEC {}
