Skip to content

Commit f655285

Browse files
committed
samples: blinky: Minor cleanups
Remove a bogus commented line of code, and add a comment explaining why the `if false` code remains. Signed-off-by: David Brown <[email protected]>
1 parent 89958c3 commit f655285

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/blinky/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ extern "C" fn rust_main() {
2424

2525
// Invoke "blink" as a user thread.
2626
if false {
27+
// Note that for now, this is just a 'false', but is an easy test to use to see if
28+
// permissions are correct for usermode Rust. At this point, the GPIO won't be accessible,
29+
// and neither will the memory needed for allocation.
2730
unsafe {
2831
zephyr::raw::k_thread_user_mode_enter
2932
(Some(blink),
@@ -57,7 +60,6 @@ fn do_blink() {
5760
warn!("LED is not ready");
5861
loop {
5962
}
60-
// return;
6163
}
6264

6365
unsafe { led0.configure(&mut gpio_token, GPIO_OUTPUT_ACTIVE); }

0 commit comments

Comments
 (0)