Skip to content

Commit 367230c

Browse files
committed
changelog
1 parent 5045b06 commit 367230c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919

2020
### Fixed
2121

22+
- `spi-dma` example pins speed
2223
- Fix alternate function pin definitions for FMPI2C1 [#572]
2324

2425
[#426]: https://github.com/stm32-rs/stm32f4xx-hal/pull/426

examples/spi-dma.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use embedded_hal::spi::{Mode, Phase, Polarity};
1111
use stm32f4xx_hal::pac::interrupt;
1212
use stm32f4xx_hal::{
1313
dma::{config, traits::StreamISR, MemoryToPeripheral, Stream4, StreamsTuple, Transfer},
14+
gpio::Speed,
1415
pac,
1516
prelude::*,
1617
spi::*,
@@ -39,10 +40,14 @@ fn main() -> ! {
3940
let stream = steams.4;
4041

4142
let gpiob = dp.GPIOB.split();
42-
43+
4344
// Note. We set GPIO speed as VeryHigh to it corresponds to SPI frequency 3MHz.
4445
// Otherwise it may lead to the 'wrong last bit in every received byte' problem.
45-
let pb15 = gpiob.pb15.into_alternate().speed(Speed::VeryHigh).internal_pull_up(true);
46+
let pb15 = gpiob
47+
.pb15
48+
.into_alternate()
49+
.speed(Speed::VeryHigh)
50+
.internal_pull_up(true);
4651
let pb13 = gpiob.pb13.into_alternate().speed(Speed::VeryHigh);
4752

4853
let mode = Mode {

0 commit comments

Comments
 (0)