atsams70n21/isi/
isi_imr.rs

1#[doc = "Register `ISI_IMR` reader"]
2pub struct R(crate::R<ISI_IMR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ISI_IMR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ISI_IMR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ISI_IMR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `DIS_DONE` reader - Module Disable Operation Completed"]
17pub struct DIS_DONE_R(crate::FieldReader<bool, bool>);
18impl DIS_DONE_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: bool) -> Self {
21        DIS_DONE_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for DIS_DONE_R {
25    type Target = crate::FieldReader<bool, bool>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31#[doc = "Field `SRST` reader - Software Reset Completed"]
32pub struct SRST_R(crate::FieldReader<bool, bool>);
33impl SRST_R {
34    #[inline(always)]
35    pub(crate) fn new(bits: bool) -> Self {
36        SRST_R(crate::FieldReader::new(bits))
37    }
38}
39impl core::ops::Deref for SRST_R {
40    type Target = crate::FieldReader<bool, bool>;
41    #[inline(always)]
42    fn deref(&self) -> &Self::Target {
43        &self.0
44    }
45}
46#[doc = "Field `VSYNC` reader - Vertical Synchronization"]
47pub struct VSYNC_R(crate::FieldReader<bool, bool>);
48impl VSYNC_R {
49    #[inline(always)]
50    pub(crate) fn new(bits: bool) -> Self {
51        VSYNC_R(crate::FieldReader::new(bits))
52    }
53}
54impl core::ops::Deref for VSYNC_R {
55    type Target = crate::FieldReader<bool, bool>;
56    #[inline(always)]
57    fn deref(&self) -> &Self::Target {
58        &self.0
59    }
60}
61#[doc = "Field `PXFR_DONE` reader - Preview DMA Transfer Completed"]
62pub struct PXFR_DONE_R(crate::FieldReader<bool, bool>);
63impl PXFR_DONE_R {
64    #[inline(always)]
65    pub(crate) fn new(bits: bool) -> Self {
66        PXFR_DONE_R(crate::FieldReader::new(bits))
67    }
68}
69impl core::ops::Deref for PXFR_DONE_R {
70    type Target = crate::FieldReader<bool, bool>;
71    #[inline(always)]
72    fn deref(&self) -> &Self::Target {
73        &self.0
74    }
75}
76#[doc = "Field `CXFR_DONE` reader - Codec DMA Transfer Completed"]
77pub struct CXFR_DONE_R(crate::FieldReader<bool, bool>);
78impl CXFR_DONE_R {
79    #[inline(always)]
80    pub(crate) fn new(bits: bool) -> Self {
81        CXFR_DONE_R(crate::FieldReader::new(bits))
82    }
83}
84impl core::ops::Deref for CXFR_DONE_R {
85    type Target = crate::FieldReader<bool, bool>;
86    #[inline(always)]
87    fn deref(&self) -> &Self::Target {
88        &self.0
89    }
90}
91#[doc = "Field `P_OVR` reader - Preview FIFO Overflow"]
92pub struct P_OVR_R(crate::FieldReader<bool, bool>);
93impl P_OVR_R {
94    #[inline(always)]
95    pub(crate) fn new(bits: bool) -> Self {
96        P_OVR_R(crate::FieldReader::new(bits))
97    }
98}
99impl core::ops::Deref for P_OVR_R {
100    type Target = crate::FieldReader<bool, bool>;
101    #[inline(always)]
102    fn deref(&self) -> &Self::Target {
103        &self.0
104    }
105}
106#[doc = "Field `C_OVR` reader - Codec FIFO Overflow"]
107pub struct C_OVR_R(crate::FieldReader<bool, bool>);
108impl C_OVR_R {
109    #[inline(always)]
110    pub(crate) fn new(bits: bool) -> Self {
111        C_OVR_R(crate::FieldReader::new(bits))
112    }
113}
114impl core::ops::Deref for C_OVR_R {
115    type Target = crate::FieldReader<bool, bool>;
116    #[inline(always)]
117    fn deref(&self) -> &Self::Target {
118        &self.0
119    }
120}
121#[doc = "Field `CRC_ERR` reader - CRC Synchronization Error"]
122pub struct CRC_ERR_R(crate::FieldReader<bool, bool>);
123impl CRC_ERR_R {
124    #[inline(always)]
125    pub(crate) fn new(bits: bool) -> Self {
126        CRC_ERR_R(crate::FieldReader::new(bits))
127    }
128}
129impl core::ops::Deref for CRC_ERR_R {
130    type Target = crate::FieldReader<bool, bool>;
131    #[inline(always)]
132    fn deref(&self) -> &Self::Target {
133        &self.0
134    }
135}
136#[doc = "Field `FR_OVR` reader - Frame Rate Overrun"]
137pub struct FR_OVR_R(crate::FieldReader<bool, bool>);
138impl FR_OVR_R {
139    #[inline(always)]
140    pub(crate) fn new(bits: bool) -> Self {
141        FR_OVR_R(crate::FieldReader::new(bits))
142    }
143}
144impl core::ops::Deref for FR_OVR_R {
145    type Target = crate::FieldReader<bool, bool>;
146    #[inline(always)]
147    fn deref(&self) -> &Self::Target {
148        &self.0
149    }
150}
151impl R {
152    #[doc = "Bit 1 - Module Disable Operation Completed"]
153    #[inline(always)]
154    pub fn dis_done(&self) -> DIS_DONE_R {
155        DIS_DONE_R::new(((self.bits >> 1) & 0x01) != 0)
156    }
157    #[doc = "Bit 2 - Software Reset Completed"]
158    #[inline(always)]
159    pub fn srst(&self) -> SRST_R {
160        SRST_R::new(((self.bits >> 2) & 0x01) != 0)
161    }
162    #[doc = "Bit 10 - Vertical Synchronization"]
163    #[inline(always)]
164    pub fn vsync(&self) -> VSYNC_R {
165        VSYNC_R::new(((self.bits >> 10) & 0x01) != 0)
166    }
167    #[doc = "Bit 16 - Preview DMA Transfer Completed"]
168    #[inline(always)]
169    pub fn pxfr_done(&self) -> PXFR_DONE_R {
170        PXFR_DONE_R::new(((self.bits >> 16) & 0x01) != 0)
171    }
172    #[doc = "Bit 17 - Codec DMA Transfer Completed"]
173    #[inline(always)]
174    pub fn cxfr_done(&self) -> CXFR_DONE_R {
175        CXFR_DONE_R::new(((self.bits >> 17) & 0x01) != 0)
176    }
177    #[doc = "Bit 24 - Preview FIFO Overflow"]
178    #[inline(always)]
179    pub fn p_ovr(&self) -> P_OVR_R {
180        P_OVR_R::new(((self.bits >> 24) & 0x01) != 0)
181    }
182    #[doc = "Bit 25 - Codec FIFO Overflow"]
183    #[inline(always)]
184    pub fn c_ovr(&self) -> C_OVR_R {
185        C_OVR_R::new(((self.bits >> 25) & 0x01) != 0)
186    }
187    #[doc = "Bit 26 - CRC Synchronization Error"]
188    #[inline(always)]
189    pub fn crc_err(&self) -> CRC_ERR_R {
190        CRC_ERR_R::new(((self.bits >> 26) & 0x01) != 0)
191    }
192    #[doc = "Bit 27 - Frame Rate Overrun"]
193    #[inline(always)]
194    pub fn fr_ovr(&self) -> FR_OVR_R {
195        FR_OVR_R::new(((self.bits >> 27) & 0x01) != 0)
196    }
197}
198#[doc = "ISI Interrupt Mask 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 [isi_imr](index.html) module"]
199pub struct ISI_IMR_SPEC;
200impl crate::RegisterSpec for ISI_IMR_SPEC {
201    type Ux = u32;
202}
203#[doc = "`read()` method returns [isi_imr::R](R) reader structure"]
204impl crate::Readable for ISI_IMR_SPEC {
205    type Reader = R;
206}
207#[doc = "`reset()` method sets ISI_IMR to value 0"]
208impl crate::Resettable for ISI_IMR_SPEC {
209    #[inline(always)]
210    fn reset_value() -> Self::Ux {
211        0
212    }
213}