esp32c6_lp/lp_peri/
interrupt_source.rs

1#[doc = "Register `INTERRUPT_SOURCE` reader"]
2pub type R = crate::R<INTERRUPT_SOURCE_SPEC>;
3#[doc = "Field `LP_INTERRUPT_SOURCE` reader - BIT5~BIT0: pmu_lp_int, modem_lp_int, lp_timer_lp_int, lp_uart_int, lp_i2c_int, lp_io_int"]
4pub type LP_INTERRUPT_SOURCE_R = crate::FieldReader;
5impl R {
6    #[doc = "Bits 0:5 - BIT5~BIT0: pmu_lp_int, modem_lp_int, lp_timer_lp_int, lp_uart_int, lp_i2c_int, lp_io_int"]
7    #[inline(always)]
8    pub fn lp_interrupt_source(&self) -> LP_INTERRUPT_SOURCE_R {
9        LP_INTERRUPT_SOURCE_R::new((self.bits & 0x3f) as u8)
10    }
11}
12#[cfg(feature = "impl-register-debug")]
13impl core::fmt::Debug for R {
14    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15        f.debug_struct("INTERRUPT_SOURCE")
16            .field("lp_interrupt_source", &self.lp_interrupt_source())
17            .finish()
18    }
19}
20#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`interrupt_source::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
21pub struct INTERRUPT_SOURCE_SPEC;
22impl crate::RegisterSpec for INTERRUPT_SOURCE_SPEC {
23    type Ux = u32;
24}
25#[doc = "`read()` method returns [`interrupt_source::R`](R) reader structure"]
26impl crate::Readable for INTERRUPT_SOURCE_SPEC {}
27#[doc = "`reset()` method sets INTERRUPT_SOURCE to value 0"]
28impl crate::Resettable for INTERRUPT_SOURCE_SPEC {
29    const RESET_VALUE: u32 = 0;
30}