#[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_HOLD` reader - Sets the touch GPIO 0 to hold."]
pub type TOUCH_PAD0_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD0_HOLD` writer - Sets the touch GPIO 0 to hold."]
pub type TOUCH_PAD0_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD1_HOLD` reader - Sets the touch GPIO 1 to hold."]
pub type TOUCH_PAD1_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD1_HOLD` writer - Sets the touch GPIO 1 to hold."]
pub type TOUCH_PAD1_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD2_HOLD` reader - Sets the touch GPIO 2 to hold."]
pub type TOUCH_PAD2_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD2_HOLD` writer - Sets the touch GPIO 2 to hold."]
pub type TOUCH_PAD2_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD3_HOLD` reader - Sets the touch GPIO 3 to hold."]
pub type TOUCH_PAD3_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD3_HOLD` writer - Sets the touch GPIO 3 to hold."]
pub type TOUCH_PAD3_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD4_HOLD` reader - Sets the touch GPIO 4 to hold."]
pub type TOUCH_PAD4_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD4_HOLD` writer - Sets the touch GPIO 4 to hold."]
pub type TOUCH_PAD4_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD5_HOLD` reader - Sets the touch GPIO 5 to hold."]
pub type TOUCH_PAD5_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD5_HOLD` writer - Sets the touch GPIO 5 to hold."]
pub type TOUCH_PAD5_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD6_HOLD` reader - Sets the touch GPIO 6 to hold."]
pub type TOUCH_PAD6_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD6_HOLD` writer - Sets the touch GPIO 6 to hold."]
pub type TOUCH_PAD6_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD7_HOLD` reader - Sets the touch GPIO 7 to hold."]
pub type TOUCH_PAD7_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD7_HOLD` writer - Sets the touch GPIO 7 to hold."]
pub type TOUCH_PAD7_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD8_HOLD` reader - Sets the touch GPIO 8 to hold."]
pub type TOUCH_PAD8_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD8_HOLD` writer - Sets the touch GPIO 8 to hold."]
pub type TOUCH_PAD8_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD9_HOLD` reader - Sets the touch GPIO 9 to hold."]
pub type TOUCH_PAD9_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD9_HOLD` writer - Sets the touch GPIO 9 to hold."]
pub type TOUCH_PAD9_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD10_HOLD` reader - Sets the touch GPIO 10 to hold."]
pub type TOUCH_PAD10_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD10_HOLD` writer - Sets the touch GPIO 10 to hold."]
pub type TOUCH_PAD10_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD11_HOLD` reader - Sets the touch GPIO 11 to hold."]
pub type TOUCH_PAD11_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD11_HOLD` writer - Sets the touch GPIO 11 to hold."]
pub type TOUCH_PAD11_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD12_HOLD` reader - Sets the touch GPIO 12 to hold."]
pub type TOUCH_PAD12_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD12_HOLD` writer - Sets the touch GPIO 12 to hold."]
pub type TOUCH_PAD12_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD13_HOLD` reader - Sets the touch GPIO 13 to hold."]
pub type TOUCH_PAD13_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD13_HOLD` writer - Sets the touch GPIO 13 to hold."]
pub type TOUCH_PAD13_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `TOUCH_PAD14_HOLD` reader - Sets the touch GPIO 14 to hold."]
pub type TOUCH_PAD14_HOLD_R = crate::BitReader;
#[doc = "Field `TOUCH_PAD14_HOLD` writer - Sets the touch GPIO 14 to hold."]
pub type TOUCH_PAD14_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `X32P_HOLD` reader - Sets the x32p to hold."]
pub type X32P_HOLD_R = crate::BitReader;
#[doc = "Field `X32P_HOLD` writer - Sets the x32p to hold."]
pub type X32P_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `X32N_HOLD` reader - Sets the x32n to hold."]
pub type X32N_HOLD_R = crate::BitReader;
#[doc = "Field `X32N_HOLD` writer - Sets the x32n to hold."]
pub type X32N_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PDAC1_HOLD` reader - Sets the pdac1 to hold."]
pub type PDAC1_HOLD_R = crate::BitReader;
#[doc = "Field `PDAC1_HOLD` writer - Sets the pdac1 to hold."]
pub type PDAC1_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PDAC2_HOLD` reader - Sets the pdac2 to hold."]
pub type PDAC2_HOLD_R = crate::BitReader;
#[doc = "Field `PDAC2_HOLD` writer - Sets the pdac2 to hold."]
pub type PDAC2_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD19_HOLD` reader - Sets the RTG GPIO 19 to hold."]
pub type PAD19_HOLD_R = crate::BitReader;
#[doc = "Field `PAD19_HOLD` writer - Sets the RTG GPIO 19 to hold."]
pub type PAD19_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD20_HOLD` reader - Sets the RTG GPIO 20 to hold."]
pub type PAD20_HOLD_R = crate::BitReader;
#[doc = "Field `PAD20_HOLD` writer - Sets the RTG GPIO 20 to hold."]
pub type PAD20_HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PAD21_HOLD` reader - Sets the RTG GPIO 21 to hold."]
pub type PAD21_HOLD_R = crate::BitReader;
#[doc = "Field `PAD21_HOLD` writer - Sets the RTG GPIO 21 to hold."]
pub type PAD21_HOLD_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_hold(&self) -> TOUCH_PAD0_HOLD_R {
TOUCH_PAD0_HOLD_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Sets the touch GPIO 1 to hold."]
#[inline(always)]
pub fn touch_pad1_hold(&self) -> TOUCH_PAD1_HOLD_R {
TOUCH_PAD1_HOLD_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Sets the touch GPIO 2 to hold."]
#[inline(always)]
pub fn touch_pad2_hold(&self) -> TOUCH_PAD2_HOLD_R {
TOUCH_PAD2_HOLD_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Sets the touch GPIO 3 to hold."]
#[inline(always)]
pub fn touch_pad3_hold(&self) -> TOUCH_PAD3_HOLD_R {
TOUCH_PAD3_HOLD_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Sets the touch GPIO 4 to hold."]
#[inline(always)]
pub fn touch_pad4_hold(&self) -> TOUCH_PAD4_HOLD_R {
TOUCH_PAD4_HOLD_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Sets the touch GPIO 5 to hold."]
#[inline(always)]
pub fn touch_pad5_hold(&self) -> TOUCH_PAD5_HOLD_R {
TOUCH_PAD5_HOLD_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Sets the touch GPIO 6 to hold."]
#[inline(always)]
pub fn touch_pad6_hold(&self) -> TOUCH_PAD6_HOLD_R {
TOUCH_PAD6_HOLD_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Sets the touch GPIO 7 to hold."]
#[inline(always)]
pub fn touch_pad7_hold(&self) -> TOUCH_PAD7_HOLD_R {
TOUCH_PAD7_HOLD_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - Sets the touch GPIO 8 to hold."]
#[inline(always)]
pub fn touch_pad8_hold(&self) -> TOUCH_PAD8_HOLD_R {
TOUCH_PAD8_HOLD_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Sets the touch GPIO 9 to hold."]
#[inline(always)]
pub fn touch_pad9_hold(&self) -> TOUCH_PAD9_HOLD_R {
TOUCH_PAD9_HOLD_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 10 - Sets the touch GPIO 10 to hold."]
#[inline(always)]
pub fn touch_pad10_hold(&self) -> TOUCH_PAD10_HOLD_R {
TOUCH_PAD10_HOLD_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - Sets the touch GPIO 11 to hold."]
#[inline(always)]
pub fn touch_pad11_hold(&self) -> TOUCH_PAD11_HOLD_R {
TOUCH_PAD11_HOLD_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - Sets the touch GPIO 12 to hold."]
#[inline(always)]
pub fn touch_pad12_hold(&self) -> TOUCH_PAD12_HOLD_R {
TOUCH_PAD12_HOLD_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - Sets the touch GPIO 13 to hold."]
#[inline(always)]
pub fn touch_pad13_hold(&self) -> TOUCH_PAD13_HOLD_R {
TOUCH_PAD13_HOLD_R::new(((self.bits >> 13) & 1) != 0)
}
#[doc = "Bit 14 - Sets the touch GPIO 14 to hold."]
#[inline(always)]
pub fn touch_pad14_hold(&self) -> TOUCH_PAD14_HOLD_R {
TOUCH_PAD14_HOLD_R::new(((self.bits >> 14) & 1) != 0)
}
#[doc = "Bit 15 - Sets the x32p to hold."]
#[inline(always)]
pub fn x32p_hold(&self) -> X32P_HOLD_R {
X32P_HOLD_R::new(((self.bits >> 15) & 1) != 0)
}
#[doc = "Bit 16 - Sets the x32n to hold."]
#[inline(always)]
pub fn x32n_hold(&self) -> X32N_HOLD_R {
X32N_HOLD_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 17 - Sets the pdac1 to hold."]
#[inline(always)]
pub fn pdac1_hold(&self) -> PDAC1_HOLD_R {
PDAC1_HOLD_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 18 - Sets the pdac2 to hold."]
#[inline(always)]
pub fn pdac2_hold(&self) -> PDAC2_HOLD_R {
PDAC2_HOLD_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bit 19 - Sets the RTG GPIO 19 to hold."]
#[inline(always)]
pub fn pad19_hold(&self) -> PAD19_HOLD_R {
PAD19_HOLD_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Sets the RTG GPIO 20 to hold."]
#[inline(always)]
pub fn pad20_hold(&self) -> PAD20_HOLD_R {
PAD20_HOLD_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 21 - Sets the RTG GPIO 21 to hold."]
#[inline(always)]
pub fn pad21_hold(&self) -> PAD21_HOLD_R {
PAD21_HOLD_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_hold", &self.touch_pad0_hold())
.field("touch_pad1_hold", &self.touch_pad1_hold())
.field("touch_pad2_hold", &self.touch_pad2_hold())
.field("touch_pad3_hold", &self.touch_pad3_hold())
.field("touch_pad4_hold", &self.touch_pad4_hold())
.field("touch_pad5_hold", &self.touch_pad5_hold())
.field("touch_pad6_hold", &self.touch_pad6_hold())
.field("touch_pad7_hold", &self.touch_pad7_hold())
.field("touch_pad8_hold", &self.touch_pad8_hold())
.field("touch_pad9_hold", &self.touch_pad9_hold())
.field("touch_pad10_hold", &self.touch_pad10_hold())
.field("touch_pad11_hold", &self.touch_pad11_hold())
.field("touch_pad12_hold", &self.touch_pad12_hold())
.field("touch_pad13_hold", &self.touch_pad13_hold())
.field("touch_pad14_hold", &self.touch_pad14_hold())
.field("x32p_hold", &self.x32p_hold())
.field("x32n_hold", &self.x32n_hold())
.field("pdac1_hold", &self.pdac1_hold())
.field("pdac2_hold", &self.pdac2_hold())
.field("pad19_hold", &self.pad19_hold())
.field("pad20_hold", &self.pad20_hold())
.field("pad21_hold", &self.pad21_hold())
.finish()
}
}
impl W {
#[doc = "Bit 0 - Sets the touch GPIO 0 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad0_hold(&mut self) -> TOUCH_PAD0_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD0_HOLD_W::new(self, 0)
}
#[doc = "Bit 1 - Sets the touch GPIO 1 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad1_hold(&mut self) -> TOUCH_PAD1_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD1_HOLD_W::new(self, 1)
}
#[doc = "Bit 2 - Sets the touch GPIO 2 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad2_hold(&mut self) -> TOUCH_PAD2_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD2_HOLD_W::new(self, 2)
}
#[doc = "Bit 3 - Sets the touch GPIO 3 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad3_hold(&mut self) -> TOUCH_PAD3_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD3_HOLD_W::new(self, 3)
}
#[doc = "Bit 4 - Sets the touch GPIO 4 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad4_hold(&mut self) -> TOUCH_PAD4_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD4_HOLD_W::new(self, 4)
}
#[doc = "Bit 5 - Sets the touch GPIO 5 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad5_hold(&mut self) -> TOUCH_PAD5_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD5_HOLD_W::new(self, 5)
}
#[doc = "Bit 6 - Sets the touch GPIO 6 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad6_hold(&mut self) -> TOUCH_PAD6_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD6_HOLD_W::new(self, 6)
}
#[doc = "Bit 7 - Sets the touch GPIO 7 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad7_hold(&mut self) -> TOUCH_PAD7_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD7_HOLD_W::new(self, 7)
}
#[doc = "Bit 8 - Sets the touch GPIO 8 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad8_hold(&mut self) -> TOUCH_PAD8_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD8_HOLD_W::new(self, 8)
}
#[doc = "Bit 9 - Sets the touch GPIO 9 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad9_hold(&mut self) -> TOUCH_PAD9_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD9_HOLD_W::new(self, 9)
}
#[doc = "Bit 10 - Sets the touch GPIO 10 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad10_hold(&mut self) -> TOUCH_PAD10_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD10_HOLD_W::new(self, 10)
}
#[doc = "Bit 11 - Sets the touch GPIO 11 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad11_hold(&mut self) -> TOUCH_PAD11_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD11_HOLD_W::new(self, 11)
}
#[doc = "Bit 12 - Sets the touch GPIO 12 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad12_hold(&mut self) -> TOUCH_PAD12_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD12_HOLD_W::new(self, 12)
}
#[doc = "Bit 13 - Sets the touch GPIO 13 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad13_hold(&mut self) -> TOUCH_PAD13_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD13_HOLD_W::new(self, 13)
}
#[doc = "Bit 14 - Sets the touch GPIO 14 to hold."]
#[inline(always)]
#[must_use]
pub fn touch_pad14_hold(&mut self) -> TOUCH_PAD14_HOLD_W<PAD_HOLD_SPEC> {
TOUCH_PAD14_HOLD_W::new(self, 14)
}
#[doc = "Bit 15 - Sets the x32p to hold."]
#[inline(always)]
#[must_use]
pub fn x32p_hold(&mut self) -> X32P_HOLD_W<PAD_HOLD_SPEC> {
X32P_HOLD_W::new(self, 15)
}
#[doc = "Bit 16 - Sets the x32n to hold."]
#[inline(always)]
#[must_use]
pub fn x32n_hold(&mut self) -> X32N_HOLD_W<PAD_HOLD_SPEC> {
X32N_HOLD_W::new(self, 16)
}
#[doc = "Bit 17 - Sets the pdac1 to hold."]
#[inline(always)]
#[must_use]
pub fn pdac1_hold(&mut self) -> PDAC1_HOLD_W<PAD_HOLD_SPEC> {
PDAC1_HOLD_W::new(self, 17)
}
#[doc = "Bit 18 - Sets the pdac2 to hold."]
#[inline(always)]
#[must_use]
pub fn pdac2_hold(&mut self) -> PDAC2_HOLD_W<PAD_HOLD_SPEC> {
PDAC2_HOLD_W::new(self, 18)
}
#[doc = "Bit 19 - Sets the RTG GPIO 19 to hold."]
#[inline(always)]
#[must_use]
pub fn pad19_hold(&mut self) -> PAD19_HOLD_W<PAD_HOLD_SPEC> {
PAD19_HOLD_W::new(self, 19)
}
#[doc = "Bit 20 - Sets the RTG GPIO 20 to hold."]
#[inline(always)]
#[must_use]
pub fn pad20_hold(&mut self) -> PAD20_HOLD_W<PAD_HOLD_SPEC> {
PAD20_HOLD_W::new(self, 20)
}
#[doc = "Bit 21 - Sets the RTG GPIO 21 to hold."]
#[inline(always)]
#[must_use]
pub fn pad21_hold(&mut self) -> PAD21_HOLD_W<PAD_HOLD_SPEC> {
PAD21_HOLD_W::new(self, 21)
}
}
#[doc = "Configures the hold options for RTC GPIOs\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pad_hold::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`pad_hold::W`](W). You can also [`modify`](crate::generic::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;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
}
#[doc = "`reset()` method sets PAD_HOLD to value 0"]
impl crate::Resettable for PAD_HOLD_SPEC {
const RESET_VALUE: u32 = 0;
}