esp32p4/jpeg/
decoder_status2.rs

1#[doc = "Register `DECODER_STATUS2` reader"]
2pub type R = crate::R<DECODER_STATUS2_SPEC>;
3#[doc = "Field `COMP_BLOCK_NUM` reader - Reserved"]
4pub type COMP_BLOCK_NUM_R = crate::FieldReader<u32>;
5#[doc = "Field `SCAN_NUM` reader - Reserved"]
6pub type SCAN_NUM_R = crate::FieldReader;
7#[doc = "Field `RST_CHECK_WAIT` reader - Reserved"]
8pub type RST_CHECK_WAIT_R = crate::BitReader;
9#[doc = "Field `SCAN_CHECK_WAIT` reader - Reserved"]
10pub type SCAN_CHECK_WAIT_R = crate::BitReader;
11#[doc = "Field `MCU_IN_PROC` reader - Reserved"]
12pub type MCU_IN_PROC_R = crate::BitReader;
13impl R {
14    #[doc = "Bits 0:25 - Reserved"]
15    #[inline(always)]
16    pub fn comp_block_num(&self) -> COMP_BLOCK_NUM_R {
17        COMP_BLOCK_NUM_R::new(self.bits & 0x03ff_ffff)
18    }
19    #[doc = "Bits 26:28 - Reserved"]
20    #[inline(always)]
21    pub fn scan_num(&self) -> SCAN_NUM_R {
22        SCAN_NUM_R::new(((self.bits >> 26) & 7) as u8)
23    }
24    #[doc = "Bit 29 - Reserved"]
25    #[inline(always)]
26    pub fn rst_check_wait(&self) -> RST_CHECK_WAIT_R {
27        RST_CHECK_WAIT_R::new(((self.bits >> 29) & 1) != 0)
28    }
29    #[doc = "Bit 30 - Reserved"]
30    #[inline(always)]
31    pub fn scan_check_wait(&self) -> SCAN_CHECK_WAIT_R {
32        SCAN_CHECK_WAIT_R::new(((self.bits >> 30) & 1) != 0)
33    }
34    #[doc = "Bit 31 - Reserved"]
35    #[inline(always)]
36    pub fn mcu_in_proc(&self) -> MCU_IN_PROC_R {
37        MCU_IN_PROC_R::new(((self.bits >> 31) & 1) != 0)
38    }
39}
40#[cfg(feature = "impl-register-debug")]
41impl core::fmt::Debug for R {
42    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43        f.debug_struct("DECODER_STATUS2")
44            .field(
45                "comp_block_num",
46                &format_args!("{}", self.comp_block_num().bits()),
47            )
48            .field("scan_num", &format_args!("{}", self.scan_num().bits()))
49            .field(
50                "rst_check_wait",
51                &format_args!("{}", self.rst_check_wait().bit()),
52            )
53            .field(
54                "scan_check_wait",
55                &format_args!("{}", self.scan_check_wait().bit()),
56            )
57            .field("mcu_in_proc", &format_args!("{}", self.mcu_in_proc().bit()))
58            .finish()
59    }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for crate::generic::Reg<DECODER_STATUS2_SPEC> {
63    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
64        core::fmt::Debug::fmt(&self.read(), f)
65    }
66}
67#[doc = "Trace and Debug registers\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`decoder_status2::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
68pub struct DECODER_STATUS2_SPEC;
69impl crate::RegisterSpec for DECODER_STATUS2_SPEC {
70    type Ux = u32;
71}
72#[doc = "`read()` method returns [`decoder_status2::R`](R) reader structure"]
73impl crate::Readable for DECODER_STATUS2_SPEC {}
74#[doc = "`reset()` method sets DECODER_STATUS2 to value 0"]
75impl crate::Resettable for DECODER_STATUS2_SPEC {
76    const RESET_VALUE: u32 = 0;
77}