ra6m3/drw/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `BUSYENUM` reader - Enumeration unit status"]
17pub type BUSYENUM_R = crate::BitReader<BUSYENUM_A>;
18#[doc = "Enumeration unit status\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum BUSYENUM_A {
21    #[doc = "0: enumeration unit idle"]
22    _0 = 0,
23    #[doc = "1: enumeration unit busy, new primitive can not be started"]
24    _1 = 1,
25}
26impl From<BUSYENUM_A> for bool {
27    #[inline(always)]
28    fn from(variant: BUSYENUM_A) -> Self {
29        variant as u8 != 0
30    }
31}
32impl BUSYENUM_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> BUSYENUM_A {
36        match self.bits {
37            false => BUSYENUM_A::_0,
38            true => BUSYENUM_A::_1,
39        }
40    }
41    #[doc = "Checks if the value of the field is `_0`"]
42    #[inline(always)]
43    pub fn is_0(&self) -> bool {
44        *self == BUSYENUM_A::_0
45    }
46    #[doc = "Checks if the value of the field is `_1`"]
47    #[inline(always)]
48    pub fn is_1(&self) -> bool {
49        *self == BUSYENUM_A::_1
50    }
51}
52#[doc = "Field `BUSYWRITE` reader - Framebuffer writeback status"]
53pub type BUSYWRITE_R = crate::BitReader<BUSYWRITE_A>;
54#[doc = "Framebuffer writeback status\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum BUSYWRITE_A {
57    #[doc = "0: framebuffer writeback finished"]
58    _0 = 0,
59    #[doc = "1: framebuffer writeback busy, framebuffer type can not be changed"]
60    _1 = 1,
61}
62impl From<BUSYWRITE_A> for bool {
63    #[inline(always)]
64    fn from(variant: BUSYWRITE_A) -> Self {
65        variant as u8 != 0
66    }
67}
68impl BUSYWRITE_R {
69    #[doc = "Get enumerated values variant"]
70    #[inline(always)]
71    pub fn variant(&self) -> BUSYWRITE_A {
72        match self.bits {
73            false => BUSYWRITE_A::_0,
74            true => BUSYWRITE_A::_1,
75        }
76    }
77    #[doc = "Checks if the value of the field is `_0`"]
78    #[inline(always)]
79    pub fn is_0(&self) -> bool {
80        *self == BUSYWRITE_A::_0
81    }
82    #[doc = "Checks if the value of the field is `_1`"]
83    #[inline(always)]
84    pub fn is_1(&self) -> bool {
85        *self == BUSYWRITE_A::_1
86    }
87}
88#[doc = "Field `CACHEDIRTY` reader - Framebuffer cache status"]
89pub type CACHEDIRTY_R = crate::BitReader<CACHEDIRTY_A>;
90#[doc = "Framebuffer cache status\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum CACHEDIRTY_A {
93    #[doc = "0: framebuffer cache is not dirty"]
94    _0 = 0,
95    #[doc = "1: framebuffer cache is dirty, frame should not be flipped"]
96    _1 = 1,
97}
98impl From<CACHEDIRTY_A> for bool {
99    #[inline(always)]
100    fn from(variant: CACHEDIRTY_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl CACHEDIRTY_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> CACHEDIRTY_A {
108        match self.bits {
109            false => CACHEDIRTY_A::_0,
110            true => CACHEDIRTY_A::_1,
111        }
112    }
113    #[doc = "Checks if the value of the field is `_0`"]
114    #[inline(always)]
115    pub fn is_0(&self) -> bool {
116        *self == CACHEDIRTY_A::_0
117    }
118    #[doc = "Checks if the value of the field is `_1`"]
119    #[inline(always)]
120    pub fn is_1(&self) -> bool {
121        *self == CACHEDIRTY_A::_1
122    }
123}
124#[doc = "Field `DLISTACTIVE` reader - Display list reader status"]
125pub type DLISTACTIVE_R = crate::BitReader<DLISTACTIVE_A>;
126#[doc = "Display list reader status\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128pub enum DLISTACTIVE_A {
129    #[doc = "0: display list reader is idle"]
130    _0 = 0,
131    #[doc = "1: display list reader busy, no direct write access to registers allowed"]
132    _1 = 1,
133}
134impl From<DLISTACTIVE_A> for bool {
135    #[inline(always)]
136    fn from(variant: DLISTACTIVE_A) -> Self {
137        variant as u8 != 0
138    }
139}
140impl DLISTACTIVE_R {
141    #[doc = "Get enumerated values variant"]
142    #[inline(always)]
143    pub fn variant(&self) -> DLISTACTIVE_A {
144        match self.bits {
145            false => DLISTACTIVE_A::_0,
146            true => DLISTACTIVE_A::_1,
147        }
148    }
149    #[doc = "Checks if the value of the field is `_0`"]
150    #[inline(always)]
151    pub fn is_0(&self) -> bool {
152        *self == DLISTACTIVE_A::_0
153    }
154    #[doc = "Checks if the value of the field is `_1`"]
155    #[inline(always)]
156    pub fn is_1(&self) -> bool {
157        *self == DLISTACTIVE_A::_1
158    }
159}
160#[doc = "Field `ENUMIRQ` reader - enumeration finished interrupt triggered"]
161pub type ENUMIRQ_R = crate::BitReader<ENUMIRQ_A>;
162#[doc = "enumeration finished interrupt triggered\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum ENUMIRQ_A {
165    #[doc = "0: enumeration not finished or interrupt disabled"]
166    _0 = 0,
167    #[doc = "1: enumeration finished interrupt triggered"]
168    _1 = 1,
169}
170impl From<ENUMIRQ_A> for bool {
171    #[inline(always)]
172    fn from(variant: ENUMIRQ_A) -> Self {
173        variant as u8 != 0
174    }
175}
176impl ENUMIRQ_R {
177    #[doc = "Get enumerated values variant"]
178    #[inline(always)]
179    pub fn variant(&self) -> ENUMIRQ_A {
180        match self.bits {
181            false => ENUMIRQ_A::_0,
182            true => ENUMIRQ_A::_1,
183        }
184    }
185    #[doc = "Checks if the value of the field is `_0`"]
186    #[inline(always)]
187    pub fn is_0(&self) -> bool {
188        *self == ENUMIRQ_A::_0
189    }
190    #[doc = "Checks if the value of the field is `_1`"]
191    #[inline(always)]
192    pub fn is_1(&self) -> bool {
193        *self == ENUMIRQ_A::_1
194    }
195}
196#[doc = "Field `DLISTIRQ` reader - display list finished interrupt triggered"]
197pub type DLISTIRQ_R = crate::BitReader<DLISTIRQ_A>;
198#[doc = "display list finished interrupt triggered\n\nValue on reset: 0"]
199#[derive(Clone, Copy, Debug, PartialEq, Eq)]
200pub enum DLISTIRQ_A {
201    #[doc = "0: display list not finished or interrupt disabled"]
202    _0 = 0,
203    #[doc = "1: display list finished interrupt triggered"]
204    _1 = 1,
205}
206impl From<DLISTIRQ_A> for bool {
207    #[inline(always)]
208    fn from(variant: DLISTIRQ_A) -> Self {
209        variant as u8 != 0
210    }
211}
212impl DLISTIRQ_R {
213    #[doc = "Get enumerated values variant"]
214    #[inline(always)]
215    pub fn variant(&self) -> DLISTIRQ_A {
216        match self.bits {
217            false => DLISTIRQ_A::_0,
218            true => DLISTIRQ_A::_1,
219        }
220    }
221    #[doc = "Checks if the value of the field is `_0`"]
222    #[inline(always)]
223    pub fn is_0(&self) -> bool {
224        *self == DLISTIRQ_A::_0
225    }
226    #[doc = "Checks if the value of the field is `_1`"]
227    #[inline(always)]
228    pub fn is_1(&self) -> bool {
229        *self == DLISTIRQ_A::_1
230    }
231}
232#[doc = "Field `BUSIRQ` reader - bus error interrupt triggered"]
233pub type BUSIRQ_R = crate::BitReader<BUSIRQ_A>;
234#[doc = "bus error interrupt triggered\n\nValue on reset: 0"]
235#[derive(Clone, Copy, Debug, PartialEq, Eq)]
236pub enum BUSIRQ_A {
237    #[doc = "0: no bus error occurred or interrupt disabled"]
238    _0 = 0,
239    #[doc = "1: bus error interrupt triggered"]
240    _1 = 1,
241}
242impl From<BUSIRQ_A> for bool {
243    #[inline(always)]
244    fn from(variant: BUSIRQ_A) -> Self {
245        variant as u8 != 0
246    }
247}
248impl BUSIRQ_R {
249    #[doc = "Get enumerated values variant"]
250    #[inline(always)]
251    pub fn variant(&self) -> BUSIRQ_A {
252        match self.bits {
253            false => BUSIRQ_A::_0,
254            true => BUSIRQ_A::_1,
255        }
256    }
257    #[doc = "Checks if the value of the field is `_0`"]
258    #[inline(always)]
259    pub fn is_0(&self) -> bool {
260        *self == BUSIRQ_A::_0
261    }
262    #[doc = "Checks if the value of the field is `_1`"]
263    #[inline(always)]
264    pub fn is_1(&self) -> bool {
265        *self == BUSIRQ_A::_1
266    }
267}
268#[doc = "Field `BUSERRMFB` reader - framebuffer bus error interrupt triggered"]
269pub type BUSERRMFB_R = crate::BitReader<BUSERRMFB_A>;
270#[doc = "framebuffer bus error interrupt triggered\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq, Eq)]
272pub enum BUSERRMFB_A {
273    #[doc = "0: no framebuffer bus error occured or interrupt disabled"]
274    _0 = 0,
275    #[doc = "1: framebuffer bus error interrupt triggered"]
276    _1 = 1,
277}
278impl From<BUSERRMFB_A> for bool {
279    #[inline(always)]
280    fn from(variant: BUSERRMFB_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl BUSERRMFB_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> BUSERRMFB_A {
288        match self.bits {
289            false => BUSERRMFB_A::_0,
290            true => BUSERRMFB_A::_1,
291        }
292    }
293    #[doc = "Checks if the value of the field is `_0`"]
294    #[inline(always)]
295    pub fn is_0(&self) -> bool {
296        *self == BUSERRMFB_A::_0
297    }
298    #[doc = "Checks if the value of the field is `_1`"]
299    #[inline(always)]
300    pub fn is_1(&self) -> bool {
301        *self == BUSERRMFB_A::_1
302    }
303}
304#[doc = "Field `BUSERRMTXMRL` reader - texture bus error interrupt triggered"]
305pub type BUSERRMTXMRL_R = crate::BitReader<BUSERRMTXMRL_A>;
306#[doc = "texture bus error interrupt triggered\n\nValue on reset: 0"]
307#[derive(Clone, Copy, Debug, PartialEq, Eq)]
308pub enum BUSERRMTXMRL_A {
309    #[doc = "0: no texture bus error occurred or interrupt disabled"]
310    _0 = 0,
311    #[doc = "1: texture bus error interrupt triggered"]
312    _1 = 1,
313}
314impl From<BUSERRMTXMRL_A> for bool {
315    #[inline(always)]
316    fn from(variant: BUSERRMTXMRL_A) -> Self {
317        variant as u8 != 0
318    }
319}
320impl BUSERRMTXMRL_R {
321    #[doc = "Get enumerated values variant"]
322    #[inline(always)]
323    pub fn variant(&self) -> BUSERRMTXMRL_A {
324        match self.bits {
325            false => BUSERRMTXMRL_A::_0,
326            true => BUSERRMTXMRL_A::_1,
327        }
328    }
329    #[doc = "Checks if the value of the field is `_0`"]
330    #[inline(always)]
331    pub fn is_0(&self) -> bool {
332        *self == BUSERRMTXMRL_A::_0
333    }
334    #[doc = "Checks if the value of the field is `_1`"]
335    #[inline(always)]
336    pub fn is_1(&self) -> bool {
337        *self == BUSERRMTXMRL_A::_1
338    }
339}
340#[doc = "Field `BUSERRMDL` reader - display list bus error interrupt triggered"]
341pub type BUSERRMDL_R = crate::BitReader<BUSERRMDL_A>;
342#[doc = "display list bus error interrupt triggered\n\nValue on reset: 0"]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum BUSERRMDL_A {
345    #[doc = "0: no display list bus error occurred or interrupt disabled"]
346    _0 = 0,
347    #[doc = "1: display list bus error interrupt triggered"]
348    _1 = 1,
349}
350impl From<BUSERRMDL_A> for bool {
351    #[inline(always)]
352    fn from(variant: BUSERRMDL_A) -> Self {
353        variant as u8 != 0
354    }
355}
356impl BUSERRMDL_R {
357    #[doc = "Get enumerated values variant"]
358    #[inline(always)]
359    pub fn variant(&self) -> BUSERRMDL_A {
360        match self.bits {
361            false => BUSERRMDL_A::_0,
362            true => BUSERRMDL_A::_1,
363        }
364    }
365    #[doc = "Checks if the value of the field is `_0`"]
366    #[inline(always)]
367    pub fn is_0(&self) -> bool {
368        *self == BUSERRMDL_A::_0
369    }
370    #[doc = "Checks if the value of the field is `_1`"]
371    #[inline(always)]
372    pub fn is_1(&self) -> bool {
373        *self == BUSERRMDL_A::_1
374    }
375}
376impl R {
377    #[doc = "Bit 0 - Enumeration unit status"]
378    #[inline(always)]
379    pub fn busyenum(&self) -> BUSYENUM_R {
380        BUSYENUM_R::new((self.bits & 1) != 0)
381    }
382    #[doc = "Bit 1 - Framebuffer writeback status"]
383    #[inline(always)]
384    pub fn busywrite(&self) -> BUSYWRITE_R {
385        BUSYWRITE_R::new(((self.bits >> 1) & 1) != 0)
386    }
387    #[doc = "Bit 2 - Framebuffer cache status"]
388    #[inline(always)]
389    pub fn cachedirty(&self) -> CACHEDIRTY_R {
390        CACHEDIRTY_R::new(((self.bits >> 2) & 1) != 0)
391    }
392    #[doc = "Bit 3 - Display list reader status"]
393    #[inline(always)]
394    pub fn dlistactive(&self) -> DLISTACTIVE_R {
395        DLISTACTIVE_R::new(((self.bits >> 3) & 1) != 0)
396    }
397    #[doc = "Bit 4 - enumeration finished interrupt triggered"]
398    #[inline(always)]
399    pub fn enumirq(&self) -> ENUMIRQ_R {
400        ENUMIRQ_R::new(((self.bits >> 4) & 1) != 0)
401    }
402    #[doc = "Bit 5 - display list finished interrupt triggered"]
403    #[inline(always)]
404    pub fn dlistirq(&self) -> DLISTIRQ_R {
405        DLISTIRQ_R::new(((self.bits >> 5) & 1) != 0)
406    }
407    #[doc = "Bit 6 - bus error interrupt triggered"]
408    #[inline(always)]
409    pub fn busirq(&self) -> BUSIRQ_R {
410        BUSIRQ_R::new(((self.bits >> 6) & 1) != 0)
411    }
412    #[doc = "Bit 8 - framebuffer bus error interrupt triggered"]
413    #[inline(always)]
414    pub fn buserrmfb(&self) -> BUSERRMFB_R {
415        BUSERRMFB_R::new(((self.bits >> 8) & 1) != 0)
416    }
417    #[doc = "Bit 9 - texture bus error interrupt triggered"]
418    #[inline(always)]
419    pub fn buserrmtxmrl(&self) -> BUSERRMTXMRL_R {
420        BUSERRMTXMRL_R::new(((self.bits >> 9) & 1) != 0)
421    }
422    #[doc = "Bit 10 - display list bus error interrupt triggered"]
423    #[inline(always)]
424    pub fn buserrmdl(&self) -> BUSERRMDL_R {
425        BUSERRMDL_R::new(((self.bits >> 10) & 1) != 0)
426    }
427}
428#[doc = "Status Control Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [status](index.html) module"]
429pub struct STATUS_SPEC;
430impl crate::RegisterSpec for STATUS_SPEC {
431    type Ux = u32;
432}
433#[doc = "`read()` method returns [status::R](R) reader structure"]
434impl crate::Readable for STATUS_SPEC {
435    type Reader = R;
436}
437#[doc = "`reset()` method sets STATUS to value 0"]
438impl crate::Resettable for STATUS_SPEC {
439    const RESET_VALUE: Self::Ux = 0;
440}