mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
stm32f3_blinky: update to latest version
This commit is contained in:
parent
dc02818ef1
commit
0411ed10b1
2 changed files with 15 additions and 5 deletions
|
@ -5,10 +5,20 @@ readme = "README.md"
|
||||||
name = "stm32f3-blinky"
|
name = "stm32f3-blinky"
|
||||||
version = "0.1.0"
|
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]
|
[dependencies]
|
||||||
embedded-hal = "0.2.7"
|
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"] }
|
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] }
|
||||||
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
|
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,6 @@ use stm32f3xx_hal::prelude::*;
|
||||||
mod app {
|
mod app {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
rtic_monotonics::make_systick_handler!();
|
|
||||||
|
|
||||||
#[shared]
|
#[shared]
|
||||||
struct Shared {}
|
struct Shared {}
|
||||||
|
|
||||||
|
@ -32,7 +30,9 @@ mod app {
|
||||||
let mut flash = cx.device.FLASH.constrain();
|
let mut flash = cx.device.FLASH.constrain();
|
||||||
let mut rcc = cx.device.RCC.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!();
|
rtt_init_print!();
|
||||||
rprintln!("init");
|
rprintln!("init");
|
||||||
|
|
Loading…
Reference in a new issue