esp32p4/adc/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `THRES1_LOW` reader - need_des"]
4pub type THRES1_LOW_R = crate::BitReader;
5#[doc = "Field `THRES0_LOW` reader - need_des"]
6pub type THRES0_LOW_R = crate::BitReader;
7#[doc = "Field `THRES1_HIGH` reader - need_des"]
8pub type THRES1_HIGH_R = crate::BitReader;
9#[doc = "Field `THRES0_HIGH` reader - need_des"]
10pub type THRES0_HIGH_R = crate::BitReader;
11#[doc = "Field `APB_SARADC2_DONE` reader - need_des"]
12pub type APB_SARADC2_DONE_R = crate::BitReader;
13#[doc = "Field `APB_SARADC1_DONE` reader - need_des"]
14pub type APB_SARADC1_DONE_R = crate::BitReader;
15impl R {
16    #[doc = "Bit 26 - need_des"]
17    #[inline(always)]
18    pub fn thres1_low(&self) -> THRES1_LOW_R {
19        THRES1_LOW_R::new(((self.bits >> 26) & 1) != 0)
20    }
21    #[doc = "Bit 27 - need_des"]
22    #[inline(always)]
23    pub fn thres0_low(&self) -> THRES0_LOW_R {
24        THRES0_LOW_R::new(((self.bits >> 27) & 1) != 0)
25    }
26    #[doc = "Bit 28 - need_des"]
27    #[inline(always)]
28    pub fn thres1_high(&self) -> THRES1_HIGH_R {
29        THRES1_HIGH_R::new(((self.bits >> 28) & 1) != 0)
30    }
31    #[doc = "Bit 29 - need_des"]
32    #[inline(always)]
33    pub fn thres0_high(&self) -> THRES0_HIGH_R {
34        THRES0_HIGH_R::new(((self.bits >> 29) & 1) != 0)
35    }
36    #[doc = "Bit 30 - need_des"]
37    #[inline(always)]
38    pub fn apb_saradc2_done(&self) -> APB_SARADC2_DONE_R {
39        APB_SARADC2_DONE_R::new(((self.bits >> 30) & 1) != 0)
40    }
41    #[doc = "Bit 31 - need_des"]
42    #[inline(always)]
43    pub fn apb_saradc1_done(&self) -> APB_SARADC1_DONE_R {
44        APB_SARADC1_DONE_R::new(((self.bits >> 31) & 1) != 0)
45    }
46}
47#[cfg(feature = "impl-register-debug")]
48impl core::fmt::Debug for R {
49    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
50        f.debug_struct("INT_ST")
51            .field("thres1_low", &format_args!("{}", self.thres1_low().bit()))
52            .field("thres0_low", &format_args!("{}", self.thres0_low().bit()))
53            .field("thres1_high", &format_args!("{}", self.thres1_high().bit()))
54            .field("thres0_high", &format_args!("{}", self.thres0_high().bit()))
55            .field(
56                "apb_saradc2_done",
57                &format_args!("{}", self.apb_saradc2_done().bit()),
58            )
59            .field(
60                "apb_saradc1_done",
61                &format_args!("{}", self.apb_saradc1_done().bit()),
62            )
63            .finish()
64    }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<INT_ST_SPEC> {
68    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69        core::fmt::Debug::fmt(&self.read(), f)
70    }
71}
72#[doc = "Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`int_st::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
73pub struct INT_ST_SPEC;
74impl crate::RegisterSpec for INT_ST_SPEC {
75    type Ux = u32;
76}
77#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
78impl crate::Readable for INT_ST_SPEC {}
79#[doc = "`reset()` method sets INT_ST to value 0"]
80impl crate::Resettable for INT_ST_SPEC {
81    const RESET_VALUE: u32 = 0;
82}