esp32p4/assist_debug/
core_1_debug_mode.rs

1#[doc = "Register `CORE_1_DEBUG_MODE` reader"]
2pub type R = crate::R<CORE_1_DEBUG_MODE_SPEC>;
3#[doc = "Field `CORE_1_DEBUG_MODE` reader - cpu debug mode status, 1 means cpu enter debug mode."]
4pub type CORE_1_DEBUG_MODE_R = crate::BitReader;
5#[doc = "Field `CORE_1_DEBUG_MODULE_ACTIVE` reader - cpu debug_module active status"]
6pub type CORE_1_DEBUG_MODULE_ACTIVE_R = crate::BitReader;
7impl R {
8    #[doc = "Bit 0 - cpu debug mode status, 1 means cpu enter debug mode."]
9    #[inline(always)]
10    pub fn core_1_debug_mode(&self) -> CORE_1_DEBUG_MODE_R {
11        CORE_1_DEBUG_MODE_R::new((self.bits & 1) != 0)
12    }
13    #[doc = "Bit 1 - cpu debug_module active status"]
14    #[inline(always)]
15    pub fn core_1_debug_module_active(&self) -> CORE_1_DEBUG_MODULE_ACTIVE_R {
16        CORE_1_DEBUG_MODULE_ACTIVE_R::new(((self.bits >> 1) & 1) != 0)
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("CORE_1_DEBUG_MODE")
23            .field(
24                "core_1_debug_mode",
25                &format_args!("{}", self.core_1_debug_mode().bit()),
26            )
27            .field(
28                "core_1_debug_module_active",
29                &format_args!("{}", self.core_1_debug_module_active().bit()),
30            )
31            .finish()
32    }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for crate::generic::Reg<CORE_1_DEBUG_MODE_SPEC> {
36    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
37        core::fmt::Debug::fmt(&self.read(), f)
38    }
39}
40#[doc = "cpu status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`core_1_debug_mode::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct CORE_1_DEBUG_MODE_SPEC;
42impl crate::RegisterSpec for CORE_1_DEBUG_MODE_SPEC {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`core_1_debug_mode::R`](R) reader structure"]
46impl crate::Readable for CORE_1_DEBUG_MODE_SPEC {}
47#[doc = "`reset()` method sets CORE_1_DEBUG_MODE to value 0"]
48impl crate::Resettable for CORE_1_DEBUG_MODE_SPEC {
49    const RESET_VALUE: u32 = 0;
50}