diff --git a/esp32/src/rtc_io.rs b/esp32/src/rtc_io.rs index 60c1666e5..737610b65 100644 --- a/esp32/src/rtc_io.rs +++ b/esp32/src/rtc_io.rs @@ -21,7 +21,16 @@ pub struct RegisterBlock { pad_dac: [PAD_DAC; 2], xtal_32k_pad: XTAL_32K_PAD, touch_cfg: TOUCH_CFG, - touch_pad: [TOUCH_PAD; 10], + touch_pad0: TOUCH_PAD0, + touch_pad1: TOUCH_PAD1, + touch_pad2: TOUCH_PAD2, + touch_pad3: TOUCH_PAD3, + touch_pad4: TOUCH_PAD4, + touch_pad5: TOUCH_PAD5, + touch_pad6: TOUCH_PAD6, + touch_pad7: TOUCH_PAD7, + touch_pad8: TOUCH_PAD8, + touch_pad9: TOUCH_PAD9, ext_wakeup0: EXT_WAKEUP0, xtl_ext_ctr: XTL_EXT_CTR, sar_i2c_io: SAR_I2C_IO, @@ -145,16 +154,55 @@ impl RegisterBlock { pub const fn touch_cfg(&self) -> &TOUCH_CFG { &self.touch_cfg } - #[doc = "0x94..0xbc - Touch pad %s configuration register"] + #[doc = "0x94 - "] #[inline(always)] - pub const fn touch_pad(&self, n: usize) -> &TOUCH_PAD { - &self.touch_pad[n] + pub const fn touch_pad0(&self) -> &TOUCH_PAD0 { + &self.touch_pad0 } - #[doc = "Iterator for array of:"] - #[doc = "0x94..0xbc - Touch pad %s configuration register"] + #[doc = "0x98 - "] + #[inline(always)] + pub const fn touch_pad1(&self) -> &TOUCH_PAD1 { + &self.touch_pad1 + } + #[doc = "0x9c - "] + #[inline(always)] + pub const fn touch_pad2(&self) -> &TOUCH_PAD2 { + &self.touch_pad2 + } + #[doc = "0xa0 - "] + #[inline(always)] + pub const fn touch_pad3(&self) -> &TOUCH_PAD3 { + &self.touch_pad3 + } + #[doc = "0xa4 - "] #[inline(always)] - pub fn touch_pad_iter(&self) -> impl Iterator { - self.touch_pad.iter() + pub const fn touch_pad4(&self) -> &TOUCH_PAD4 { + &self.touch_pad4 + } + #[doc = "0xa8 - "] + #[inline(always)] + pub const fn touch_pad5(&self) -> &TOUCH_PAD5 { + &self.touch_pad5 + } + #[doc = "0xac - "] + #[inline(always)] + pub const fn touch_pad6(&self) -> &TOUCH_PAD6 { + &self.touch_pad6 + } + #[doc = "0xb0 - "] + #[inline(always)] + pub const fn touch_pad7(&self) -> &TOUCH_PAD7 { + &self.touch_pad7 + } + #[doc = "0xb4 - "] + #[inline(always)] + pub const fn touch_pad8(&self) -> &TOUCH_PAD8 { + &self.touch_pad8 + } + #[doc = "0xb8 - "] + #[inline(always)] + pub const fn touch_pad9(&self) -> &TOUCH_PAD9 { + &self.touch_pad9 } #[doc = "0xbc - "] #[inline(always)] @@ -253,6 +301,46 @@ pub mod xtal_32k_pad; pub type TOUCH_CFG = crate::Reg; #[doc = ""] pub mod touch_cfg; +#[doc = "TOUCH_PAD0 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad0`] module"] +pub type TOUCH_PAD0 = crate::Reg; +#[doc = ""] +pub mod touch_pad0; +#[doc = "TOUCH_PAD1 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad1`] module"] +pub type TOUCH_PAD1 = crate::Reg; +#[doc = ""] +pub mod touch_pad1; +#[doc = "TOUCH_PAD2 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad2::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad2`] module"] +pub type TOUCH_PAD2 = crate::Reg; +#[doc = ""] +pub mod touch_pad2; +#[doc = "TOUCH_PAD3 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad3::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad3`] module"] +pub type TOUCH_PAD3 = crate::Reg; +#[doc = ""] +pub mod touch_pad3; +#[doc = "TOUCH_PAD4 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad4::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad4::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad4`] module"] +pub type TOUCH_PAD4 = crate::Reg; +#[doc = ""] +pub mod touch_pad4; +#[doc = "TOUCH_PAD5 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad5::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad5::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad5`] module"] +pub type TOUCH_PAD5 = crate::Reg; +#[doc = ""] +pub mod touch_pad5; +#[doc = "TOUCH_PAD6 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad6::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad6::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad6`] module"] +pub type TOUCH_PAD6 = crate::Reg; +#[doc = ""] +pub mod touch_pad6; +#[doc = "TOUCH_PAD7 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad7::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad7::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad7`] module"] +pub type TOUCH_PAD7 = crate::Reg; +#[doc = ""] +pub mod touch_pad7; +#[doc = "TOUCH_PAD8 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad8::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad8::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad8`] module"] +pub type TOUCH_PAD8 = crate::Reg; +#[doc = ""] +pub mod touch_pad8; +#[doc = "TOUCH_PAD9 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad9::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad9::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad9`] module"] +pub type TOUCH_PAD9 = crate::Reg; +#[doc = ""] +pub mod touch_pad9; #[doc = "EXT_WAKEUP0 (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`ext_wakeup0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ext_wakeup0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ext_wakeup0`] module"] pub type EXT_WAKEUP0 = crate::Reg; #[doc = ""] @@ -269,7 +357,3 @@ pub mod sar_i2c_io; pub type DATE = crate::Reg; #[doc = ""] pub mod date; -#[doc = "TOUCH_PAD (rw) register accessor: Touch pad %s configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad`] module"] -pub type TOUCH_PAD = crate::Reg; -#[doc = "Touch pad %s configuration register"] -pub mod touch_pad; diff --git a/esp32/src/rtc_io/touch_pad0.rs b/esp32/src/rtc_io/touch_pad0.rs new file mode 100644 index 000000000..3e174b106 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad0.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD0` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD0` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale GPIO4"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale GPIO4"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale GPIO4"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD0") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale GPIO4"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD0_SPEC; +impl crate::RegisterSpec for TOUCH_PAD0_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad0::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD0_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad0::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD0_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 TOUCH_PAD0 to value 0x5200_0000"] +impl crate::Resettable for TOUCH_PAD0_SPEC { + const RESET_VALUE: u32 = 0x5200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad1.rs b/esp32/src/rtc_io/touch_pad1.rs new file mode 100644 index 000000000..956972e64 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad1.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD1` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD1` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO0"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO0"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - "] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - "] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO0"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD1") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO0"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD1_SPEC; +impl crate::RegisterSpec for TOUCH_PAD1_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad1::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD1_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad1::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD1_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 TOUCH_PAD1 to value 0x4a00_0000"] +impl crate::Resettable for TOUCH_PAD1_SPEC { + const RESET_VALUE: u32 = 0x4a00_0000; +} diff --git a/esp32/src/rtc_io/touch_pad2.rs b/esp32/src/rtc_io/touch_pad2.rs new file mode 100644 index 000000000..8a0cb10bd --- /dev/null +++ b/esp32/src/rtc_io/touch_pad2.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD2` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD2` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO2"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO2"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO2"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD2") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO2"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD2_SPEC; +impl crate::RegisterSpec for TOUCH_PAD2_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad2::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD2_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad2::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD2_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 TOUCH_PAD2 to value 0x5200_0000"] +impl crate::Resettable for TOUCH_PAD2_SPEC { + const RESET_VALUE: u32 = 0x5200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad.rs b/esp32/src/rtc_io/touch_pad3.rs similarity index 72% rename from esp32/src/rtc_io/touch_pad.rs rename to esp32/src/rtc_io/touch_pad3.rs index 252cebe52..4a1ab3517 100644 --- a/esp32/src/rtc_io/touch_pad.rs +++ b/esp32/src/rtc_io/touch_pad3.rs @@ -1,10 +1,10 @@ -#[doc = "Register `TOUCH_PAD%s` reader"] -pub type R = crate::R; -#[doc = "Register `TOUCH_PAD%s` writer"] -pub type W = crate::W; -#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input"] +#[doc = "Register `TOUCH_PAD3` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD3` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDO"] pub type TO_GPIO_R = crate::BitReader; -#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input"] +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDO"] pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; #[doc = "Field `FUN_IE` reader - the input enable of the pad"] pub type FUN_IE_R = crate::BitReader; @@ -26,25 +26,25 @@ pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; pub type FUN_SEL_R = crate::FieldReader; #[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; -#[doc = "Field `MUX_SEL` reader - 1 select the digital function, 0 selects the rtc function"] +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] pub type MUX_SEL_R = crate::BitReader; -#[doc = "Field `MUX_SEL` writer - 1 select the digital function, 0 selects the rtc function"] +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `XPD` reader - touch sensor power on"] +#[doc = "Field `XPD` reader - touch sensor power on."] pub type XPD_R = crate::BitReader; -#[doc = "Field `XPD` writer - touch sensor power on"] +#[doc = "Field `XPD` writer - touch sensor power on."] pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low, 1: tie high"] +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] pub type TIE_OPT_R = crate::BitReader; -#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low, 1: tie high"] +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `START` reader - start touch sensor"] +#[doc = "Field `START` reader - start touch sensor."] pub type START_R = crate::BitReader; -#[doc = "Field `START` writer - start touch sensor"] +#[doc = "Field `START` writer - start touch sensor."] pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel, default 100"] +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] pub type DAC_R = crate::FieldReader; -#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel, default 100"] +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; #[doc = "Field `RUE` reader - the pull up enable of the pad"] pub type RUE_R = crate::BitReader; @@ -58,12 +58,12 @@ pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; pub type DRV_R = crate::FieldReader; #[doc = "Field `DRV` writer - the driver strength of the pad"] pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; -#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to 1"] +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] pub type HOLD_R = crate::BitReader; -#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to 1"] +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; impl R { - #[doc = "Bit 12 - connect the rtc pad input to digital pad input"] + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDO"] #[inline(always)] pub fn to_gpio(&self) -> TO_GPIO_R { TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) @@ -93,27 +93,27 @@ impl R { pub fn fun_sel(&self) -> FUN_SEL_R { FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) } - #[doc = "Bit 19 - 1 select the digital function, 0 selects the rtc function"] + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] #[inline(always)] pub fn mux_sel(&self) -> MUX_SEL_R { MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 20 - touch sensor power on"] + #[doc = "Bit 20 - touch sensor power on."] #[inline(always)] pub fn xpd(&self) -> XPD_R { XPD_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 21 - default touch sensor tie option. 0: tie low, 1: tie high"] + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] #[inline(always)] pub fn tie_opt(&self) -> TIE_OPT_R { TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 22 - start touch sensor"] + #[doc = "Bit 22 - start touch sensor."] #[inline(always)] pub fn start(&self) -> START_R { START_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel, default 100"] + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] #[inline(always)] pub fn dac(&self) -> DAC_R { DAC_R::new(((self.bits >> 23) & 7) as u8) @@ -133,7 +133,7 @@ impl R { pub fn drv(&self) -> DRV_R { DRV_R::new(((self.bits >> 29) & 3) as u8) } - #[doc = "Bit 31 - hold the current value of the output when setting the hold to 1"] + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] #[inline(always)] pub fn hold(&self) -> HOLD_R { HOLD_R::new(((self.bits >> 31) & 1) != 0) @@ -142,7 +142,7 @@ impl R { #[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("TOUCH_PAD") + f.debug_struct("TOUCH_PAD3") .field("to_gpio", &self.to_gpio()) .field("fun_ie", &self.fun_ie()) .field("slp_oe", &self.slp_oe()) @@ -162,111 +162,111 @@ impl core::fmt::Debug for R { } } impl W { - #[doc = "Bit 12 - connect the rtc pad input to digital pad input"] + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDO"] #[inline(always)] #[must_use] - pub fn to_gpio(&mut self) -> TO_GPIO_W { + pub fn to_gpio(&mut self) -> TO_GPIO_W { TO_GPIO_W::new(self, 12) } #[doc = "Bit 13 - the input enable of the pad"] #[inline(always)] #[must_use] - pub fn fun_ie(&mut self) -> FUN_IE_W { + pub fn fun_ie(&mut self) -> FUN_IE_W { FUN_IE_W::new(self, 13) } #[doc = "Bit 14 - the output enable of the pad in sleep status"] #[inline(always)] #[must_use] - pub fn slp_oe(&mut self) -> SLP_OE_W { + pub fn slp_oe(&mut self) -> SLP_OE_W { SLP_OE_W::new(self, 14) } #[doc = "Bit 15 - the input enable of the pad in sleep status"] #[inline(always)] #[must_use] - pub fn slp_ie(&mut self) -> SLP_IE_W { + pub fn slp_ie(&mut self) -> SLP_IE_W { SLP_IE_W::new(self, 15) } #[doc = "Bit 16 - the sleep status selection signal of the pad"] #[inline(always)] #[must_use] - pub fn slp_sel(&mut self) -> SLP_SEL_W { + pub fn slp_sel(&mut self) -> SLP_SEL_W { SLP_SEL_W::new(self, 16) } #[doc = "Bits 17:18 - the functional selection signal of the pad"] #[inline(always)] #[must_use] - pub fn fun_sel(&mut self) -> FUN_SEL_W { + pub fn fun_sel(&mut self) -> FUN_SEL_W { FUN_SEL_W::new(self, 17) } - #[doc = "Bit 19 - 1 select the digital function, 0 selects the rtc function"] + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] #[inline(always)] #[must_use] - pub fn mux_sel(&mut self) -> MUX_SEL_W { + pub fn mux_sel(&mut self) -> MUX_SEL_W { MUX_SEL_W::new(self, 19) } - #[doc = "Bit 20 - touch sensor power on"] + #[doc = "Bit 20 - touch sensor power on."] #[inline(always)] #[must_use] - pub fn xpd(&mut self) -> XPD_W { + pub fn xpd(&mut self) -> XPD_W { XPD_W::new(self, 20) } - #[doc = "Bit 21 - default touch sensor tie option. 0: tie low, 1: tie high"] + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] #[inline(always)] #[must_use] - pub fn tie_opt(&mut self) -> TIE_OPT_W { + pub fn tie_opt(&mut self) -> TIE_OPT_W { TIE_OPT_W::new(self, 21) } - #[doc = "Bit 22 - start touch sensor"] + #[doc = "Bit 22 - start touch sensor."] #[inline(always)] #[must_use] - pub fn start(&mut self) -> START_W { + pub fn start(&mut self) -> START_W { START_W::new(self, 22) } - #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel, default 100"] + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] #[inline(always)] #[must_use] - pub fn dac(&mut self) -> DAC_W { + pub fn dac(&mut self) -> DAC_W { DAC_W::new(self, 23) } #[doc = "Bit 27 - the pull up enable of the pad"] #[inline(always)] #[must_use] - pub fn rue(&mut self) -> RUE_W { + pub fn rue(&mut self) -> RUE_W { RUE_W::new(self, 27) } #[doc = "Bit 28 - the pull down enable of the pad"] #[inline(always)] #[must_use] - pub fn rde(&mut self) -> RDE_W { + pub fn rde(&mut self) -> RDE_W { RDE_W::new(self, 28) } #[doc = "Bits 29:30 - the driver strength of the pad"] #[inline(always)] #[must_use] - pub fn drv(&mut self) -> DRV_W { + pub fn drv(&mut self) -> DRV_W { DRV_W::new(self, 29) } - #[doc = "Bit 31 - hold the current value of the output when setting the hold to 1"] + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] #[inline(always)] #[must_use] - pub fn hold(&mut self) -> HOLD_W { + pub fn hold(&mut self) -> HOLD_W { HOLD_W::new(self, 31) } } -#[doc = "Touch pad %s configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] -pub struct TOUCH_PAD_SPEC; -impl crate::RegisterSpec for TOUCH_PAD_SPEC { +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad3::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad3::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD3_SPEC; +impl crate::RegisterSpec for TOUCH_PAD3_SPEC { type Ux = u32; } -#[doc = "`read()` method returns [`touch_pad::R`](R) reader structure"] -impl crate::Readable for TOUCH_PAD_SPEC {} -#[doc = "`write(|w| ..)` method takes [`touch_pad::W`](W) writer structure"] -impl crate::Writable for TOUCH_PAD_SPEC { +#[doc = "`read()` method returns [`touch_pad3::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD3_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad3::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD3_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 TOUCH_PAD%s to value 0"] -impl crate::Resettable for TOUCH_PAD_SPEC { - const RESET_VALUE: u32 = 0; +#[doc = "`reset()` method sets TOUCH_PAD3 to value 0x4a00_0000"] +impl crate::Resettable for TOUCH_PAD3_SPEC { + const RESET_VALUE: u32 = 0x4a00_0000; } diff --git a/esp32/src/rtc_io/touch_pad4.rs b/esp32/src/rtc_io/touch_pad4.rs new file mode 100644 index 000000000..d5d4edbed --- /dev/null +++ b/esp32/src/rtc_io/touch_pad4.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD4` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD4` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTCK"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTCK"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTCK"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD4") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTCK"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD4_SPEC; +impl crate::RegisterSpec for TOUCH_PAD4_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad4::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD4_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad4::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD4_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 TOUCH_PAD4 to value 0x5200_0000"] +impl crate::Resettable for TOUCH_PAD4_SPEC { + const RESET_VALUE: u32 = 0x5200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad5.rs b/esp32/src/rtc_io/touch_pad5.rs new file mode 100644 index 000000000..afeaf4828 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad5.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD5` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD5` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD5") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad5::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad5::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD5_SPEC; +impl crate::RegisterSpec for TOUCH_PAD5_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad5::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD5_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad5::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD5_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 TOUCH_PAD5 to value 0x5200_0000"] +impl crate::Resettable for TOUCH_PAD5_SPEC { + const RESET_VALUE: u32 = 0x5200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad6.rs b/esp32/src/rtc_io/touch_pad6.rs new file mode 100644 index 000000000..3697bd1da --- /dev/null +++ b/esp32/src/rtc_io/touch_pad6.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD6` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD6` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTMS"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTMS"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTMS"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD6") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTMS"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad6::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad6::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD6_SPEC; +impl crate::RegisterSpec for TOUCH_PAD6_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad6::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD6_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad6::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD6_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 TOUCH_PAD6 to value 0x4a00_0000"] +impl crate::Resettable for TOUCH_PAD6_SPEC { + const RESET_VALUE: u32 = 0x4a00_0000; +} diff --git a/esp32/src/rtc_io/touch_pad7.rs b/esp32/src/rtc_io/touch_pad7.rs new file mode 100644 index 000000000..9c1f7afd1 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad7.rs @@ -0,0 +1,272 @@ +#[doc = "Register `TOUCH_PAD7` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD7` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO27"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO27"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_IE` reader - the input enable of the pad"] +pub type FUN_IE_R = crate::BitReader; +#[doc = "Field `FUN_IE` writer - the input enable of the pad"] +pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"] +pub type SLP_OE_R = crate::BitReader; +#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"] +pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"] +pub type SLP_IE_R = crate::BitReader; +#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"] +pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"] +pub type SLP_SEL_R = crate::BitReader; +#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"] +pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"] +pub type FUN_SEL_R = crate::FieldReader; +#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"] +pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_R = crate::BitReader; +#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"] +pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +#[doc = "Field `RUE` reader - the pull up enable of the pad"] +pub type RUE_R = crate::BitReader; +#[doc = "Field `RUE` writer - the pull up enable of the pad"] +pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `RDE` reader - the pull down enable of the pad"] +pub type RDE_R = crate::BitReader; +#[doc = "Field `RDE` writer - the pull down enable of the pad"] +pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DRV` reader - the driver strength of the pad"] +pub type DRV_R = crate::FieldReader; +#[doc = "Field `DRV` writer - the driver strength of the pad"] +pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; +#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_R = crate::BitReader; +#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"] +pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>; +impl R { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO27"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 12) & 1) != 0) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + pub fn fun_ie(&self) -> FUN_IE_R { + FUN_IE_R::new(((self.bits >> 13) & 1) != 0) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_oe(&self) -> SLP_OE_R { + SLP_OE_R::new(((self.bits >> 14) & 1) != 0) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + pub fn slp_ie(&self) -> SLP_IE_R { + SLP_IE_R::new(((self.bits >> 15) & 1) != 0) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + pub fn slp_sel(&self) -> SLP_SEL_R { + SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + pub fn fun_sel(&self) -> FUN_SEL_R { + FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + pub fn mux_sel(&self) -> MUX_SEL_R { + MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + pub fn rue(&self) -> RUE_R { + RUE_R::new(((self.bits >> 27) & 1) != 0) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + pub fn rde(&self) -> RDE_R { + RDE_R::new(((self.bits >> 28) & 1) != 0) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + pub fn drv(&self) -> DRV_R { + DRV_R::new(((self.bits >> 29) & 3) as u8) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + pub fn hold(&self) -> HOLD_R { + HOLD_R::new(((self.bits >> 31) & 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("TOUCH_PAD7") + .field("to_gpio", &self.to_gpio()) + .field("fun_ie", &self.fun_ie()) + .field("slp_oe", &self.slp_oe()) + .field("slp_ie", &self.slp_ie()) + .field("slp_sel", &self.slp_sel()) + .field("fun_sel", &self.fun_sel()) + .field("mux_sel", &self.mux_sel()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .field("rue", &self.rue()) + .field("rde", &self.rde()) + .field("drv", &self.drv()) + .field("hold", &self.hold()) + .finish() + } +} +impl W { + #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.GPIO27"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 12) + } + #[doc = "Bit 13 - the input enable of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_ie(&mut self) -> FUN_IE_W { + FUN_IE_W::new(self, 13) + } + #[doc = "Bit 14 - the output enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_oe(&mut self) -> SLP_OE_W { + SLP_OE_W::new(self, 14) + } + #[doc = "Bit 15 - the input enable of the pad in sleep status"] + #[inline(always)] + #[must_use] + pub fn slp_ie(&mut self) -> SLP_IE_W { + SLP_IE_W::new(self, 15) + } + #[doc = "Bit 16 - the sleep status selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn slp_sel(&mut self) -> SLP_SEL_W { + SLP_SEL_W::new(self, 16) + } + #[doc = "Bits 17:18 - the functional selection signal of the pad"] + #[inline(always)] + #[must_use] + pub fn fun_sel(&mut self) -> FUN_SEL_W { + FUN_SEL_W::new(self, 17) + } + #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"] + #[inline(always)] + #[must_use] + pub fn mux_sel(&mut self) -> MUX_SEL_W { + MUX_SEL_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } + #[doc = "Bit 27 - the pull up enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rue(&mut self) -> RUE_W { + RUE_W::new(self, 27) + } + #[doc = "Bit 28 - the pull down enable of the pad"] + #[inline(always)] + #[must_use] + pub fn rde(&mut self) -> RDE_W { + RDE_W::new(self, 28) + } + #[doc = "Bits 29:30 - the driver strength of the pad"] + #[inline(always)] + #[must_use] + pub fn drv(&mut self) -> DRV_W { + DRV_W::new(self, 29) + } + #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"] + #[inline(always)] + #[must_use] + pub fn hold(&mut self) -> HOLD_W { + HOLD_W::new(self, 31) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad7::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad7::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD7_SPEC; +impl crate::RegisterSpec for TOUCH_PAD7_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad7::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD7_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad7::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD7_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 TOUCH_PAD7 to value 0x4200_0000"] +impl crate::Resettable for TOUCH_PAD7_SPEC { + const RESET_VALUE: u32 = 0x4200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad8.rs b/esp32/src/rtc_io/touch_pad8.rs new file mode 100644 index 000000000..1e050fe63 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad8.rs @@ -0,0 +1,112 @@ +#[doc = "Register `TOUCH_PAD8` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD8` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +impl R { + #[doc = "Bit 19 - connect the rtc pad input to digital pad input Ó0Ó is availbale"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } +} +#[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("TOUCH_PAD8") + .field("to_gpio", &self.to_gpio()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .finish() + } +} +impl W { + #[doc = "Bit 19 - connect the rtc pad input to digital pad input Ó0Ó is availbale"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad8::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad8::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD8_SPEC; +impl crate::RegisterSpec for TOUCH_PAD8_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad8::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD8_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad8::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD8_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 TOUCH_PAD8 to value 0x0200_0000"] +impl crate::Resettable for TOUCH_PAD8_SPEC { + const RESET_VALUE: u32 = 0x0200_0000; +} diff --git a/esp32/src/rtc_io/touch_pad9.rs b/esp32/src/rtc_io/touch_pad9.rs new file mode 100644 index 000000000..60faa1e48 --- /dev/null +++ b/esp32/src/rtc_io/touch_pad9.rs @@ -0,0 +1,112 @@ +#[doc = "Register `TOUCH_PAD9` reader"] +pub type R = crate::R; +#[doc = "Register `TOUCH_PAD9` writer"] +pub type W = crate::W; +#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale"] +pub type TO_GPIO_R = crate::BitReader; +#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale"] +pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `XPD` reader - touch sensor power on."] +pub type XPD_R = crate::BitReader; +#[doc = "Field `XPD` writer - touch sensor power on."] +pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_R = crate::BitReader; +#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."] +pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `START` reader - start touch sensor."] +pub type START_R = crate::BitReader; +#[doc = "Field `START` writer - start touch sensor."] +pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; +#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_R = crate::FieldReader; +#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."] +pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>; +impl R { + #[doc = "Bit 19 - connect the rtc pad input to digital pad input Ó0Ó is availbale"] + #[inline(always)] + pub fn to_gpio(&self) -> TO_GPIO_R { + TO_GPIO_R::new(((self.bits >> 19) & 1) != 0) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + pub fn xpd(&self) -> XPD_R { + XPD_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + pub fn tie_opt(&self) -> TIE_OPT_R { + TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 22) & 1) != 0) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + pub fn dac(&self) -> DAC_R { + DAC_R::new(((self.bits >> 23) & 7) as u8) + } +} +#[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("TOUCH_PAD9") + .field("to_gpio", &self.to_gpio()) + .field("xpd", &self.xpd()) + .field("tie_opt", &self.tie_opt()) + .field("start", &self.start()) + .field("dac", &self.dac()) + .finish() + } +} +impl W { + #[doc = "Bit 19 - connect the rtc pad input to digital pad input Ó0Ó is availbale"] + #[inline(always)] + #[must_use] + pub fn to_gpio(&mut self) -> TO_GPIO_W { + TO_GPIO_W::new(self, 19) + } + #[doc = "Bit 20 - touch sensor power on."] + #[inline(always)] + #[must_use] + pub fn xpd(&mut self) -> XPD_W { + XPD_W::new(self, 20) + } + #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."] + #[inline(always)] + #[must_use] + pub fn tie_opt(&mut self) -> TIE_OPT_W { + TIE_OPT_W::new(self, 21) + } + #[doc = "Bit 22 - start touch sensor."] + #[inline(always)] + #[must_use] + pub fn start(&mut self) -> START_W { + START_W::new(self, 22) + } + #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."] + #[inline(always)] + #[must_use] + pub fn dac(&mut self) -> DAC_W { + DAC_W::new(self, 23) + } +} +#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad9::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad9::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub struct TOUCH_PAD9_SPEC; +impl crate::RegisterSpec for TOUCH_PAD9_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [`touch_pad9::R`](R) reader structure"] +impl crate::Readable for TOUCH_PAD9_SPEC {} +#[doc = "`write(|w| ..)` method takes [`touch_pad9::W`](W) writer structure"] +impl crate::Writable for TOUCH_PAD9_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 TOUCH_PAD9 to value 0x0200_0000"] +impl crate::Resettable for TOUCH_PAD9_SPEC { + const RESET_VALUE: u32 = 0x0200_0000; +} diff --git a/esp32/svd/patches/esp32.yaml b/esp32/svd/patches/esp32.yaml index 845cf7269..237dc05a7 100644 --- a/esp32/svd/patches/esp32.yaml +++ b/esp32/svd/patches/esp32.yaml @@ -14,92 +14,6 @@ RTC_I2C: name: INT_ENA RTC_IO: - _delete: ["TOUCH_PAD0", "TOUCH_PAD1", "TOUCH_PAD2", "TOUCH_PAD3", "TOUCH_PAD4", "TOUCH_PAD5", "TOUCH_PAD6", "TOUCH_PAD7", "TOUCH_PAD8", "TOUCH_PAD9"] - _add: - TOUCH_PAD%s: - dim: 10 - dimIndex: 0-9 - dimIncrement: 0x4 - description: "Touch pad %s configuration register" - addressOffset: 0x94 - size: 32 - access: read-write - fields: - TO_GPIO: - description: "connect the rtc pad input to digital pad input" - bitOffset: 12 - bitWidth: 1 - access: read-write - FUN_IE: - description: "the input enable of the pad" - bitOffset: 13 - bitWidth: 1 - access: read-write - SLP_OE: - description: "the output enable of the pad in sleep status" - bitOffset: 14 - bitWidth: 1 - access: read-write - SLP_IE: - description: "the input enable of the pad in sleep status" - bitOffset: 15 - bitWidth: 1 - access: read-write - SLP_SEL: - description: "the sleep status selection signal of the pad" - bitOffset: 16 - bitWidth: 1 - access: read-write - FUN_SEL: - description: "the functional selection signal of the pad" - bitOffset: 17 - bitWidth: 2 - access: read-write - MUX_SEL: - description: "1 select the digital function, 0 selects the rtc function" - bitOffset: 19 - bitWidth: 1 - access: read-write - XPD: - description: "touch sensor power on" - bitOffset: 20 - bitWidth: 1 - access: read-write - TIE_OPT: - description: "default touch sensor tie option. 0: tie low, 1: tie high" - bitOffset: 21 - bitWidth: 1 - access: read-write - START: - description: "start touch sensor" - bitOffset: 22 - bitWidth: 1 - access: read-write - DAC: - description: "touch sensor slope control. 3-bit for each touch panel, default 100" - bitOffset: 23 - bitWidth: 3 - access: read-write - RUE: - description: "the pull up enable of the pad" - bitOffset: 27 - bitWidth: 1 - access: read-write - RDE: - description: "the pull down enable of the pad" - bitOffset: 28 - bitWidth: 1 - access: read-write - DRV: - description: "the driver strength of the pad" - bitOffset: 29 - bitWidth: 2 - access: read-write - HOLD: - description: "hold the current value of the output when setting the hold to 1" - bitOffset: 31 - bitWidth: 1 - access: read-write _include: ../../../common_patches/rtc_io.yaml "EFUSE,I2C0,I2S0,RTC_CNTL,RTC_I2C,UART0,UHCI0": diff --git a/esp32s3/src/rtc_io.rs b/esp32s3/src/rtc_io.rs index b7c26fefd..4db1b9c8d 100644 --- a/esp32s3/src/rtc_io.rs +++ b/esp32s3/src/rtc_io.rs @@ -96,13 +96,13 @@ impl RegisterBlock { pub const fn rtc_debug_sel(&self) -> &RTC_DEBUG_SEL { &self.rtc_debug_sel } - #[doc = "0x84..0xc0 - Touch pad %s configuration register"] + #[doc = "0x84..0xc0 - configure RTC PAD%s"] #[inline(always)] pub const fn touch_pad(&self, n: usize) -> &TOUCH_PAD { &self.touch_pad[n] } #[doc = "Iterator for array of:"] - #[doc = "0x84..0xc0 - Touch pad %s configuration register"] + #[doc = "0x84..0xc0 - configure RTC PAD%s"] #[inline(always)] pub fn touch_pad_iter(&self) -> impl Iterator { self.touch_pad.iter() @@ -216,6 +216,10 @@ pub mod pin; pub type RTC_DEBUG_SEL = crate::Reg; #[doc = "configure rtc debug"] pub mod rtc_debug_sel; +#[doc = "TOUCH_PAD (rw) register accessor: configure RTC PAD%s\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad`] module"] +pub type TOUCH_PAD = crate::Reg; +#[doc = "configure RTC PAD%s"] +pub mod touch_pad; #[doc = "XTAL_32P_PAD (rw) register accessor: configure RTC PAD15\n\nYou can [`read`](crate::Reg::read) this register and get [`xtal_32p_pad::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`xtal_32p_pad::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@xtal_32p_pad`] module"] pub type XTAL_32P_PAD = crate::Reg; #[doc = "configure RTC PAD15"] @@ -264,7 +268,3 @@ pub mod touch_ctrl; pub type DATE = crate::Reg; #[doc = "version"] pub mod date; -#[doc = "TOUCH_PAD (rw) register accessor: Touch pad %s configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@touch_pad`] module"] -pub type TOUCH_PAD = crate::Reg; -#[doc = "Touch pad %s configuration register"] -pub mod touch_pad; diff --git a/esp32s3/src/rtc_io/touch_pad.rs b/esp32s3/src/rtc_io/touch_pad.rs index b9235663d..15f0604e1 100644 --- a/esp32s3/src/rtc_io/touch_pad.rs +++ b/esp32s3/src/rtc_io/touch_pad.rs @@ -14,41 +14,41 @@ pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>; pub type SLP_IE_R = crate::BitReader; #[doc = "Field `SLP_IE` writer - input enable in sleep mode"] pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `SLP_SEL` reader - 1: enable sleep mode during sleep, 0: no sleep mode"] +#[doc = "Field `SLP_SEL` reader - 1: enable sleep mode during sleep,0: no sleep mode"] pub type SLP_SEL_R = crate::BitReader; -#[doc = "Field `SLP_SEL` writer - 1: enable sleep mode during sleep, 0: no sleep mode"] +#[doc = "Field `SLP_SEL` writer - 1: enable sleep mode during sleep,0: no sleep mode"] pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; #[doc = "Field `FUN_SEL` reader - function sel"] pub type FUN_SEL_R = crate::FieldReader; #[doc = "Field `FUN_SEL` writer - function sel"] pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; -#[doc = "Field `MUX_SEL` reader - 1: use RTC GPIO, 0: use digital GPIO"] +#[doc = "Field `MUX_SEL` reader - 1: use RTC GPIO,0: use digital GPIO"] pub type MUX_SEL_R = crate::BitReader; -#[doc = "Field `MUX_SEL` writer - 1: use RTC GPIO, 0: use digital GPIO"] +#[doc = "Field `MUX_SEL` writer - 1: use RTC GPIO,0: use digital GPIO"] pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `XPD` reader - touch sensor power on"] +#[doc = "Field `XPD` reader - TOUCH_XPD"] pub type XPD_R = crate::BitReader; -#[doc = "Field `XPD` writer - touch sensor power on"] +#[doc = "Field `XPD` writer - TOUCH_XPD"] pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low, 1: tie high"] +#[doc = "Field `TIE_OPT` reader - TOUCH_TIE_OPT"] pub type TIE_OPT_R = crate::BitReader; -#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low, 1: tie high"] +#[doc = "Field `TIE_OPT` writer - TOUCH_TIE_OPT"] pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `START` reader - start touch sensor"] +#[doc = "Field `START` reader - TOUCH_START"] pub type START_R = crate::BitReader; -#[doc = "Field `START` writer - start touch sensor"] +#[doc = "Field `START` writer - TOUCH_START"] pub type START_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `RUE` reader - the pull up enable of the pad"] +#[doc = "Field `RUE` reader - RUE"] pub type RUE_R = crate::BitReader; -#[doc = "Field `RUE` writer - the pull up enable of the pad"] +#[doc = "Field `RUE` writer - RUE"] pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `RDE` reader - the pull down enable of the pad"] +#[doc = "Field `RDE` reader - RDE"] pub type RDE_R = crate::BitReader; -#[doc = "Field `RDE` writer - the pull down enable of the pad"] +#[doc = "Field `RDE` writer - RDE"] pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>; -#[doc = "Field `DRV` reader - the driver strength of the pad"] +#[doc = "Field `DRV` reader - DRV"] pub type DRV_R = crate::FieldReader; -#[doc = "Field `DRV` writer - the driver strength of the pad"] +#[doc = "Field `DRV` writer - DRV"] pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>; impl R { #[doc = "Bit 13 - input enable in work mode"] @@ -66,7 +66,7 @@ impl R { pub fn slp_ie(&self) -> SLP_IE_R { SLP_IE_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 16 - 1: enable sleep mode during sleep, 0: no sleep mode"] + #[doc = "Bit 16 - 1: enable sleep mode during sleep,0: no sleep mode"] #[inline(always)] pub fn slp_sel(&self) -> SLP_SEL_R { SLP_SEL_R::new(((self.bits >> 16) & 1) != 0) @@ -76,37 +76,37 @@ impl R { pub fn fun_sel(&self) -> FUN_SEL_R { FUN_SEL_R::new(((self.bits >> 17) & 3) as u8) } - #[doc = "Bit 19 - 1: use RTC GPIO, 0: use digital GPIO"] + #[doc = "Bit 19 - 1: use RTC GPIO,0: use digital GPIO"] #[inline(always)] pub fn mux_sel(&self) -> MUX_SEL_R { MUX_SEL_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 20 - touch sensor power on"] + #[doc = "Bit 20 - TOUCH_XPD"] #[inline(always)] pub fn xpd(&self) -> XPD_R { XPD_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 21 - default touch sensor tie option. 0: tie low, 1: tie high"] + #[doc = "Bit 21 - TOUCH_TIE_OPT"] #[inline(always)] pub fn tie_opt(&self) -> TIE_OPT_R { TIE_OPT_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 22 - start touch sensor"] + #[doc = "Bit 22 - TOUCH_START"] #[inline(always)] pub fn start(&self) -> START_R { START_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 27 - the pull up enable of the pad"] + #[doc = "Bit 27 - RUE"] #[inline(always)] pub fn rue(&self) -> RUE_R { RUE_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 28 - the pull down enable of the pad"] + #[doc = "Bit 28 - RDE"] #[inline(always)] pub fn rde(&self) -> RDE_R { RDE_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 29:30 - the driver strength of the pad"] + #[doc = "Bits 29:30 - DRV"] #[inline(always)] pub fn drv(&self) -> DRV_R { DRV_R::new(((self.bits >> 29) & 3) as u8) @@ -150,7 +150,7 @@ impl W { pub fn slp_ie(&mut self) -> SLP_IE_W { SLP_IE_W::new(self, 15) } - #[doc = "Bit 16 - 1: enable sleep mode during sleep, 0: no sleep mode"] + #[doc = "Bit 16 - 1: enable sleep mode during sleep,0: no sleep mode"] #[inline(always)] #[must_use] pub fn slp_sel(&mut self) -> SLP_SEL_W { @@ -162,50 +162,50 @@ impl W { pub fn fun_sel(&mut self) -> FUN_SEL_W { FUN_SEL_W::new(self, 17) } - #[doc = "Bit 19 - 1: use RTC GPIO, 0: use digital GPIO"] + #[doc = "Bit 19 - 1: use RTC GPIO,0: use digital GPIO"] #[inline(always)] #[must_use] pub fn mux_sel(&mut self) -> MUX_SEL_W { MUX_SEL_W::new(self, 19) } - #[doc = "Bit 20 - touch sensor power on"] + #[doc = "Bit 20 - TOUCH_XPD"] #[inline(always)] #[must_use] pub fn xpd(&mut self) -> XPD_W { XPD_W::new(self, 20) } - #[doc = "Bit 21 - default touch sensor tie option. 0: tie low, 1: tie high"] + #[doc = "Bit 21 - TOUCH_TIE_OPT"] #[inline(always)] #[must_use] pub fn tie_opt(&mut self) -> TIE_OPT_W { TIE_OPT_W::new(self, 21) } - #[doc = "Bit 22 - start touch sensor"] + #[doc = "Bit 22 - TOUCH_START"] #[inline(always)] #[must_use] pub fn start(&mut self) -> START_W { START_W::new(self, 22) } - #[doc = "Bit 27 - the pull up enable of the pad"] + #[doc = "Bit 27 - RUE"] #[inline(always)] #[must_use] pub fn rue(&mut self) -> RUE_W { RUE_W::new(self, 27) } - #[doc = "Bit 28 - the pull down enable of the pad"] + #[doc = "Bit 28 - RDE"] #[inline(always)] #[must_use] pub fn rde(&mut self) -> RDE_W { RDE_W::new(self, 28) } - #[doc = "Bits 29:30 - the driver strength of the pad"] + #[doc = "Bits 29:30 - DRV"] #[inline(always)] #[must_use] pub fn drv(&mut self) -> DRV_W { DRV_W::new(self, 29) } } -#[doc = "Touch pad %s configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +#[doc = "configure RTC PAD%s\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct TOUCH_PAD_SPEC; impl crate::RegisterSpec for TOUCH_PAD_SPEC { type Ux = u32; @@ -218,7 +218,7 @@ impl crate::Writable for TOUCH_PAD_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0; const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0; } -#[doc = "`reset()` method sets TOUCH_PAD%s to value 0"] +#[doc = "`reset()` method sets TOUCH_PAD%s to value 0x5000_0000"] impl crate::Resettable for TOUCH_PAD_SPEC { - const RESET_VALUE: u32 = 0; + const RESET_VALUE: u32 = 0x5000_0000; } diff --git a/esp32s3/svd/patches/esp32s3.yaml b/esp32s3/svd/patches/esp32s3.yaml index 637e24039..aba7f79b3 100644 --- a/esp32s3/svd/patches/esp32s3.yaml +++ b/esp32s3/svd/patches/esp32s3.yaml @@ -156,77 +156,9 @@ RTC_I2C: _include: ../../../common_patches/int_strip.yaml RTC_IO: - _delete: ["TOUCH_PAD0", "TOUCH_PAD1", "TOUCH_PAD2", "TOUCH_PAD3", "TOUCH_PAD4", "TOUCH_PAD5", "TOUCH_PAD6", "TOUCH_PAD7", "TOUCH_PAD8", "TOUCH_PAD9", "TOUCH_PAD10", "TOUCH_PAD11", "TOUCH_PAD12", "TOUCH_PAD13", "TOUCH_PAD14"] - _add: - TOUCH_PAD%s: - dim: 15 - dimIndex: 0-14 - dimIncrement: 0x4 - description: "Touch pad %s configuration register" - addressOffset: 0x84 - size: 32 - access: read-write - fields: - FUN_IE: - description: "input enable in work mode" - bitOffset: 13 - bitWidth: 1 - access: read-write - SLP_OE: - description: "output enable in sleep mode" - bitOffset: 14 - bitWidth: 1 - access: read-write - SLP_IE: - description: "input enable in sleep mode" - bitOffset: 15 - bitWidth: 1 - access: read-write - SLP_SEL: - description: "1: enable sleep mode during sleep, 0: no sleep mode" - bitOffset: 16 - bitWidth: 1 - access: read-write - FUN_SEL: - description: "function sel" - bitOffset: 17 - bitWidth: 2 - access: read-write - MUX_SEL: - description: "1: use RTC GPIO, 0: use digital GPIO" - bitOffset: 19 - bitWidth: 1 - access: read-write - XPD: - description: "touch sensor power on" - bitOffset: 20 - bitWidth: 1 - access: read-write - TIE_OPT: - description: "default touch sensor tie option. 0: tie low, 1: tie high" - bitOffset: 21 - bitWidth: 1 - access: read-write - START: - description: "start touch sensor" - bitOffset: 22 - bitWidth: 1 - access: read-write - RUE: - description: "the pull up enable of the pad" - bitOffset: 27 - bitWidth: 1 - access: read-write - RDE: - description: "the pull down enable of the pad" - bitOffset: 28 - bitWidth: 1 - access: read-write - DRV: - description: "the driver strength of the pad" - bitOffset: 29 - bitWidth: 2 - access: read-write + _array: + TOUCH_PAD*: + name: TOUCH_PAD%s RTC_CNTL: _include: ../../../common_patches/rtc_cntl_int_strip.yaml