Skip to content

Commit 82da850

Browse files
committed
Fix spi initialization
1 parent 668bae4 commit 82da850

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2424
- `stm32f303` is now split into `stm32f303xd` and `stm32f303xe` as they provide
2525
different alternate gpio functions. `stm32f303` is still available.
2626

27+
### Fixed
28+
29+
- Fixed wrong initialization of the SPI ([#35](https://github.com/stm32-rs/stm32f3xx-hal/pull/18))
2730

2831
## [v0.3.0] - 2019-08-26
2932

src/spi.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,9 @@ macro_rules! hal {
175175
.bit(mode.polarity == Polarity::IdleHigh)
176176
.mstr()
177177
.set_bit()
178-
.br();
179-
180-
unsafe {
181-
w.bits(br);
182-
}
183-
184-
w.spe()
178+
.br()
179+
.bits(br)
180+
.spe()
185181
.set_bit()
186182
.lsbfirst()
187183
.clear_bit()

0 commit comments

Comments
 (0)