stm32f3_blinky: update to latest version

This commit is contained in:
datdenkikniet 2023-04-14 22:05:31 +02:00
parent dc02818ef1
commit 0411ed10b1
2 changed files with 15 additions and 5 deletions

View file

@ -5,10 +5,20 @@ readme = "README.md"
name = "stm32f3-blinky"
version = "0.1.0"
[workspace]
[dependencies.rtic]
path = "../../rtic"
version = "2.0.0-alhpa.1"
features = ["thumbv7-backend"]
[dependencies.rtic-monotonics]
path = "../../rtic-monotonics"
version = "1.0.0-alhpa.1"
features = ["cortex-m-systick"]
[dependencies]
embedded-hal = "0.2.7"
rtic = { git = "https://github.com/rtic-rs/rtic", features = ["thumbv7-backend"] }
rtic-monotonics = { git = "https://github.com/rtic-rs/rtic", features = ["cortex-m-systick"] }
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] }
rtt-target = { version = "0.3.1", features = ["cortex-m"] }

View file

@ -15,8 +15,6 @@ use stm32f3xx_hal::prelude::*;
mod app {
use super::*;
rtic_monotonics::make_systick_handler!();
#[shared]
struct Shared {}
@ -32,7 +30,9 @@ mod app {
let mut flash = cx.device.FLASH.constrain();
let mut rcc = cx.device.RCC.constrain();
Systick::start(cx.core.SYST, 36_000_000); // default STM32F303 clock-rate is 36MHz
// Initialize the systick interrupt & obtain the token to prove that we did
let systick_mono_token = rtic_monotonics::create_systick_token!();
Systick::start(cx.core.SYST, 36_000_000, systick_mono_token); // default STM32F303 clock-rate is 36MHz
rtt_init_print!();
rprintln!("init");