diff --git a/Cargo.toml b/Cargo.toml index 08a1813403..eb86d84436 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ name = "cortex-m-rtic" readme = "README.md" repository = "https://github.com/rtic-rs/cortex-m-rtic" -version = "0.6.0-alpha.2" +version = "0.6.0-alpha.3" [lib] name = "rtic" @@ -53,15 +53,17 @@ required-features = ["__v7"] [dependencies] cortex-m = "0.7.0" -cortex-m-rtic-macros = { path = "macros", version = "0.6.0-alpha.2" } -rtic-monotonic = "0.1.0-alpha.0" +cortex-m-rtic-macros = { path = "macros", version = "0.6.0-alpha.3" } +# rtic-monotonic = "0.1.0-alpha.1" +rtic-monotonic = { path = "../rtic-monotonic" } rtic-core = "0.3.1" heapless = "0.6.1" bare-metal = "1.0.0" generic-array = "0.14" [dependencies.dwt-systick-monotonic] -version = "0.1.0-alpha.0" +# version = "0.1.0-alpha.2" +path = "../dwt-systick-monotonic" optional = true [build-dependencies] @@ -110,3 +112,4 @@ overflow-checks = false [patch.crates-io] lm3s6965 = { git = "https://github.com/japaric/lm3s6965" } +# embedded-time = { path = "../../embedded-time" } diff --git a/examples/schedule.rs b/examples/schedule.rs index b89e51918d..bb5119c20a 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -14,8 +14,10 @@ mod app { use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; + const MONO_HZ: u32 = 8_000_000; // 8 MHz + #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick<8_000_000>; // 8 MHz + type MyMono = DwtSystick; #[init()] fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) { @@ -25,24 +27,24 @@ mod app { let mono = DwtSystick::new(&mut dcb, dwt, systick, 8_000_000); - hprintln!("init").unwrap(); + hprintln!("init").ok(); // Schedule `foo` to run 1 second in the future - foo::spawn_after(Seconds(1_u32)).unwrap(); + foo::spawn_after(Seconds(1_u32)).ok(); // Schedule `bar` to run 2 seconds in the future - bar::spawn_after(Seconds(2_u32)).unwrap(); + bar::spawn_after(Seconds(2_u32)).ok(); (init::LateResources {}, init::Monotonics(mono)) } #[task] fn foo(_: foo::Context) { - hprintln!("foo").unwrap(); + hprintln!("foo").ok(); } #[task] fn bar(_: bar::Context) { - hprintln!("bar").unwrap(); + hprintln!("bar").ok(); } } diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 6440805a43..bf8ff29bc0 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0" name = "cortex-m-rtic-macros" readme = "../README.md" repository = "https://github.com/rtic-rs/cortex-m-rtic" -version = "0.6.0-alpha.2" +version = "0.6.0-alpha.3" [lib] proc-macro = true