atsams70n21/isi/
isi_sr.rs1#[doc = "Register `ISI_SR` reader"]
2pub struct R(crate::R<ISI_SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<ISI_SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<ISI_SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<ISI_SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `ENABLE` reader - Module Enable"]
17pub struct ENABLE_R(crate::FieldReader<bool, bool>);
18impl ENABLE_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 ENABLE_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for ENABLE_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 `DIS_DONE` reader - Module Disable Request has Terminated (cleared on read)"]
32pub struct DIS_DONE_R(crate::FieldReader<bool, bool>);
33impl DIS_DONE_R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 DIS_DONE_R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for DIS_DONE_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 `SRST` reader - Module Software Reset Request has Terminated (cleared on read)"]
47pub struct SRST_R(crate::FieldReader<bool, bool>);
48impl SRST_R {
49 #[inline(always)]
50 pub(crate) fn new(bits: bool) -> Self {
51 SRST_R(crate::FieldReader::new(bits))
52 }
53}
54impl core::ops::Deref for SRST_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 `CDC_PND` reader - Pending Codec Request"]
62pub struct CDC_PND_R(crate::FieldReader<bool, bool>);
63impl CDC_PND_R {
64 #[inline(always)]
65 pub(crate) fn new(bits: bool) -> Self {
66 CDC_PND_R(crate::FieldReader::new(bits))
67 }
68}
69impl core::ops::Deref for CDC_PND_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 `VSYNC` reader - Vertical Synchronization (cleared on read)"]
77pub struct VSYNC_R(crate::FieldReader<bool, bool>);
78impl VSYNC_R {
79 #[inline(always)]
80 pub(crate) fn new(bits: bool) -> Self {
81 VSYNC_R(crate::FieldReader::new(bits))
82 }
83}
84impl core::ops::Deref for VSYNC_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 `PXFR_DONE` reader - Preview DMA Transfer has Terminated (cleared on read)"]
92pub struct PXFR_DONE_R(crate::FieldReader<bool, bool>);
93impl PXFR_DONE_R {
94 #[inline(always)]
95 pub(crate) fn new(bits: bool) -> Self {
96 PXFR_DONE_R(crate::FieldReader::new(bits))
97 }
98}
99impl core::ops::Deref for PXFR_DONE_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 `CXFR_DONE` reader - Codec DMA Transfer has Terminated (cleared on read)"]
107pub struct CXFR_DONE_R(crate::FieldReader<bool, bool>);
108impl CXFR_DONE_R {
109 #[inline(always)]
110 pub(crate) fn new(bits: bool) -> Self {
111 CXFR_DONE_R(crate::FieldReader::new(bits))
112 }
113}
114impl core::ops::Deref for CXFR_DONE_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 `SIP` reader - Synchronization in Progress"]
122pub struct SIP_R(crate::FieldReader<bool, bool>);
123impl SIP_R {
124 #[inline(always)]
125 pub(crate) fn new(bits: bool) -> Self {
126 SIP_R(crate::FieldReader::new(bits))
127 }
128}
129impl core::ops::Deref for SIP_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 `P_OVR` reader - Preview Datapath Overflow (cleared on read)"]
137pub struct P_OVR_R(crate::FieldReader<bool, bool>);
138impl P_OVR_R {
139 #[inline(always)]
140 pub(crate) fn new(bits: bool) -> Self {
141 P_OVR_R(crate::FieldReader::new(bits))
142 }
143}
144impl core::ops::Deref for P_OVR_R {
145 type Target = crate::FieldReader<bool, bool>;
146 #[inline(always)]
147 fn deref(&self) -> &Self::Target {
148 &self.0
149 }
150}
151#[doc = "Field `C_OVR` reader - Codec Datapath Overflow (cleared on read)"]
152pub struct C_OVR_R(crate::FieldReader<bool, bool>);
153impl C_OVR_R {
154 #[inline(always)]
155 pub(crate) fn new(bits: bool) -> Self {
156 C_OVR_R(crate::FieldReader::new(bits))
157 }
158}
159impl core::ops::Deref for C_OVR_R {
160 type Target = crate::FieldReader<bool, bool>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `CRC_ERR` reader - CRC Synchronization Error (cleared on read)"]
167pub struct CRC_ERR_R(crate::FieldReader<bool, bool>);
168impl CRC_ERR_R {
169 #[inline(always)]
170 pub(crate) fn new(bits: bool) -> Self {
171 CRC_ERR_R(crate::FieldReader::new(bits))
172 }
173}
174impl core::ops::Deref for CRC_ERR_R {
175 type Target = crate::FieldReader<bool, bool>;
176 #[inline(always)]
177 fn deref(&self) -> &Self::Target {
178 &self.0
179 }
180}
181#[doc = "Field `FR_OVR` reader - Frame Rate Overrun (cleared on read)"]
182pub struct FR_OVR_R(crate::FieldReader<bool, bool>);
183impl FR_OVR_R {
184 #[inline(always)]
185 pub(crate) fn new(bits: bool) -> Self {
186 FR_OVR_R(crate::FieldReader::new(bits))
187 }
188}
189impl core::ops::Deref for FR_OVR_R {
190 type Target = crate::FieldReader<bool, bool>;
191 #[inline(always)]
192 fn deref(&self) -> &Self::Target {
193 &self.0
194 }
195}
196impl R {
197 #[doc = "Bit 0 - Module Enable"]
198 #[inline(always)]
199 pub fn enable(&self) -> ENABLE_R {
200 ENABLE_R::new((self.bits & 0x01) != 0)
201 }
202 #[doc = "Bit 1 - Module Disable Request has Terminated (cleared on read)"]
203 #[inline(always)]
204 pub fn dis_done(&self) -> DIS_DONE_R {
205 DIS_DONE_R::new(((self.bits >> 1) & 0x01) != 0)
206 }
207 #[doc = "Bit 2 - Module Software Reset Request has Terminated (cleared on read)"]
208 #[inline(always)]
209 pub fn srst(&self) -> SRST_R {
210 SRST_R::new(((self.bits >> 2) & 0x01) != 0)
211 }
212 #[doc = "Bit 8 - Pending Codec Request"]
213 #[inline(always)]
214 pub fn cdc_pnd(&self) -> CDC_PND_R {
215 CDC_PND_R::new(((self.bits >> 8) & 0x01) != 0)
216 }
217 #[doc = "Bit 10 - Vertical Synchronization (cleared on read)"]
218 #[inline(always)]
219 pub fn vsync(&self) -> VSYNC_R {
220 VSYNC_R::new(((self.bits >> 10) & 0x01) != 0)
221 }
222 #[doc = "Bit 16 - Preview DMA Transfer has Terminated (cleared on read)"]
223 #[inline(always)]
224 pub fn pxfr_done(&self) -> PXFR_DONE_R {
225 PXFR_DONE_R::new(((self.bits >> 16) & 0x01) != 0)
226 }
227 #[doc = "Bit 17 - Codec DMA Transfer has Terminated (cleared on read)"]
228 #[inline(always)]
229 pub fn cxfr_done(&self) -> CXFR_DONE_R {
230 CXFR_DONE_R::new(((self.bits >> 17) & 0x01) != 0)
231 }
232 #[doc = "Bit 19 - Synchronization in Progress"]
233 #[inline(always)]
234 pub fn sip(&self) -> SIP_R {
235 SIP_R::new(((self.bits >> 19) & 0x01) != 0)
236 }
237 #[doc = "Bit 24 - Preview Datapath Overflow (cleared on read)"]
238 #[inline(always)]
239 pub fn p_ovr(&self) -> P_OVR_R {
240 P_OVR_R::new(((self.bits >> 24) & 0x01) != 0)
241 }
242 #[doc = "Bit 25 - Codec Datapath Overflow (cleared on read)"]
243 #[inline(always)]
244 pub fn c_ovr(&self) -> C_OVR_R {
245 C_OVR_R::new(((self.bits >> 25) & 0x01) != 0)
246 }
247 #[doc = "Bit 26 - CRC Synchronization Error (cleared on read)"]
248 #[inline(always)]
249 pub fn crc_err(&self) -> CRC_ERR_R {
250 CRC_ERR_R::new(((self.bits >> 26) & 0x01) != 0)
251 }
252 #[doc = "Bit 27 - Frame Rate Overrun (cleared on read)"]
253 #[inline(always)]
254 pub fn fr_ovr(&self) -> FR_OVR_R {
255 FR_OVR_R::new(((self.bits >> 27) & 0x01) != 0)
256 }
257}
258#[doc = "ISI Status 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_sr](index.html) module"]
259pub struct ISI_SR_SPEC;
260impl crate::RegisterSpec for ISI_SR_SPEC {
261 type Ux = u32;
262}
263#[doc = "`read()` method returns [isi_sr::R](R) reader structure"]
264impl crate::Readable for ISI_SR_SPEC {
265 type Reader = R;
266}
267#[doc = "`reset()` method sets ISI_SR to value 0"]
268impl crate::Resettable for ISI_SR_SPEC {
269 #[inline(always)]
270 fn reset_value() -> Self::Ux {
271 0
272 }
273}