Initial node implementation #4

Merged
zack merged 51 commits from develop into master 2023-07-19 18:09:13 +00:00
27 changed files with 480 additions and 44 deletions
Showing only changes of commit a143ad0e54 - Show all commits

View File

@ -1,3 +1,4 @@
#![no_std]
#![feature(async_fn_in_trait)] #![feature(async_fn_in_trait)]
mod transducer; mod transducer;

View File

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

View File

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

View File

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