Created input types.

This commit is contained in:
Zachary Sunforge
2023-06-14 22:22:49 -07:00
parent 45ec03dfd1
commit a143ad0e54
4 changed files with 8 additions and 2 deletions

View File

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

View File

@ -6,7 +6,7 @@ use embassy_sync::pubsub::PubSubChannel;
pub use physical::transducer::input::*;
#[cfg(feature = "embassy-sync")]
pub struct ChannelInput<
pub struct PublishInput<
T: Copy,
MutexT: RawMutex,
const CAPACITY: usize,
@ -17,7 +17,7 @@ pub struct ChannelInput<
}
#[cfg(feature = "embassy-sync")]
pub struct StatefulChannelInput<
pub struct StatefulPublishInput<
'a,
T: Copy,
MutexT: RawMutex,

View File

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

View File

@ -1,6 +1,10 @@
use crate::cell::CellView;
use crate::transducer::Stateful;
pub trait Poll<T: Copy> {
async fn poll() -> T;
}
pub struct StatefulInput<'a, T: Copy> {
pub state_cell: CellView<'a, T>,
}