From abc50d2c58ef3470c67269a93a7f31fcd36bcea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 25 Sep 2020 13:36:00 +0000 Subject: [PATCH] Name collision with RTIC-main With modules the scoping is different and task names collide with main generated by RTIC --- examples/peripherals-taken.rs | 2 +- examples/t-htask-main.rs | 2 +- examples/t-idle-main.rs | 2 +- examples/t-init-main.rs | 2 +- examples/t-stask-main.rs | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/peripherals-taken.rs b/examples/peripherals-taken.rs index b9267df62f..10bc26036e 100644 --- a/examples/peripherals-taken.rs +++ b/examples/peripherals-taken.rs @@ -9,7 +9,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965)] mod app { #[init] - fn main(_: main::Context) { + fn taskmain(_: taskmain::Context) { assert!(cortex_m::Peripherals::take().is_none()); debug::exit(debug::EXIT_SUCCESS); } diff --git a/examples/t-htask-main.rs b/examples/t-htask-main.rs index 1954d56da0..998252e1f7 100644 --- a/examples/t-htask-main.rs +++ b/examples/t-htask-main.rs @@ -14,7 +14,7 @@ mod app { } #[task(binds = UART0)] - fn main(_: main::Context) { + fn taskmain(_: taskmain::Context) { debug::exit(debug::EXIT_SUCCESS); } } diff --git a/examples/t-idle-main.rs b/examples/t-idle-main.rs index 8400f31454..03a52cb26e 100644 --- a/examples/t-idle-main.rs +++ b/examples/t-idle-main.rs @@ -12,7 +12,7 @@ mod app { fn init(_: init::Context) {} #[idle] - fn main(_: main::Context) -> ! { + fn taskmain(_: taskmain::Context) -> ! { debug::exit(debug::EXIT_SUCCESS); loop { cortex_m::asm::nop(); diff --git a/examples/t-init-main.rs b/examples/t-init-main.rs index b4f126ba92..d0814877b5 100644 --- a/examples/t-init-main.rs +++ b/examples/t-init-main.rs @@ -9,7 +9,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965)] mod app { #[init] - fn main(_: main::Context) { + fn taskmain(_: taskmain::Context) { debug::exit(debug::EXIT_SUCCESS); } } diff --git a/examples/t-stask-main.rs b/examples/t-stask-main.rs index 373b505c92..3e650f603a 100644 --- a/examples/t-stask-main.rs +++ b/examples/t-stask-main.rs @@ -8,13 +8,13 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965)] mod app { - #[init(spawn = [main])] + #[init(spawn = [taskmain])] fn init(cx: init::Context) { - cx.spawn.main().ok(); + cx.spawn.taskmain().ok(); } #[task] - fn main(_: main::Context) { + fn taskmain(_: taskmain::Context) { debug::exit(debug::EXIT_SUCCESS); }