esp32p4/jpeg/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `DONE_INT_ST` reader - This status interrupt bit turns to high level when JPEG finishes encoding a picture.."]
4pub type DONE_INT_ST_R = crate::BitReader;
5#[doc = "Field `RLE_PARALLEL_ERR_INT_ST` reader - The status interrupt bit to sign that rle parallel error when decoding."]
6pub type RLE_PARALLEL_ERR_INT_ST_R = crate::BitReader;
7#[doc = "Field `CID_ERR_INT_ST` reader - The status interrupt bit to sign that scan id check with component fails when decoding."]
8pub type CID_ERR_INT_ST_R = crate::BitReader;
9#[doc = "Field `C_DHT_DC_ID_ERR_INT_ST` reader - The status interrupt bit to sign that scan component's dc dht id check with dc dht table's id fails when decoding."]
10pub type C_DHT_DC_ID_ERR_INT_ST_R = crate::BitReader;
11#[doc = "Field `C_DHT_AC_ID_ERR_INT_ST` reader - The status interrupt bit to sign that scan component's ac dht id check with ac dht table's id fails when decoding."]
12pub type C_DHT_AC_ID_ERR_INT_ST_R = crate::BitReader;
13#[doc = "Field `C_DQT_ID_ERR_INT_ST` reader - The status interrupt bit to sign that scan component's dqt id check with dqt table's id fails when decoding."]
14pub type C_DQT_ID_ERR_INT_ST_R = crate::BitReader;
15#[doc = "Field `RST_UXP_ERR_INT_ST` reader - The status interrupt bit to sign that RST header marker is detected but restart interval is 0 when decoding."]
16pub type RST_UXP_ERR_INT_ST_R = crate::BitReader;
17#[doc = "Field `RST_CHECK_NONE_ERR_INT_ST` reader - The status interrupt bit to sign that RST header marker is not detected but restart interval is not 0 when decoding."]
18pub type RST_CHECK_NONE_ERR_INT_ST_R = crate::BitReader;
19#[doc = "Field `RST_CHECK_POS_ERR_INT_ST` reader - The status interrupt bit to sign that RST header marker position mismatches with restart interval when decoding."]
20pub type RST_CHECK_POS_ERR_INT_ST_R = crate::BitReader;
21#[doc = "Field `OUT_EOF_INT_ST` reader - The status interrupt bit turns to high level when the last pixel of one square has been transmitted for Tx channel."]
22pub type OUT_EOF_INT_ST_R = crate::BitReader;
23#[doc = "Field `SR_COLOR_MODE_ERR_INT_ST` reader - The status interrupt bit to sign that the selected source color mode is not supported."]
24pub type SR_COLOR_MODE_ERR_INT_ST_R = crate::BitReader;
25#[doc = "Field `DCT_DONE_INT_ST` reader - The status interrupt bit to sign that one dct calculation is finished."]
26pub type DCT_DONE_INT_ST_R = crate::BitReader;
27#[doc = "Field `BS_LAST_BLOCK_EOF_INT_ST` reader - The status interrupt bit to sign that the coding process for last block is finished."]
28pub type BS_LAST_BLOCK_EOF_INT_ST_R = crate::BitReader;
29#[doc = "Field `SCAN_CHECK_NONE_ERR_INT_ST` reader - The status interrupt bit to sign that SOS header marker is not detected but there are still components left to be decoded."]
30pub type SCAN_CHECK_NONE_ERR_INT_ST_R = crate::BitReader;
31#[doc = "Field `SCAN_CHECK_POS_ERR_INT_ST` reader - The status interrupt bit to sign that SOS header marker position wrong when decoding."]
32pub type SCAN_CHECK_POS_ERR_INT_ST_R = crate::BitReader;
33#[doc = "Field `UXP_DET_INT_ST` reader - The status interrupt bit to sign that unsupported header marker is detected when decoding."]
34pub type UXP_DET_INT_ST_R = crate::BitReader;
35#[doc = "Field `EN_FRAME_EOF_ERR_INT_ST` reader - The status interrupt bit to sign that received pixel blocks are smaller than expected when encoding."]
36pub type EN_FRAME_EOF_ERR_INT_ST_R = crate::BitReader;
37#[doc = "Field `EN_FRAME_EOF_LACK_INT_ST` reader - The status interrupt bit to sign that the frame eof sign bit from dma input is missing when encoding. But the number of pixel blocks is enough."]
38pub type EN_FRAME_EOF_LACK_INT_ST_R = crate::BitReader;
39#[doc = "Field `DE_FRAME_EOF_ERR_INT_ST` reader - The status interrupt bit to sign that decoded blocks are smaller than expected when decoding."]
40pub type DE_FRAME_EOF_ERR_INT_ST_R = crate::BitReader;
41#[doc = "Field `DE_FRAME_EOF_LACK_INT_ST` reader - The status interrupt bit to sign that the either frame eof from dma input or eoi marker is missing when encoding. But the number of decoded blocks is enough."]
42pub type DE_FRAME_EOF_LACK_INT_ST_R = crate::BitReader;
43#[doc = "Field `SOS_UNMATCH_ERR_INT_ST` reader - The status interrupt bit to sign that the component number of a scan is 0 or does not match the sos marker's length when decoding."]
44pub type SOS_UNMATCH_ERR_INT_ST_R = crate::BitReader;
45#[doc = "Field `MARKER_ERR_FST_SCAN_INT_ST` reader - The status interrupt bit to sign that the first scan has header marker error when decoding."]
46pub type MARKER_ERR_FST_SCAN_INT_ST_R = crate::BitReader;
47#[doc = "Field `MARKER_ERR_OTHER_SCAN_INT_ST` reader - The status interrupt bit to sign that the following scans but not the first scan have header marker error when decoding."]
48pub type MARKER_ERR_OTHER_SCAN_INT_ST_R = crate::BitReader;
49#[doc = "Field `UNDET_INT_ST` reader - The status interrupt bit to sign that JPEG format is not detected at the eof data of a packet when decoding."]
50pub type UNDET_INT_ST_R = crate::BitReader;
51#[doc = "Field `DECODE_TIMEOUT_INT_ST` reader - The status interrupt bit to sign that decode pause time is longer than the setting decode timeout time when decoding."]
52pub type DECODE_TIMEOUT_INT_ST_R = crate::BitReader;
53impl R {
54    #[doc = "Bit 0 - This status interrupt bit turns to high level when JPEG finishes encoding a picture.."]
55    #[inline(always)]
56    pub fn done_int_st(&self) -> DONE_INT_ST_R {
57        DONE_INT_ST_R::new((self.bits & 1) != 0)
58    }
59    #[doc = "Bit 1 - The status interrupt bit to sign that rle parallel error when decoding."]
60    #[inline(always)]
61    pub fn rle_parallel_err_int_st(&self) -> RLE_PARALLEL_ERR_INT_ST_R {
62        RLE_PARALLEL_ERR_INT_ST_R::new(((self.bits >> 1) & 1) != 0)
63    }
64    #[doc = "Bit 2 - The status interrupt bit to sign that scan id check with component fails when decoding."]
65    #[inline(always)]
66    pub fn cid_err_int_st(&self) -> CID_ERR_INT_ST_R {
67        CID_ERR_INT_ST_R::new(((self.bits >> 2) & 1) != 0)
68    }
69    #[doc = "Bit 3 - The status interrupt bit to sign that scan component's dc dht id check with dc dht table's id fails when decoding."]
70    #[inline(always)]
71    pub fn c_dht_dc_id_err_int_st(&self) -> C_DHT_DC_ID_ERR_INT_ST_R {
72        C_DHT_DC_ID_ERR_INT_ST_R::new(((self.bits >> 3) & 1) != 0)
73    }
74    #[doc = "Bit 4 - The status interrupt bit to sign that scan component's ac dht id check with ac dht table's id fails when decoding."]
75    #[inline(always)]
76    pub fn c_dht_ac_id_err_int_st(&self) -> C_DHT_AC_ID_ERR_INT_ST_R {
77        C_DHT_AC_ID_ERR_INT_ST_R::new(((self.bits >> 4) & 1) != 0)
78    }
79    #[doc = "Bit 5 - The status interrupt bit to sign that scan component's dqt id check with dqt table's id fails when decoding."]
80    #[inline(always)]
81    pub fn c_dqt_id_err_int_st(&self) -> C_DQT_ID_ERR_INT_ST_R {
82        C_DQT_ID_ERR_INT_ST_R::new(((self.bits >> 5) & 1) != 0)
83    }
84    #[doc = "Bit 6 - The status interrupt bit to sign that RST header marker is detected but restart interval is 0 when decoding."]
85    #[inline(always)]
86    pub fn rst_uxp_err_int_st(&self) -> RST_UXP_ERR_INT_ST_R {
87        RST_UXP_ERR_INT_ST_R::new(((self.bits >> 6) & 1) != 0)
88    }
89    #[doc = "Bit 7 - The status interrupt bit to sign that RST header marker is not detected but restart interval is not 0 when decoding."]
90    #[inline(always)]
91    pub fn rst_check_none_err_int_st(&self) -> RST_CHECK_NONE_ERR_INT_ST_R {
92        RST_CHECK_NONE_ERR_INT_ST_R::new(((self.bits >> 7) & 1) != 0)
93    }
94    #[doc = "Bit 8 - The status interrupt bit to sign that RST header marker position mismatches with restart interval when decoding."]
95    #[inline(always)]
96    pub fn rst_check_pos_err_int_st(&self) -> RST_CHECK_POS_ERR_INT_ST_R {
97        RST_CHECK_POS_ERR_INT_ST_R::new(((self.bits >> 8) & 1) != 0)
98    }
99    #[doc = "Bit 9 - The status interrupt bit turns to high level when the last pixel of one square has been transmitted for Tx channel."]
100    #[inline(always)]
101    pub fn out_eof_int_st(&self) -> OUT_EOF_INT_ST_R {
102        OUT_EOF_INT_ST_R::new(((self.bits >> 9) & 1) != 0)
103    }
104    #[doc = "Bit 10 - The status interrupt bit to sign that the selected source color mode is not supported."]
105    #[inline(always)]
106    pub fn sr_color_mode_err_int_st(&self) -> SR_COLOR_MODE_ERR_INT_ST_R {
107        SR_COLOR_MODE_ERR_INT_ST_R::new(((self.bits >> 10) & 1) != 0)
108    }
109    #[doc = "Bit 11 - The status interrupt bit to sign that one dct calculation is finished."]
110    #[inline(always)]
111    pub fn dct_done_int_st(&self) -> DCT_DONE_INT_ST_R {
112        DCT_DONE_INT_ST_R::new(((self.bits >> 11) & 1) != 0)
113    }
114    #[doc = "Bit 12 - The status interrupt bit to sign that the coding process for last block is finished."]
115    #[inline(always)]
116    pub fn bs_last_block_eof_int_st(&self) -> BS_LAST_BLOCK_EOF_INT_ST_R {
117        BS_LAST_BLOCK_EOF_INT_ST_R::new(((self.bits >> 12) & 1) != 0)
118    }
119    #[doc = "Bit 13 - The status interrupt bit to sign that SOS header marker is not detected but there are still components left to be decoded."]
120    #[inline(always)]
121    pub fn scan_check_none_err_int_st(&self) -> SCAN_CHECK_NONE_ERR_INT_ST_R {
122        SCAN_CHECK_NONE_ERR_INT_ST_R::new(((self.bits >> 13) & 1) != 0)
123    }
124    #[doc = "Bit 14 - The status interrupt bit to sign that SOS header marker position wrong when decoding."]
125    #[inline(always)]
126    pub fn scan_check_pos_err_int_st(&self) -> SCAN_CHECK_POS_ERR_INT_ST_R {
127        SCAN_CHECK_POS_ERR_INT_ST_R::new(((self.bits >> 14) & 1) != 0)
128    }
129    #[doc = "Bit 15 - The status interrupt bit to sign that unsupported header marker is detected when decoding."]
130    #[inline(always)]
131    pub fn uxp_det_int_st(&self) -> UXP_DET_INT_ST_R {
132        UXP_DET_INT_ST_R::new(((self.bits >> 15) & 1) != 0)
133    }
134    #[doc = "Bit 16 - The status interrupt bit to sign that received pixel blocks are smaller than expected when encoding."]
135    #[inline(always)]
136    pub fn en_frame_eof_err_int_st(&self) -> EN_FRAME_EOF_ERR_INT_ST_R {
137        EN_FRAME_EOF_ERR_INT_ST_R::new(((self.bits >> 16) & 1) != 0)
138    }
139    #[doc = "Bit 17 - The status interrupt bit to sign that the frame eof sign bit from dma input is missing when encoding. But the number of pixel blocks is enough."]
140    #[inline(always)]
141    pub fn en_frame_eof_lack_int_st(&self) -> EN_FRAME_EOF_LACK_INT_ST_R {
142        EN_FRAME_EOF_LACK_INT_ST_R::new(((self.bits >> 17) & 1) != 0)
143    }
144    #[doc = "Bit 18 - The status interrupt bit to sign that decoded blocks are smaller than expected when decoding."]
145    #[inline(always)]
146    pub fn de_frame_eof_err_int_st(&self) -> DE_FRAME_EOF_ERR_INT_ST_R {
147        DE_FRAME_EOF_ERR_INT_ST_R::new(((self.bits >> 18) & 1) != 0)
148    }
149    #[doc = "Bit 19 - The status interrupt bit to sign that the either frame eof from dma input or eoi marker is missing when encoding. But the number of decoded blocks is enough."]
150    #[inline(always)]
151    pub fn de_frame_eof_lack_int_st(&self) -> DE_FRAME_EOF_LACK_INT_ST_R {
152        DE_FRAME_EOF_LACK_INT_ST_R::new(((self.bits >> 19) & 1) != 0)
153    }
154    #[doc = "Bit 20 - The status interrupt bit to sign that the component number of a scan is 0 or does not match the sos marker's length when decoding."]
155    #[inline(always)]
156    pub fn sos_unmatch_err_int_st(&self) -> SOS_UNMATCH_ERR_INT_ST_R {
157        SOS_UNMATCH_ERR_INT_ST_R::new(((self.bits >> 20) & 1) != 0)
158    }
159    #[doc = "Bit 21 - The status interrupt bit to sign that the first scan has header marker error when decoding."]
160    #[inline(always)]
161    pub fn marker_err_fst_scan_int_st(&self) -> MARKER_ERR_FST_SCAN_INT_ST_R {
162        MARKER_ERR_FST_SCAN_INT_ST_R::new(((self.bits >> 21) & 1) != 0)
163    }
164    #[doc = "Bit 22 - The status interrupt bit to sign that the following scans but not the first scan have header marker error when decoding."]
165    #[inline(always)]
166    pub fn marker_err_other_scan_int_st(&self) -> MARKER_ERR_OTHER_SCAN_INT_ST_R {
167        MARKER_ERR_OTHER_SCAN_INT_ST_R::new(((self.bits >> 22) & 1) != 0)
168    }
169    #[doc = "Bit 23 - The status interrupt bit to sign that JPEG format is not detected at the eof data of a packet when decoding."]
170    #[inline(always)]
171    pub fn undet_int_st(&self) -> UNDET_INT_ST_R {
172        UNDET_INT_ST_R::new(((self.bits >> 23) & 1) != 0)
173    }
174    #[doc = "Bit 24 - The status interrupt bit to sign that decode pause time is longer than the setting decode timeout time when decoding."]
175    #[inline(always)]
176    pub fn decode_timeout_int_st(&self) -> DECODE_TIMEOUT_INT_ST_R {
177        DECODE_TIMEOUT_INT_ST_R::new(((self.bits >> 24) & 1) != 0)
178    }
179}
180#[cfg(feature = "impl-register-debug")]
181impl core::fmt::Debug for R {
182    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
183        f.debug_struct("INT_ST")
184            .field("done_int_st", &format_args!("{}", self.done_int_st().bit()))
185            .field(
186                "rle_parallel_err_int_st",
187                &format_args!("{}", self.rle_parallel_err_int_st().bit()),
188            )
189            .field(
190                "cid_err_int_st",
191                &format_args!("{}", self.cid_err_int_st().bit()),
192            )
193            .field(
194                "c_dht_dc_id_err_int_st",
195                &format_args!("{}", self.c_dht_dc_id_err_int_st().bit()),
196            )
197            .field(
198                "c_dht_ac_id_err_int_st",
199                &format_args!("{}", self.c_dht_ac_id_err_int_st().bit()),
200            )
201            .field(
202                "c_dqt_id_err_int_st",
203                &format_args!("{}", self.c_dqt_id_err_int_st().bit()),
204            )
205            .field(
206                "rst_uxp_err_int_st",
207                &format_args!("{}", self.rst_uxp_err_int_st().bit()),
208            )
209            .field(
210                "rst_check_none_err_int_st",
211                &format_args!("{}", self.rst_check_none_err_int_st().bit()),
212            )
213            .field(
214                "rst_check_pos_err_int_st",
215                &format_args!("{}", self.rst_check_pos_err_int_st().bit()),
216            )
217            .field(
218                "out_eof_int_st",
219                &format_args!("{}", self.out_eof_int_st().bit()),
220            )
221            .field(
222                "sr_color_mode_err_int_st",
223                &format_args!("{}", self.sr_color_mode_err_int_st().bit()),
224            )
225            .field(
226                "dct_done_int_st",
227                &format_args!("{}", self.dct_done_int_st().bit()),
228            )
229            .field(
230                "bs_last_block_eof_int_st",
231                &format_args!("{}", self.bs_last_block_eof_int_st().bit()),
232            )
233            .field(
234                "scan_check_none_err_int_st",
235                &format_args!("{}", self.scan_check_none_err_int_st().bit()),
236            )
237            .field(
238                "scan_check_pos_err_int_st",
239                &format_args!("{}", self.scan_check_pos_err_int_st().bit()),
240            )
241            .field(
242                "uxp_det_int_st",
243                &format_args!("{}", self.uxp_det_int_st().bit()),
244            )
245            .field(
246                "en_frame_eof_err_int_st",
247                &format_args!("{}", self.en_frame_eof_err_int_st().bit()),
248            )
249            .field(
250                "en_frame_eof_lack_int_st",
251                &format_args!("{}", self.en_frame_eof_lack_int_st().bit()),
252            )
253            .field(
254                "de_frame_eof_err_int_st",
255                &format_args!("{}", self.de_frame_eof_err_int_st().bit()),
256            )
257            .field(
258                "de_frame_eof_lack_int_st",
259                &format_args!("{}", self.de_frame_eof_lack_int_st().bit()),
260            )
261            .field(
262                "sos_unmatch_err_int_st",
263                &format_args!("{}", self.sos_unmatch_err_int_st().bit()),
264            )
265            .field(
266                "marker_err_fst_scan_int_st",
267                &format_args!("{}", self.marker_err_fst_scan_int_st().bit()),
268            )
269            .field(
270                "marker_err_other_scan_int_st",
271                &format_args!("{}", self.marker_err_other_scan_int_st().bit()),
272            )
273            .field(
274                "undet_int_st",
275                &format_args!("{}", self.undet_int_st().bit()),
276            )
277            .field(
278                "decode_timeout_int_st",
279                &format_args!("{}", self.decode_timeout_int_st().bit()),
280            )
281            .finish()
282    }
283}
284#[cfg(feature = "impl-register-debug")]
285impl core::fmt::Debug for crate::generic::Reg<INT_ST_SPEC> {
286    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
287        core::fmt::Debug::fmt(&self.read(), f)
288    }
289}
290#[doc = "Interrupt status registers\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)."]
291pub struct INT_ST_SPEC;
292impl crate::RegisterSpec for INT_ST_SPEC {
293    type Ux = u32;
294}
295#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
296impl crate::Readable for INT_ST_SPEC {}
297#[doc = "`reset()` method sets INT_ST to value 0"]
298impl crate::Resettable for INT_ST_SPEC {
299    const RESET_VALUE: u32 = 0;
300}