Skip to content

Commit

Permalink
chore: update flash driver to stm32h7xx-hal 0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Sep 16, 2022
1 parent 83d785a commit f8fe7bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ tmp/
stm32h7x-orig.cfg
stm32h7x-patched-itm.cfg
rust-toolchain
vendor/
2 changes: 1 addition & 1 deletion examples/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn main() -> ! {
dp.GPIOG.split(ccdr.peripheral.GPIOG),
);

let mut led_user = daisy::led::LedUser::new(pins.LED_USER);
let mut led_user = daisy::led::UserLed::new(pins.LED_USER);
let mut flash =
daisy::flash::Flash::new(&ccdr.clocks, dp.QUADSPI, ccdr.peripheral.QSPI, pins.FMC);

Expand Down
14 changes: 7 additions & 7 deletions src/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ impl Flash {
pins: FMCPins,
) -> Self {
// Even though it is not directly used, CS pin must be acquired and configured
let _cs = pins.CS.into_alternate_af10().set_speed(Speed::VeryHigh);
let _cs = pins.CS.into_alternate::<10>().set_speed(Speed::VeryHigh);

let sck = pins.SCK.into_alternate_af9().set_speed(Speed::VeryHigh);
let io0 = pins.IO0.into_alternate_af10().set_speed(Speed::VeryHigh);
let io1 = pins.IO1.into_alternate_af10().set_speed(Speed::VeryHigh);
let io2 = pins.IO2.into_alternate_af9().set_speed(Speed::VeryHigh);
let io3 = pins.IO3.into_alternate_af9().set_speed(Speed::VeryHigh);
let sck = pins.SCK.into_alternate().speed(Speed::VeryHigh);
let io0 = pins.IO0.into_alternate().speed(Speed::VeryHigh);
let io1 = pins.IO1.into_alternate().speed(Speed::VeryHigh);
let io2 = pins.IO2.into_alternate().speed(Speed::VeryHigh);
let io3 = pins.IO3.into_alternate().speed(Speed::VeryHigh);

let qspi = qspi_device.bank1(
(sck, io0, io1, io2, io3),
Config::new(133.mhz()).mode(QspiMode::OneBit),
Config::new(133.MHz()).mode(QspiMode::OneBit),
clocks,
qspi_peripheral,
);
Expand Down

0 comments on commit f8fe7bd

Please sign in to comment.