Examples need to import the resources

This commit is contained in:
Henrik Tjäder 2020-05-26 10:48:24 +00:00
parent 46bf583cc2
commit dcc31fb884
5 changed files with 13 additions and 0 deletions

View file

@ -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>,

View file

@ -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>,

View file

@ -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,

View file

@ -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>,

View file

@ -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)]