esp32s2/sens/
sar_touch_status12.rs1#[doc = "Register `SAR_TOUCH_STATUS12` reader"]
2pub type R = crate::R<SAR_TOUCH_STATUS12_SPEC>;
3#[doc = "Field `TOUCH_PAD12_DATA` reader - The data of touch pad 12, depending on the setting of SENS_TOUCH_DATA_SEL."]
4pub type TOUCH_PAD12_DATA_R = crate::FieldReader<u32>;
5#[doc = "Field `TOUCH_PAD12_DEBOUNCE` reader - Touch pad 12 debounce value."]
6pub type TOUCH_PAD12_DEBOUNCE_R = crate::FieldReader;
7impl R {
8 #[doc = "Bits 0:21 - The data of touch pad 12, depending on the setting of SENS_TOUCH_DATA_SEL."]
9 #[inline(always)]
10 pub fn touch_pad12_data(&self) -> TOUCH_PAD12_DATA_R {
11 TOUCH_PAD12_DATA_R::new(self.bits & 0x003f_ffff)
12 }
13 #[doc = "Bits 29:31 - Touch pad 12 debounce value."]
14 #[inline(always)]
15 pub fn touch_pad12_debounce(&self) -> TOUCH_PAD12_DEBOUNCE_R {
16 TOUCH_PAD12_DEBOUNCE_R::new(((self.bits >> 29) & 7) as u8)
17 }
18}
19#[cfg(feature = "impl-register-debug")]
20impl core::fmt::Debug for R {
21 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22 f.debug_struct("SAR_TOUCH_STATUS12")
23 .field("touch_pad12_data", &self.touch_pad12_data())
24 .field("touch_pad12_debounce", &self.touch_pad12_debounce())
25 .finish()
26 }
27}
28#[doc = "Touch pad 12 status\n\nYou can [`read`](crate::Reg::read) this register and get [`sar_touch_status12::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct SAR_TOUCH_STATUS12_SPEC;
30impl crate::RegisterSpec for SAR_TOUCH_STATUS12_SPEC {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`sar_touch_status12::R`](R) reader structure"]
34impl crate::Readable for SAR_TOUCH_STATUS12_SPEC {}
35#[doc = "`reset()` method sets SAR_TOUCH_STATUS12 to value 0"]
36impl crate::Resettable for SAR_TOUCH_STATUS12_SPEC {
37 const RESET_VALUE: u32 = 0;
38}