mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Name collision with RTIC-main
With modules the scoping is different and task names collide with main generated by RTIC
This commit is contained in:
parent
224e1991e0
commit
abc50d2c58
5 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ mod app {
|
|||
}
|
||||
|
||||
#[task(binds = UART0)]
|
||||
fn main(_: main::Context) {
|
||||
fn taskmain(_: taskmain::Context) {
|
||||
debug::exit(debug::EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue