mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
properly handle #[cfg] (conditional compilation) on tasks
This commit is contained in:
parent
4345c10596
commit
8e9a91d0b0
4 changed files with 72 additions and 20 deletions
|
|
@ -30,18 +30,22 @@ const APP: () = {
|
|||
loop {}
|
||||
}
|
||||
|
||||
#[task(resources = [FOO])]
|
||||
#[task(resources = [FOO], schedule = [quux], spawn = [quux])]
|
||||
fn foo() {
|
||||
#[cfg(never)]
|
||||
static mut BAR: u32 = 0;
|
||||
}
|
||||
|
||||
#[task(priority = 3, resources = [FOO])]
|
||||
#[task(priority = 3, resources = [FOO], schedule = [quux], spawn = [quux])]
|
||||
fn bar() {
|
||||
#[cfg(never)]
|
||||
static mut BAR: u32 = 0;
|
||||
}
|
||||
|
||||
#[cfg(never)]
|
||||
#[task]
|
||||
fn quux() {}
|
||||
|
||||
extern "C" {
|
||||
fn UART0();
|
||||
fn UART1();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue