mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
more docs, remove Ceiling / Priority / Level traits
This commit is contained in:
parent
0a6583ddc6
commit
4992db7877
15 changed files with 578 additions and 170 deletions
|
|
@ -5,20 +5,22 @@
|
|||
extern crate core;
|
||||
extern crate cortex_m;
|
||||
#[macro_use]
|
||||
extern crate cortex_m_srp;
|
||||
extern crate cortex_m_rtfm as rtfm;
|
||||
|
||||
use cortex_m_srp::{C16, P0, P1};
|
||||
use device::interrupt::Exti0;
|
||||
use rtfm::{C16, P0, P1};
|
||||
|
||||
/// Tasks can't have priority 0. Only idle has priority 0
|
||||
tasks!(device, {
|
||||
j1: (Exti0, P1),
|
||||
});
|
||||
|
||||
fn init(_: C16) {}
|
||||
fn init(_: P0, _: &C16) {}
|
||||
|
||||
// WRONG. `idle` must have signature `fn(P1)`
|
||||
fn idle(_: P1) {}
|
||||
// WRONG. `idle` must have signature `fn(P0) -> !`
|
||||
fn idle(_: P1) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn j1(_task: Exti0, _prio: P1) {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue