Skip to content

Commit c38d76b

Browse files
committed
Fixed crc on l4
1 parent 11786f2 commit c38d76b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/crc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ impl Crc {
7676
}
7777

7878
// writing to INIT sets DR to its value
79-
#[cfg(not(feature = "h7"))]
79+
#[cfg(not(any(feature = "h7", feature = "l4")))]
8080
self.regs
8181
.init
8282
.write(|w| unsafe { w.crc_init().bits(config.initial) });
83-
#[cfg(feature = "h7")]
83+
#[cfg(any(feature = "h7", feature = "l4"))]
8484
self.regs
8585
.init
8686
.write(|w| unsafe { w.init().bits(config.initial) });
@@ -152,9 +152,9 @@ impl Crc {
152152
/// Read the CRC without applying output XOR.
153153
#[inline(always)]
154154
fn read_crc_no_xor(&self) -> u32 {
155-
#[cfg(not(feature = "h7"))]
155+
#[cfg(not(any(feature = "h7", feature = "l4")))]
156156
return self.regs.dr.read().dr().bits();
157-
#[cfg(feature = "h7")]
157+
#[cfg(any(feature = "h7", feature = "l4"))]
158158
return self.regs.dr().read().dr().bits();
159159
}
160160

0 commit comments

Comments
 (0)