aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32f4-examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-02-26 00:30:00 +0100
committerGitHub <[email protected]>2021-02-26 00:30:00 +0100
commitde796d3e80cb7af24bcf4c9cc0f8167bfa93cc84 (patch)
tree1447fd25a47ad4a57a1eded409f9520111cff308 /embassy-stm32f4-examples
parentd4a97ac3ed79272fbded607c5f7dc1d745fc2b66 (diff)
parent2893fb37331ec4196cc37ae36fa121d0eee73383 (diff)
Merge pull request #53 from fnafnio/defmt-update
update defmt and defmt-rtt to 0.2.0
Diffstat (limited to 'embassy-stm32f4-examples')
-rw-r--r--embassy-stm32f4-examples/.cargo/config2
-rw-r--r--embassy-stm32f4-examples/Cargo.toml4
-rw-r--r--embassy-stm32f4-examples/src/example_common.rs14
3 files changed, 10 insertions, 10 deletions
diff --git a/embassy-stm32f4-examples/.cargo/config b/embassy-stm32f4-examples/.cargo/config
index 836853988..3ccca879d 100644
--- a/embassy-stm32f4-examples/.cargo/config
+++ b/embassy-stm32f4-examples/.cargo/config
@@ -1,5 +1,5 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2runner = "probe-run --chip STM32F401CCUx --defmt" 2runner = "probe-run --chip STM32F401CCUx"
3 3
4rustflags = [ 4rustflags = [
5 # LLD (shipped with the Rust toolchain) is used as the default linker 5 # LLD (shipped with the Rust toolchain) is used as the default linker
diff --git a/embassy-stm32f4-examples/Cargo.toml b/embassy-stm32f4-examples/Cargo.toml
index 216964374..3e117ecb0 100644
--- a/embassy-stm32f4-examples/Cargo.toml
+++ b/embassy-stm32f4-examples/Cargo.toml
@@ -20,8 +20,8 @@ defmt-error = []
20embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] } 20embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] }
21embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4", features = ["stm32f401"] } 21embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4", features = ["stm32f401"] }
22 22
23defmt = "0.1.3" 23defmt = "0.2.0"
24defmt-rtt = "0.1.0" 24defmt-rtt = "0.2.0"
25 25
26cortex-m = "0.7.1" 26cortex-m = "0.7.1"
27cortex-m-rt = "0.6.13" 27cortex-m-rt = "0.6.13"
diff --git a/embassy-stm32f4-examples/src/example_common.rs b/embassy-stm32f4-examples/src/example_common.rs
index ff4d8575e..54d633837 100644
--- a/embassy-stm32f4-examples/src/example_common.rs
+++ b/embassy-stm32f4-examples/src/example_common.rs
@@ -7,11 +7,11 @@ pub use defmt::*;
7 7
8use core::sync::atomic::{AtomicUsize, Ordering}; 8use core::sync::atomic::{AtomicUsize, Ordering};
9 9
10#[defmt::timestamp] 10defmt::timestamp! {"{=u64}", {
11fn timestamp() -> u64 { 11 static COUNT: AtomicUsize = AtomicUsize::new(0);
12 static COUNT: AtomicUsize = AtomicUsize::new(0); 12 // NOTE(no-CAS) `timestamps` runs with interrupts disabled
13 // NOTE(no-CAS) `timestamps` runs with interrupts disabled 13 let n = COUNT.load(Ordering::Relaxed);
14 let n = COUNT.load(Ordering::Relaxed); 14 COUNT.store(n + 1, Ordering::Relaxed);
15 COUNT.store(n + 1, Ordering::Relaxed); 15 n as u64
16 n as u64 16 }
17} 17}