py32f0/py32f040/wwdg/
sr.rs1pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16pub struct W(crate::W<SR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<SR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37pub type EWIF_R = crate::BitReader<EWIFR_A>;
39#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum EWIFR_A {
44 Finished = 0,
46 Pending = 1,
48}
49impl From<EWIFR_A> for bool {
50 #[inline(always)]
51 fn from(variant: EWIFR_A) -> Self {
52 variant as u8 != 0
53 }
54}
55impl EWIF_R {
56 #[inline(always)]
58 pub fn variant(&self) -> EWIFR_A {
59 match self.bits {
60 false => EWIFR_A::Finished,
61 true => EWIFR_A::Pending,
62 }
63 }
64 #[inline(always)]
66 pub fn is_finished(&self) -> bool {
67 *self == EWIFR_A::Finished
68 }
69 #[inline(always)]
71 pub fn is_pending(&self) -> bool {
72 *self == EWIFR_A::Pending
73 }
74}
75#[derive(Clone, Copy, Debug, PartialEq, Eq)]
79pub enum EWIFW_AW {
80 Finished = 0,
82}
83impl From<EWIFW_AW> for bool {
84 #[inline(always)]
85 fn from(variant: EWIFW_AW) -> Self {
86 variant as u8 != 0
87 }
88}
89pub type EWIF_W<'a, const O: u8> = crate::BitWriter0C<'a, u32, SR_SPEC, EWIFW_AW, O>;
91impl<'a, const O: u8> EWIF_W<'a, O> {
92 #[inline(always)]
94 pub fn finished(self) -> &'a mut W {
95 self.variant(EWIFW_AW::Finished)
96 }
97}
98impl R {
99 #[inline(always)]
101 pub fn ewif(&self) -> EWIF_R {
102 EWIF_R::new((self.bits & 1) != 0)
103 }
104}
105impl W {
106 #[inline(always)]
108 #[must_use]
109 pub fn ewif(&mut self) -> EWIF_W<0> {
110 EWIF_W::new(self)
111 }
112 #[inline(always)]
114 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
115 self.0.bits(bits);
116 self
117 }
118}
119pub struct SR_SPEC;
125impl crate::RegisterSpec for SR_SPEC {
126 type Ux = u32;
127}
128impl crate::Readable for SR_SPEC {
130 type Reader = R;
131}
132impl crate::Writable for SR_SPEC {
134 type Writer = W;
135 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x01;
136 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
137}
138impl crate::Resettable for SR_SPEC {
140 const RESET_VALUE: Self::Ux = 0;
141}