mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Move example and remove success test
This commit is contained in:
parent
d9fe447a5d
commit
1e8c175c51
3 changed files with 44 additions and 73 deletions
|
|
@ -1,31 +0,0 @@
|
|||
#![no_main]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[rtic_macros::mock_app(device = mock, dispatchers = [EXTI0])]
|
||||
mod app {
|
||||
use super::*;
|
||||
|
||||
#[shared]
|
||||
struct Shared {}
|
||||
|
||||
#[local]
|
||||
struct Local {}
|
||||
|
||||
#[init]
|
||||
fn init(_cx: init::Context) -> (Shared, Local) {
|
||||
task1::spawn().ok();
|
||||
(Shared {}, Local {})
|
||||
}
|
||||
|
||||
#[task(priority = 1)]
|
||||
async fn task1(cx: task1::Context) {
|
||||
cx.local_spawner.task2(Default::default()).ok();
|
||||
}
|
||||
|
||||
#[task(priority = 1, is_local_task = true)]
|
||||
async fn task2(_cx: task2::Context, _nsns: super::NotSendNotSync) {}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct NotSendNotSync(PhantomData<*mut u8>);
|
||||
Loading…
Add table
Add a link
Reference in a new issue