mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 13:55:23 +01:00
First example builds again
This commit is contained in:
parent
858320cbfc
commit
3b97531a5c
5 changed files with 20 additions and 32 deletions
|
|
@ -13,7 +13,6 @@ use panic_semihosting as _;
|
|||
#[rtic::app(device = lm3s6965, dispatchers = [SSI0, UART0], peripherals = true)]
|
||||
mod app {
|
||||
use cortex_m_semihosting::{debug, hprintln};
|
||||
use systick_monotonic::*;
|
||||
|
||||
#[shared]
|
||||
struct Shared {}
|
||||
|
|
@ -21,21 +20,13 @@ mod app {
|
|||
#[local]
|
||||
struct Local {}
|
||||
|
||||
#[monotonic(binds = SysTick, default = true)]
|
||||
type MyMono = Systick<100>;
|
||||
|
||||
#[init]
|
||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
fn init(cx: init::Context) -> (Shared, Local) {
|
||||
hprintln!("init").unwrap();
|
||||
|
||||
normal_task::spawn().ok();
|
||||
async_task::spawn().ok();
|
||||
async_task::spawn().unwrap();
|
||||
|
||||
(
|
||||
Shared {},
|
||||
Local {},
|
||||
init::Monotonics(Systick::new(cx.core.SYST, 12_000_000)),
|
||||
)
|
||||
(Shared {}, Local {})
|
||||
}
|
||||
|
||||
#[idle]
|
||||
|
|
@ -47,11 +38,6 @@ mod app {
|
|||
}
|
||||
}
|
||||
|
||||
#[task]
|
||||
fn normal_task(_cx: normal_task::Context) {
|
||||
hprintln!("hello from normal").ok();
|
||||
}
|
||||
|
||||
#[task]
|
||||
async fn async_task(_cx: async_task::Context) {
|
||||
hprintln!("hello from async").ok();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue