mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-01 16:04:33 +01:00
Remove flags, updates UI tests
This commit is contained in:
parent
26870ae12e
commit
210197d079
8 changed files with 18 additions and 64 deletions
37
Cargo.toml
37
Cargo.toml
|
@ -18,38 +18,6 @@ version = "0.6.0-alpha.0"
|
||||||
[lib]
|
[lib]
|
||||||
name = "rtic"
|
name = "rtic"
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "periodic"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "pool"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "schedule"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "t-cfg"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "t-cfg-resources"
|
|
||||||
required-features = ["__min_r1_43"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "t-schedule"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "types"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "double_schedule"
|
|
||||||
required-features = ["__v7"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cortex-m = "0.7.0"
|
cortex-m = "0.7.0"
|
||||||
cortex-m-rtic-macros = { path = "macros", version = "0.6.0-alpha.0" }
|
cortex-m-rtic-macros = { path = "macros", version = "0.6.0-alpha.0" }
|
||||||
|
@ -74,11 +42,6 @@ version = "0.5.2"
|
||||||
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
[target.x86_64-unknown-linux-gnu.dev-dependencies]
|
||||||
trybuild = "1"
|
trybuild = "1"
|
||||||
|
|
||||||
[features]
|
|
||||||
# used for testing this crate; do not use in applications
|
|
||||||
__v7 =[]
|
|
||||||
__min_r1_43 =[]
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
lto = true
|
lto = true
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#![no_main]
|
|
||||||
|
|
||||||
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
|
|
||||||
mod app {
|
|
||||||
#[task(binds = SysTick)]
|
|
||||||
fn sys_tick(_: sys_tick::Context) {}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
error: this exception can't be used because it's being used by the runtime
|
|
||||||
--> $DIR/exception-systick-used.rs:6:8
|
|
||||||
|
|
|
||||||
6 | fn sys_tick(_: sys_tick::Context) {}
|
|
||||||
| ^^^^^^^^
|
|
|
@ -26,15 +26,18 @@ mod app {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> init::LateResources {
|
fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
|
||||||
rtic::pend(Interrupt::UART0);
|
rtic::pend(Interrupt::UART0);
|
||||||
rtic::pend(Interrupt::UART1);
|
rtic::pend(Interrupt::UART1);
|
||||||
|
(
|
||||||
init::LateResources {
|
init::LateResources {
|
||||||
#[cfg(feature = "feature_l2")]
|
#[cfg(feature = "feature_l2")]
|
||||||
l2: 2,
|
l2: 2,
|
||||||
#[cfg(not(feature = "feature_l2"))]
|
#[cfg(not(feature = "feature_l2"))]
|
||||||
l2: 5,
|
l2: 5,
|
||||||
}
|
},
|
||||||
|
init::Monotonics(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// l1 ok (task_local)
|
// l1 ok (task_local)
|
||||||
|
|
|
@ -39,10 +39,10 @@ mod app {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> init::LateResources {
|
fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
|
||||||
rtic::pend(Interrupt::UART0);
|
rtic::pend(Interrupt::UART0);
|
||||||
rtic::pend(Interrupt::UART1);
|
rtic::pend(Interrupt::UART1);
|
||||||
init::LateResources { e2: 2, l2: 2 }
|
(init::LateResources { e2: 2, l2: 2 }, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
// `shared` cannot be accessed from this context
|
// `shared` cannot be accessed from this context
|
||||||
|
|
|
@ -4,13 +4,13 @@ use panic_halt as _;
|
||||||
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
|
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
|
||||||
mod app {
|
mod app {
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> init::LateResources {
|
fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
|
||||||
#[cfg(never)]
|
#[cfg(never)]
|
||||||
static mut FOO: u32 = 0;
|
static mut FOO: u32 = 0;
|
||||||
|
|
||||||
FOO;
|
FOO;
|
||||||
|
|
||||||
init::LateResources {}
|
(init::LateResources {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[idle]
|
#[idle]
|
||||||
|
|
|
@ -43,14 +43,14 @@ mod app {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[init(resources = [o1, o4, o5, o6, s3])]
|
#[init(resources = [o1, o4, o5, o6, s3])]
|
||||||
fn init(c: init::Context) -> init::LateResources {
|
fn init(c: init::Context) -> (init::LateResources, init::Monotonics) {
|
||||||
c.resources.o1;
|
c.resources.o1;
|
||||||
c.resources.o4;
|
c.resources.o4;
|
||||||
c.resources.o5;
|
c.resources.o5;
|
||||||
c.resources.o6;
|
c.resources.o6;
|
||||||
c.resources.s3;
|
c.resources.s3;
|
||||||
|
|
||||||
init::LateResources {}
|
(init::LateResources {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[idle(resources = [o2, &o4, s1, &s3])]
|
#[idle(resources = [o2, &o4, s1, &s3])]
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#[rtic::app(device = lm3s6965)]
|
#[rtic::app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> init::LateResources {
|
fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
|
||||||
init::LateResources {}
|
(init::LateResources {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(binds = GPIOA, priority = 1)]
|
#[task(binds = GPIOA, priority = 1)]
|
||||||
|
|
Loading…
Reference in a new issue