stm32f7_staging/stm32f733/crc/
cr.rs1pub type W = crate::W<CRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum RESETW {
9 Reset = 1,
11}
12impl From<RESETW> for bool {
13 #[inline(always)]
14 fn from(variant: RESETW) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type RESET_W<'a, REG> = crate::BitWriter<'a, REG, RESETW>;
20impl<'a, REG> RESET_W<'a, REG>
21where
22 REG: crate::Writable + crate::RegisterSpec,
23{
24 #[inline(always)]
26 pub fn reset(self) -> &'a mut crate::W<REG> {
27 self.variant(RESETW::Reset)
28 }
29}
30#[cfg_attr(feature = "defmt", derive(defmt::Format))]
34#[derive(Clone, Copy, Debug, PartialEq, Eq)]
35#[repr(u8)]
36pub enum POLYSIZE {
37 Polysize32 = 0,
39 Polysize16 = 1,
41 Polysize8 = 2,
43 Polysize7 = 3,
45}
46impl From<POLYSIZE> for u8 {
47 #[inline(always)]
48 fn from(variant: POLYSIZE) -> Self {
49 variant as _
50 }
51}
52impl crate::FieldSpec for POLYSIZE {
53 type Ux = u8;
54}
55impl crate::IsEnum for POLYSIZE {}
56pub type POLYSIZE_W<'a, REG> = crate::FieldWriter<'a, REG, 2, POLYSIZE, crate::Safe>;
58impl<'a, REG> POLYSIZE_W<'a, REG>
59where
60 REG: crate::Writable + crate::RegisterSpec,
61 REG::Ux: From<u8>,
62{
63 #[inline(always)]
65 pub fn polysize32(self) -> &'a mut crate::W<REG> {
66 self.variant(POLYSIZE::Polysize32)
67 }
68 #[inline(always)]
70 pub fn polysize16(self) -> &'a mut crate::W<REG> {
71 self.variant(POLYSIZE::Polysize16)
72 }
73 #[inline(always)]
75 pub fn polysize8(self) -> &'a mut crate::W<REG> {
76 self.variant(POLYSIZE::Polysize8)
77 }
78 #[inline(always)]
80 pub fn polysize7(self) -> &'a mut crate::W<REG> {
81 self.variant(POLYSIZE::Polysize7)
82 }
83}
84#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88#[derive(Clone, Copy, Debug, PartialEq, Eq)]
89#[repr(u8)]
90pub enum REV_IN {
91 Normal = 0,
93 Byte = 1,
95 HalfWord = 2,
97 Word = 3,
99}
100impl From<REV_IN> for u8 {
101 #[inline(always)]
102 fn from(variant: REV_IN) -> Self {
103 variant as _
104 }
105}
106impl crate::FieldSpec for REV_IN {
107 type Ux = u8;
108}
109impl crate::IsEnum for REV_IN {}
110pub type REV_IN_W<'a, REG> = crate::FieldWriter<'a, REG, 2, REV_IN, crate::Safe>;
112impl<'a, REG> REV_IN_W<'a, REG>
113where
114 REG: crate::Writable + crate::RegisterSpec,
115 REG::Ux: From<u8>,
116{
117 #[inline(always)]
119 pub fn normal(self) -> &'a mut crate::W<REG> {
120 self.variant(REV_IN::Normal)
121 }
122 #[inline(always)]
124 pub fn byte(self) -> &'a mut crate::W<REG> {
125 self.variant(REV_IN::Byte)
126 }
127 #[inline(always)]
129 pub fn half_word(self) -> &'a mut crate::W<REG> {
130 self.variant(REV_IN::HalfWord)
131 }
132 #[inline(always)]
134 pub fn word(self) -> &'a mut crate::W<REG> {
135 self.variant(REV_IN::Word)
136 }
137}
138#[cfg_attr(feature = "defmt", derive(defmt::Format))]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143pub enum REV_OUT {
144 Normal = 0,
146 Reversed = 1,
148}
149impl From<REV_OUT> for bool {
150 #[inline(always)]
151 fn from(variant: REV_OUT) -> Self {
152 variant as u8 != 0
153 }
154}
155pub type REV_OUT_W<'a, REG> = crate::BitWriter<'a, REG, REV_OUT>;
157impl<'a, REG> REV_OUT_W<'a, REG>
158where
159 REG: crate::Writable + crate::RegisterSpec,
160{
161 #[inline(always)]
163 pub fn normal(self) -> &'a mut crate::W<REG> {
164 self.variant(REV_OUT::Normal)
165 }
166 #[inline(always)]
168 pub fn reversed(self) -> &'a mut crate::W<REG> {
169 self.variant(REV_OUT::Reversed)
170 }
171}
172impl core::fmt::Debug for crate::generic::Reg<CRrs> {
173 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
174 write!(f, "(not readable)")
175 }
176}
177impl W {
178 #[inline(always)]
180 pub fn reset(&mut self) -> RESET_W<CRrs> {
181 RESET_W::new(self, 0)
182 }
183 #[inline(always)]
185 pub fn polysize(&mut self) -> POLYSIZE_W<CRrs> {
186 POLYSIZE_W::new(self, 3)
187 }
188 #[inline(always)]
190 pub fn rev_in(&mut self) -> REV_IN_W<CRrs> {
191 REV_IN_W::new(self, 5)
192 }
193 #[inline(always)]
195 pub fn rev_out(&mut self) -> REV_OUT_W<CRrs> {
196 REV_OUT_W::new(self, 7)
197 }
198}
199pub struct CRrs;
205impl crate::RegisterSpec for CRrs {
206 type Ux = u32;
207}
208impl crate::Writable for CRrs {
210 type Safety = crate::Unsafe;
211}
212impl crate::Resettable for CRrs {}