bump deps of firmware example

This commit is contained in:
Jorge Aparicio 2022-01-28 13:07:22 +01:00
parent 58eef6bd21
commit 3fdc01849e
2 changed files with 7 additions and 8 deletions

View file

@ -8,12 +8,12 @@ actors = { path = "../actors" }
cortex-m = "0.7.1" cortex-m = "0.7.1"
cortex-m-rt = "0.6.13" cortex-m-rt = "0.6.13"
cortex-m-rtic = { path = "../.." } cortex-m-rtic = { path = "../.." }
defmt = "0.2.0" defmt = "0.3.0"
defmt-rtt = "0.2.0" defmt-rtt = "0.3.1"
nrf52840-hal = "0.12.2" nrf52840-hal = "0.12.2"
panic-probe = { version = "0.2.0", features = ["print-defmt"] } panic-probe = { version = "0.3.0", features = ["print-defmt"] }
rtic-actor-traits = { path = "../../actor-traits" } rtic-actor-traits = { path = "../../actor-traits" }
systick-monotonic = "0.1.0-alpha.0" systick-monotonic = "1"
[features] [features]
# set logging levels here # set logging levels here

View file

@ -8,9 +8,8 @@ mod app {
use actors::{ use actors::{
FakeTemperatureSensor, TemperatureAlert, TemperatureMonitor, TemperatureReadingCelsius, FakeTemperatureSensor, TemperatureAlert, TemperatureMonitor, TemperatureReadingCelsius,
}; };
use rtic::time::duration::*;
use rtic_actor_traits::Receive; use rtic_actor_traits::Receive;
use systick_monotonic::Systick; use systick_monotonic::*;
// configuration // configuration
const TEMPERATURE_THRESHOLD: i32 = 37; const TEMPERATURE_THRESHOLD: i32 = 37;
@ -31,7 +30,7 @@ mod app {
impl Receive<TemperatureReadingCelsius> for TemperatureTracer { impl Receive<TemperatureReadingCelsius> for TemperatureTracer {
fn receive(&mut self, reading: TemperatureReadingCelsius) { fn receive(&mut self, reading: TemperatureReadingCelsius) {
defmt::trace!("temperature: {} C", reading.0); defmt::println!("temperature: {} C", reading.0);
} }
} }
@ -83,7 +82,7 @@ mod app {
#[task(local = [temperature_sensor])] #[task(local = [temperature_sensor])]
fn periodic(cx: periodic::Context) { fn periodic(cx: periodic::Context) {
cx.local.temperature_sensor.read(); cx.local.temperature_sensor.read();
periodic::spawn_after(1.seconds()).expect("OOM"); periodic::spawn_after(1.secs()).expect("OOM");
} }
#[shared] #[shared]