mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 06:54:33 +01:00
Examples need to import the resources
This commit is contained in:
parent
46bf583cc2
commit
dcc31fb884
5 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,10 @@ use panic_semihosting as _;
|
||||||
|
|
||||||
#[rtic::app(device = lm3s6965)]
|
#[rtic::app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
|
use heapless::{
|
||||||
|
consts::*,
|
||||||
|
spsc::{Consumer, Producer},
|
||||||
|
};
|
||||||
// Late resources
|
// Late resources
|
||||||
struct Resources {
|
struct Resources {
|
||||||
p: Producer<'static, u32, U4>,
|
p: Producer<'static, u32, U4>,
|
||||||
|
|
|
@ -17,6 +17,8 @@ pub struct NotSend {
|
||||||
|
|
||||||
#[app(device = lm3s6965)]
|
#[app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
|
use super::NotSend;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
#[init(None)]
|
#[init(None)]
|
||||||
shared: Option<NotSend>,
|
shared: Option<NotSend>,
|
||||||
|
|
|
@ -16,6 +16,9 @@ pub struct NotSync {
|
||||||
|
|
||||||
#[rtic::app(device = lm3s6965)]
|
#[rtic::app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
|
use super::NotSync;
|
||||||
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
#[init(NotSync { _0: PhantomData })]
|
#[init(NotSync { _0: PhantomData })]
|
||||||
shared: NotSync,
|
shared: NotSync,
|
||||||
|
|
|
@ -14,6 +14,8 @@ pub struct MustBeSend;
|
||||||
|
|
||||||
#[app(device = lm3s6965)]
|
#[app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
|
use super::MustBeSend;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
#[init(None)]
|
#[init(None)]
|
||||||
shared: Option<MustBeSend>,
|
shared: Option<MustBeSend>,
|
||||||
|
|
|
@ -13,6 +13,8 @@ pub struct NotSend {
|
||||||
|
|
||||||
#[rtic::app(device = lm3s6965)]
|
#[rtic::app(device = lm3s6965)]
|
||||||
mod app {
|
mod app {
|
||||||
|
use super::NotSend;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
x: NotSend,
|
x: NotSend,
|
||||||
#[init(None)]
|
#[init(None)]
|
||||||
|
|
Loading…
Reference in a new issue