esp32p4/lp_touch/
int_clr.rs

1#[doc = "Register `INT_CLR` writer"]
2pub type W = crate::W<INT_CLR_SPEC>;
3#[doc = "Field `SCAN_DONE` writer - need_des"]
4pub type SCAN_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
5#[doc = "Field `DONE` writer - need_des"]
6pub type DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
7#[doc = "Field `ACTIVE` writer - need_des"]
8pub type ACTIVE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
9#[doc = "Field `INACTIVE` writer - need_des"]
10pub type INACTIVE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
11#[doc = "Field `TIMEOUT` writer - need_des"]
12pub type TIMEOUT_W<'a, REG> = crate::BitWriter1C<'a, REG>;
13#[doc = "Field `APPROACH_LOOP_DONE` writer - need_des"]
14pub type APPROACH_LOOP_DONE_W<'a, REG> = crate::BitWriter1C<'a, REG>;
15#[cfg(feature = "impl-register-debug")]
16impl core::fmt::Debug for crate::generic::Reg<INT_CLR_SPEC> {
17    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18        write!(f, "(not readable)")
19    }
20}
21impl W {
22    #[doc = "Bit 0 - need_des"]
23    #[inline(always)]
24    #[must_use]
25    pub fn scan_done(&mut self) -> SCAN_DONE_W<INT_CLR_SPEC> {
26        SCAN_DONE_W::new(self, 0)
27    }
28    #[doc = "Bit 1 - need_des"]
29    #[inline(always)]
30    #[must_use]
31    pub fn done(&mut self) -> DONE_W<INT_CLR_SPEC> {
32        DONE_W::new(self, 1)
33    }
34    #[doc = "Bit 2 - need_des"]
35    #[inline(always)]
36    #[must_use]
37    pub fn active(&mut self) -> ACTIVE_W<INT_CLR_SPEC> {
38        ACTIVE_W::new(self, 2)
39    }
40    #[doc = "Bit 3 - need_des"]
41    #[inline(always)]
42    #[must_use]
43    pub fn inactive(&mut self) -> INACTIVE_W<INT_CLR_SPEC> {
44        INACTIVE_W::new(self, 3)
45    }
46    #[doc = "Bit 4 - need_des"]
47    #[inline(always)]
48    #[must_use]
49    pub fn timeout(&mut self) -> TIMEOUT_W<INT_CLR_SPEC> {
50        TIMEOUT_W::new(self, 4)
51    }
52    #[doc = "Bit 5 - need_des"]
53    #[inline(always)]
54    #[must_use]
55    pub fn approach_loop_done(&mut self) -> APPROACH_LOOP_DONE_W<INT_CLR_SPEC> {
56        APPROACH_LOOP_DONE_W::new(self, 5)
57    }
58}
59#[doc = "need_des\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`int_clr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
60pub struct INT_CLR_SPEC;
61impl crate::RegisterSpec for INT_CLR_SPEC {
62    type Ux = u32;
63}
64#[doc = "`write(|w| ..)` method takes [`int_clr::W`](W) writer structure"]
65impl crate::Writable for INT_CLR_SPEC {
66    type Safety = crate::Unsafe;
67    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
68    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x3f;
69}
70#[doc = "`reset()` method sets INT_CLR to value 0"]
71impl crate::Resettable for INT_CLR_SPEC {
72    const RESET_VALUE: u32 = 0;
73}