aboutsummaryrefslogtreecommitdiff
path: root/examples/lpc55s69
diff options
context:
space:
mode:
authorRoy <[email protected]>2025-07-02 15:24:01 +0300
committerRoi Bachynskyi <[email protected]>2025-07-18 15:22:36 +0300
commit6d79c4c81187d5f2704e2d2f72a3deba05ca449a (patch)
tree0ec84178e5964300d5836908a1054619debdc131 /examples/lpc55s69
parent3e1b0e4aec11888d6ea41ef5c62d6d2912d81eae (diff)
feat: added log-to-defmt feature
Signed-off-by: Roy <[email protected]>
Diffstat (limited to 'examples/lpc55s69')
-rw-r--r--examples/lpc55s69/Cargo.toml4
-rw-r--r--examples/lpc55s69/src/bin/log_to_defmt.rs18
2 files changed, 22 insertions, 0 deletions
diff --git a/examples/lpc55s69/Cargo.toml b/examples/lpc55s69/Cargo.toml
index 6ec6e51a8..7e3b82432 100644
--- a/examples/lpc55s69/Cargo.toml
+++ b/examples/lpc55s69/Cargo.toml
@@ -18,5 +18,9 @@ defmt-rtt = "1.0.0"
18panic-probe = { version = "1.0.0", features = ["print-defmt"] } 18panic-probe = { version = "1.0.0", features = ["print-defmt"] }
19panic-semihosting = "0.6.0" 19panic-semihosting = "0.6.0"
20 20
21[features]
22## To test all-logs mode
23log-to-defmt = ["embassy-nxp/log-to-defmt"]
24
21[profile.release] 25[profile.release]
22debug = 2 26debug = 2
diff --git a/examples/lpc55s69/src/bin/log_to_defmt.rs b/examples/lpc55s69/src/bin/log_to_defmt.rs
new file mode 100644
index 000000000..7aaab5e54
--- /dev/null
+++ b/examples/lpc55s69/src/bin/log_to_defmt.rs
@@ -0,0 +1,18 @@
1/// To test log-to-defmt feature, you have to run the binary file with the corresponding flag
2/// Example: cargo run --bin <file> --feature log-to-defmt
3
4
5#![no_std]
6#![no_main]
7
8use log::*;
9use embassy_executor::Spawner;
10use {defmt_rtt as _, panic_halt as _};
11
12#[embassy_executor::main]
13async fn main(_spawner: Spawner) {
14 info!("Hello World");
15 loop{
16 info!("Another test");
17 }
18}