mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 15:04:32 +01:00
fix tests
This commit is contained in:
parent
dbb4ca6c33
commit
e9b8cd2486
15 changed files with 18 additions and 51 deletions
12
Cargo.toml
12
Cargo.toml
|
@ -20,7 +20,10 @@ required-features = ["timer-queue"]
|
|||
name = "schedule-now"
|
||||
|
||||
[[example]]
|
||||
name = "empty"
|
||||
name = "minimal"
|
||||
|
||||
[[example]]
|
||||
name = "idle"
|
||||
|
||||
[[example]]
|
||||
name = "event-task"
|
||||
|
@ -56,9 +59,14 @@ required-features = ["timer-queue"]
|
|||
[dependencies]
|
||||
cortex-m = "0.5.0"
|
||||
cortex-m-rtfm-macros = { path = "macros", version = "0.3.1" }
|
||||
heapless = "0.3.6"
|
||||
# heapless = "0.3.6"
|
||||
heapless = { git = "https://github.com/japaric//heapless", branch = "object-pool" }
|
||||
typenum = "1.10.0"
|
||||
|
||||
[dependencies.stable_deref_trait]
|
||||
default-features = false
|
||||
version = "1"
|
||||
|
||||
[target.'cfg(target_arch = "x86_64")'.dev-dependencies]
|
||||
compiletest_rs = "0.3.5"
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ main() {
|
|||
# examples that don't require the timer-queue feature
|
||||
local examples=(
|
||||
schedule-now
|
||||
empty
|
||||
minimal
|
||||
idle
|
||||
event-task
|
||||
)
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ version = "0.3.1"
|
|||
failure = "0.1.1"
|
||||
proc-macro2 = "0.3.6"
|
||||
quote = "0.5.1"
|
||||
# rtfm-syntax = "0.3.0"
|
||||
rtfm-syntax = { path = "../../rtfm-syntax" }
|
||||
# rtfm-syntax = "0.4.0"
|
||||
rtfm-syntax = { git = "https://github.com/japaric/rtfm-syntax", branch = "tq" }
|
||||
syn = "0.13.1"
|
||||
|
||||
[dependencies.either]
|
||||
|
|
|
@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn sys_tick(_ctxt: sys_tick::Context) {}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// error-pattern: mismatched types
|
||||
#![deny(unsafe_code)]
|
||||
#![deny(warnings)]
|
||||
#![feature(proc_macro)]
|
||||
|
@ -10,8 +11,10 @@ extern crate stm32f103xx;
|
|||
|
||||
use rtfm::app;
|
||||
|
||||
app! { //~ mismatched types
|
||||
app! {
|
||||
device: stm32f103xx,
|
||||
|
||||
idle: {},
|
||||
}
|
||||
|
||||
fn init(_ctxt: init::Context) -> init::LateResources {
|
||||
|
|
|
@ -34,8 +34,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti0(_ctxt: exti0::Context) {}
|
||||
|
|
|
@ -12,13 +12,8 @@ use rtfm::app;
|
|||
|
||||
app! { //~ error mismatched types
|
||||
//~^ incorrect number of function parameters
|
||||
//~| note expected type `fn(init::Context) -> _ZN4init13LateResourcesE`
|
||||
device: stm32f103xx,
|
||||
}
|
||||
|
||||
// ERROR `init` must have signature `fn (init::Peripherals)`
|
||||
fn init() {}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti33(_ctxt: exti33::Context) {}
|
||||
|
|
|
@ -41,10 +41,6 @@ fn init(ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources { LATE: 0 }
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti0(_ctxt: exti0::Context) {}
|
||||
|
||||
fn exti1(_ctxt: exti1::Context) {}
|
||||
|
|
|
@ -45,10 +45,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
fn exti0(mut ctxt: exti0::Context) {
|
||||
let exti0::Resources { ON, mut MAX } = ctxt.resources;
|
||||
|
|
|
@ -24,8 +24,4 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti0(_ctxt: exti0::Context) {}
|
||||
|
|
|
@ -30,7 +30,3 @@ app! { //~ error proc macro panicked
|
|||
}
|
||||
|
||||
fn init(_ctxt: init::Context) -> init::LateResources {}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn is_send<T>(_: &T)
|
||||
where
|
||||
T: Send,
|
||||
|
|
|
@ -36,10 +36,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti0(ctxt: exti0::Context) {
|
||||
// ERROR token should not outlive the critical section
|
||||
let op = &mut ctxt.priority;
|
||||
|
|
|
@ -37,10 +37,6 @@ fn init(_ctxt: init::Context) -> init::LateResources {
|
|||
init::LateResources {}
|
||||
}
|
||||
|
||||
fn idle(_ctxt: idle::Context) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn exti0(mut ctxt: exti0::Context) {
|
||||
let op = &mut ctxt.priority;
|
||||
let exti0::Resources { A, B } = ctxt.resources;
|
||||
|
|
Loading…
Reference in a new issue