Initial node implementation #4
@ -1,3 +1,4 @@
|
|||||||
|
#![no_std]
|
||||||
#![feature(async_fn_in_trait)]
|
#![feature(async_fn_in_trait)]
|
||||||
|
|
||||||
mod transducer;
|
mod transducer;
|
||||||
|
@ -6,7 +6,7 @@ use embassy_sync::pubsub::PubSubChannel;
|
|||||||
pub use physical::transducer::input::*;
|
pub use physical::transducer::input::*;
|
||||||
|
|
||||||
#[cfg(feature = "embassy-sync")]
|
#[cfg(feature = "embassy-sync")]
|
||||||
pub struct ChannelInput<
|
pub struct PublishInput<
|
||||||
T: Copy,
|
T: Copy,
|
||||||
MutexT: RawMutex,
|
MutexT: RawMutex,
|
||||||
const CAPACITY: usize,
|
const CAPACITY: usize,
|
||||||
@ -17,7 +17,7 @@ pub struct ChannelInput<
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "embassy-sync")]
|
#[cfg(feature = "embassy-sync")]
|
||||||
pub struct StatefulChannelInput<
|
pub struct StatefulPublishInput<
|
||||||
'a,
|
'a,
|
||||||
T: Copy,
|
T: Copy,
|
||||||
MutexT: RawMutex,
|
MutexT: RawMutex,
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
#![feature(async_fn_in_trait)]
|
||||||
|
|
||||||
pub mod transducer;
|
pub mod transducer;
|
||||||
pub mod cell;
|
pub mod cell;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
use crate::cell::CellView;
|
use crate::cell::CellView;
|
||||||
use crate::transducer::Stateful;
|
use crate::transducer::Stateful;
|
||||||
|
|
||||||
|
pub trait Poll<T: Copy> {
|
||||||
|
async fn poll() -> T;
|
||||||
|
}
|
||||||
|
|
||||||
pub struct StatefulInput<'a, T: Copy> {
|
pub struct StatefulInput<'a, T: Copy> {
|
||||||
pub state_cell: CellView<'a, T>,
|
pub state_cell: CellView<'a, T>,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user