aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Fresk <emil.fresk@gmail.com>2021-05-23 14:11:51 +0200
committerEmil Fresk <emil.fresk@gmail.com>2021-05-23 14:11:51 +0200
commit6155f1366a654512c2ca69b91fb2470c4faf3399 (patch)
treefd0d4319bef92305394c6ba32b6f672dd5ced047
parentb4509bdbfe7cd5accf4c6b791a18ca55183a4993 (diff)
Minor cleanup
-rw-r--r--Cargo.toml11
-rw-r--r--examples/schedule.rs14
-rw-r--r--macros/Cargo.toml2
3 files changed, 16 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 08a1813..eb86d84 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 b89e519..bb5119c 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<MONO_HZ>;
#[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 6440805..bf8ff29 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