Skip to content

Commit 27f9831

Browse files
committed
Use logging macros in the hello-rust example
1 parent f77ff63 commit 27f9831

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/flipperzero/examples/hello-rust.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ extern crate flipperzero_rt;
1111
#[cfg(feature = "alloc")]
1212
extern crate flipperzero_alloc;
1313

14-
use flipperzero::println;
14+
use flipperzero::{debug, info, println};
1515
use flipperzero_rt::{entry, manifest};
1616

1717
// Define the FAP Manifest for this application
@@ -28,7 +28,10 @@ entry!(main);
2828

2929
// Entry point
3030
fn main(_args: *mut u8) -> i32 {
31+
info!("Hello, reader of the logs!");
3132
println!("Hello, {}!", "Rust");
3233

33-
0
34+
let ret_code = 0;
35+
debug!("Return code: %d", ret_code);
36+
ret_code
3437
}

0 commit comments

Comments
 (0)