pub struct WireStorage<M: RawMutex + 'static, D: Driver<'static> + 'static, const CONFIG: usize = 256, const BOS: usize = 256, const CONTROL: usize = 64, const MSOS: usize = 256> {
pub bufs_usb: ConstStaticCell<UsbDeviceBuffers<CONFIG, BOS, CONTROL, MSOS>>,
pub cell: StaticCell<Mutex<M, EUsbWireTxInner<D>>>,
}
Expand description
A helper type for static
storage of buffers and driver components
Fields§
§bufs_usb: ConstStaticCell<UsbDeviceBuffers<CONFIG, BOS, CONTROL, MSOS>>
Usb buffer storage
cell: StaticCell<Mutex<M, EUsbWireTxInner<D>>>
WireTx/Sender static storage
Implementations§
Source§impl<M: RawMutex + 'static, D: Driver<'static> + 'static, const CONFIG: usize, const BOS: usize, const CONTROL: usize, const MSOS: usize> WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M: RawMutex + 'static, D: Driver<'static> + 'static, const CONFIG: usize, const BOS: usize, const CONTROL: usize, const MSOS: usize> WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
Sourcepub fn init_poststation(
&'static self,
driver: D,
config: Config<'static>,
tx_buf: &'static mut [u8],
) -> (UsbDevice<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
pub fn init_poststation( &'static self, driver: D, config: Config<'static>, tx_buf: &'static mut [u8], ) -> (UsbDevice<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
Initialize the static storage, reporting as poststation compatible
This must only be called once.
Sourcepub fn init(
&'static self,
driver: D,
config: Config<'static>,
tx_buf: &'static mut [u8],
) -> (UsbDevice<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
pub fn init( &'static self, driver: D, config: Config<'static>, tx_buf: &'static mut [u8], ) -> (UsbDevice<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
Initialize the static storage.
This must only be called once.
Sourcepub fn init_without_build(
&'static self,
driver: D,
config: Config<'static>,
tx_buf: &'static mut [u8],
) -> (Builder<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
pub fn init_without_build( &'static self, driver: D, config: Config<'static>, tx_buf: &'static mut [u8], ) -> (Builder<'static, D>, WireTxImpl<M, D>, WireRxImpl<D>)
Initialize the static storage, without building Builder
This must only be called once.
Auto Trait Implementations§
impl<M, D, const CONFIG: usize = 256, const BOS: usize = 256, const CONTROL: usize = 64, const MSOS: usize = 256> !Freeze for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M, D, const CONFIG: usize = 256, const BOS: usize = 256, const CONTROL: usize = 64, const MSOS: usize = 256> !RefUnwindSafe for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M, D, const CONFIG: usize, const BOS: usize, const CONTROL: usize, const MSOS: usize> Send for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M, D, const CONFIG: usize, const BOS: usize, const CONTROL: usize, const MSOS: usize> Sync for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M, D, const CONFIG: usize, const BOS: usize, const CONTROL: usize, const MSOS: usize> Unpin for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
impl<M, D, const CONFIG: usize = 256, const BOS: usize = 256, const CONTROL: usize = 64, const MSOS: usize = 256> !UnwindSafe for WireStorage<M, D, CONFIG, BOS, CONTROL, MSOS>
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