Skip to content

Commit ea145a2

Browse files
committed
Fixed an error with SPI on H7
1 parent 59eda96 commit ea145a2

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stm32-hal2"
3-
version = "1.8.1"
3+
version = "1.8.2"
44
authors = ["David O'Connor <david.alan.oconnor@gmail.com>"]
55
description = "Hardware abstraction layer for the STM32 MCUs"
66
keywords = ["no-std", "stm32", "embedded", "embedded-hal"]

src/clocks/h.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,8 @@ impl Clocks {
665665

666666
// todo: Add config enums for these, and add them as Clocks fields.
667667
#[cfg(not(any(feature = "h7b3", feature = "h5")))]
668-
rcc.d2ccip2r.modify(|_, w| unsafe {
669-
w.usbsel().bits(self.usb_src as u8)
670-
});
668+
rcc.d2ccip2r
669+
.modify(|_, w| unsafe { w.usbsel().bits(self.usb_src as u8) });
671670

672671
#[cfg(not(any(feature = "h7b3", feature = "h5")))]
673672
rcc.d3ccipr.modify(|_, w| unsafe {

src/rng.rs

-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@ pub fn reading_ready() -> bool {
7474
let regs = unsafe { &(*RNG::ptr()) };
7575
regs.sr.read().drdy().bit_is_set()
7676
}
77-

src/spi/h.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ where
243243

244244
// Continue filling write FIFO and emptying read FIFO
245245
for word in write {
246-
let _ = self.exchange_duplex(*word);
246+
let _ = self.exchange(*word);
247247
}
248248

249249
// Dummy read from the read FIFO
@@ -269,7 +269,7 @@ where
269269
for i in FIFO_LEN..len + FIFO_LEN {
270270
if i < len {
271271
// Continue filling write FIFO and emptying read FIFO
272-
let read_value = self.exchange_duplex(words[i])?;
272+
let read_value = self.exchange(words[i])?;
273273

274274
words[i - FIFO_LEN] = read_value;
275275
} else {

0 commit comments

Comments
 (0)