Update hal to 0.9.0

master
Levi Pearson 2022-03-09 03:32:19 -07:00
parent e032084a6c
commit 45dc286f86
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ cortex-m = "0.7.4"
cortex-m-rt = "0.7.1" cortex-m-rt = "0.7.1"
embedded-hal = "0.2.4" embedded-hal = "0.2.4"
nb = "1.0.0" nb = "1.0.0"
stm32f1xx-hal = { version = "0.8.0", features = ["rt", "stm32f103", "medium"] } stm32f1xx-hal = { version = "0.9.0", features = ["rt", "stm32f103", "medium"] }
rtt-target = { version = "0.3.1", features = ["cortex-m"] } rtt-target = { version = "0.3.1", features = ["cortex-m"] }
panic-rtt-target = { version = "0.1.0", features = ["cortex-m"] } panic-rtt-target = { version = "0.1.0", features = ["cortex-m"] }
# alternate panic impls, choose only one! # alternate panic impls, choose only one!

View File

@ -42,7 +42,8 @@ fn main() -> ! {
// in order to configure the port. For pins 0-7, crl should be passed instead. // in order to configure the port. For pins 0-7, crl should be passed instead.
let mut led = gpioc.pc13.into_push_pull_output(&mut gpioc.crh); let mut led = gpioc.pc13.into_push_pull_output(&mut gpioc.crh);
// Configure the syst timer to trigger an update every second // Configure the syst timer to trigger an update every second
let mut timer = Timer::syst(cp.SYST, &clocks).start_count_down(1.hz()); let mut timer = Timer::syst(cp.SYST, &clocks).counter_hz();
timer.start(1.Hz()).unwrap();
rprintln!("Hello, Rust!"); rprintln!("Hello, Rust!");
// Wait for the timer to trigger an update and change the state of the LED // Wait for the timer to trigger an update and change the state of the LED