pub struct CommsLink<const N: usize> {
pub to_pc: &'static mut Queue<Result<ToPc, Error>, N>,
pub to_mcu: &'static mut Queue<ToMcu, N>,
}Expand description
A wrapper structure for statically allocated bidirectional queues
Fields§
§to_pc: &'static mut Queue<Result<ToPc, Error>, N>§to_mcu: &'static mut Queue<ToMcu, N>Implementations§
Source§impl<const N: usize> CommsLink<N>
impl<const N: usize> CommsLink<N>
Sourcepub fn split(self) -> (WorkerComms<N>, InterfaceComms<N>)
pub fn split(self) -> (WorkerComms<N>, InterfaceComms<N>)
Split the CommsLink into Worker and Interface halves.
The WorkerComms half is intended to be used with a Worker implmentation, The InterfaceComms half is intended to be used where bytes are send and received to the PC, such as the USB Serial handler function
Auto Trait Implementations§
impl<const N: usize> Freeze for CommsLink<N>
impl<const N: usize> !RefUnwindSafe for CommsLink<N>
impl<const N: usize> Send for CommsLink<N>
impl<const N: usize> !Sync for CommsLink<N>
impl<const N: usize> Unpin for CommsLink<N>
impl<const N: usize> !UnwindSafe for CommsLink<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more