stm32f7_staging/stm32f779/dcmi/
ris.rs1pub type R = crate::R<RISrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum FRAME_RIS {
9 NoNewCapture = 0,
11 FrameCaptured = 1,
13}
14impl From<FRAME_RIS> for bool {
15 #[inline(always)]
16 fn from(variant: FRAME_RIS) -> Self {
17 variant as u8 != 0
18 }
19}
20pub type FRAME_RIS_R = crate::BitReader<FRAME_RIS>;
22impl FRAME_RIS_R {
23 #[inline(always)]
25 pub const fn variant(&self) -> FRAME_RIS {
26 match self.bits {
27 false => FRAME_RIS::NoNewCapture,
28 true => FRAME_RIS::FrameCaptured,
29 }
30 }
31 #[inline(always)]
33 pub fn is_no_new_capture(&self) -> bool {
34 *self == FRAME_RIS::NoNewCapture
35 }
36 #[inline(always)]
38 pub fn is_frame_captured(&self) -> bool {
39 *self == FRAME_RIS::FrameCaptured
40 }
41}
42#[cfg_attr(feature = "defmt", derive(defmt::Format))]
46#[derive(Clone, Copy, Debug, PartialEq, Eq)]
47pub enum OVR_RIS {
48 NoOverrun = 0,
50 OverrunOccured = 1,
52}
53impl From<OVR_RIS> for bool {
54 #[inline(always)]
55 fn from(variant: OVR_RIS) -> Self {
56 variant as u8 != 0
57 }
58}
59pub type OVR_RIS_R = crate::BitReader<OVR_RIS>;
61impl OVR_RIS_R {
62 #[inline(always)]
64 pub const fn variant(&self) -> OVR_RIS {
65 match self.bits {
66 false => OVR_RIS::NoOverrun,
67 true => OVR_RIS::OverrunOccured,
68 }
69 }
70 #[inline(always)]
72 pub fn is_no_overrun(&self) -> bool {
73 *self == OVR_RIS::NoOverrun
74 }
75 #[inline(always)]
77 pub fn is_overrun_occured(&self) -> bool {
78 *self == OVR_RIS::OverrunOccured
79 }
80}
81#[cfg_attr(feature = "defmt", derive(defmt::Format))]
85#[derive(Clone, Copy, Debug, PartialEq, Eq)]
86pub enum ERR_RIS {
87 NoError = 0,
89 SynchronizationError = 1,
91}
92impl From<ERR_RIS> for bool {
93 #[inline(always)]
94 fn from(variant: ERR_RIS) -> Self {
95 variant as u8 != 0
96 }
97}
98pub type ERR_RIS_R = crate::BitReader<ERR_RIS>;
100impl ERR_RIS_R {
101 #[inline(always)]
103 pub const fn variant(&self) -> ERR_RIS {
104 match self.bits {
105 false => ERR_RIS::NoError,
106 true => ERR_RIS::SynchronizationError,
107 }
108 }
109 #[inline(always)]
111 pub fn is_no_error(&self) -> bool {
112 *self == ERR_RIS::NoError
113 }
114 #[inline(always)]
116 pub fn is_synchronization_error(&self) -> bool {
117 *self == ERR_RIS::SynchronizationError
118 }
119}
120#[cfg_attr(feature = "defmt", derive(defmt::Format))]
124#[derive(Clone, Copy, Debug, PartialEq, Eq)]
125pub enum VSYNC_RIS {
126 Cleared = 0,
128 Set = 1,
130}
131impl From<VSYNC_RIS> for bool {
132 #[inline(always)]
133 fn from(variant: VSYNC_RIS) -> Self {
134 variant as u8 != 0
135 }
136}
137pub type VSYNC_RIS_R = crate::BitReader<VSYNC_RIS>;
139impl VSYNC_RIS_R {
140 #[inline(always)]
142 pub const fn variant(&self) -> VSYNC_RIS {
143 match self.bits {
144 false => VSYNC_RIS::Cleared,
145 true => VSYNC_RIS::Set,
146 }
147 }
148 #[inline(always)]
150 pub fn is_cleared(&self) -> bool {
151 *self == VSYNC_RIS::Cleared
152 }
153 #[inline(always)]
155 pub fn is_set(&self) -> bool {
156 *self == VSYNC_RIS::Set
157 }
158}
159#[cfg_attr(feature = "defmt", derive(defmt::Format))]
163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
164pub enum LINE_RIS {
165 Cleared = 0,
167 Set = 1,
169}
170impl From<LINE_RIS> for bool {
171 #[inline(always)]
172 fn from(variant: LINE_RIS) -> Self {
173 variant as u8 != 0
174 }
175}
176pub type LINE_RIS_R = crate::BitReader<LINE_RIS>;
178impl LINE_RIS_R {
179 #[inline(always)]
181 pub const fn variant(&self) -> LINE_RIS {
182 match self.bits {
183 false => LINE_RIS::Cleared,
184 true => LINE_RIS::Set,
185 }
186 }
187 #[inline(always)]
189 pub fn is_cleared(&self) -> bool {
190 *self == LINE_RIS::Cleared
191 }
192 #[inline(always)]
194 pub fn is_set(&self) -> bool {
195 *self == LINE_RIS::Set
196 }
197}
198impl R {
199 #[inline(always)]
201 pub fn frame_ris(&self) -> FRAME_RIS_R {
202 FRAME_RIS_R::new((self.bits & 1) != 0)
203 }
204 #[inline(always)]
206 pub fn ovr_ris(&self) -> OVR_RIS_R {
207 OVR_RIS_R::new(((self.bits >> 1) & 1) != 0)
208 }
209 #[inline(always)]
211 pub fn err_ris(&self) -> ERR_RIS_R {
212 ERR_RIS_R::new(((self.bits >> 2) & 1) != 0)
213 }
214 #[inline(always)]
216 pub fn vsync_ris(&self) -> VSYNC_RIS_R {
217 VSYNC_RIS_R::new(((self.bits >> 3) & 1) != 0)
218 }
219 #[inline(always)]
221 pub fn line_ris(&self) -> LINE_RIS_R {
222 LINE_RIS_R::new(((self.bits >> 4) & 1) != 0)
223 }
224}
225impl core::fmt::Debug for R {
226 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
227 f.debug_struct("RIS")
228 .field("line_ris", &self.line_ris())
229 .field("vsync_ris", &self.vsync_ris())
230 .field("err_ris", &self.err_ris())
231 .field("ovr_ris", &self.ovr_ris())
232 .field("frame_ris", &self.frame_ris())
233 .finish()
234 }
235}
236pub struct RISrs;
242impl crate::RegisterSpec for RISrs {
243 type Ux = u32;
244}
245impl crate::Readable for RISrs {}
247impl crate::Resettable for RISrs {}