pub struct SerialTransport<M, R, W>where
M: RawMutex,{ /* private fields */ }
Expand description
HCI transport layer for a split serial bus using the UART transport layer protocol 📖
Implementations§
Source§impl<M, R, W> SerialTransport<M, R, W>
impl<M, R, W> SerialTransport<M, R, W>
Sourcepub fn new(reader: R, writer: W) -> SerialTransport<M, R, W>
pub fn new(reader: R, writer: W) -> SerialTransport<M, R, W>
Create a new instance.
Trait Implementations§
Source§impl<M, R, W, E> ErrorType for SerialTransport<M, R, W>
impl<M, R, W, E> ErrorType for SerialTransport<M, R, W>
Source§impl<M, R, W, E> Transport for SerialTransport<M, R, W>
impl<M, R, W, E> Transport for SerialTransport<M, R, W>
Source§async fn read<'a>(
&self,
rx: &'a mut [u8],
) -> Result<ControllerToHostPacket<'a>, <SerialTransport<M, R, W> as ErrorType>::Error>
async fn read<'a>( &self, rx: &'a mut [u8], ) -> Result<ControllerToHostPacket<'a>, <SerialTransport<M, R, W> as ErrorType>::Error>
Read a complete HCI packet into the rx buffer
Source§async fn write<T>(
&self,
tx: &T,
) -> Result<(), <SerialTransport<M, R, W> as ErrorType>::Error>where
T: HostToControllerPacket,
async fn write<T>(
&self,
tx: &T,
) -> Result<(), <SerialTransport<M, R, W> as ErrorType>::Error>where
T: HostToControllerPacket,
Write a complete HCI packet from the tx buffer
Source§impl<M, R, W, E> Transport for SerialTransport<M, R, W>
impl<M, R, W, E> Transport for SerialTransport<M, R, W>
Source§fn read<'a>(
&self,
rx: &'a mut [u8],
) -> Result<ControllerToHostPacket<'a>, TryError<<SerialTransport<M, R, W> as ErrorType>::Error>>
fn read<'a>( &self, rx: &'a mut [u8], ) -> Result<ControllerToHostPacket<'a>, TryError<<SerialTransport<M, R, W> as ErrorType>::Error>>
Read a complete HCI packet into the rx buffer
Auto Trait Implementations§
impl<M, R, W> !Freeze for SerialTransport<M, R, W>
impl<M, R, W> !RefUnwindSafe for SerialTransport<M, R, W>
impl<M, R, W> Send for SerialTransport<M, R, W>
impl<M, R, W> Sync for SerialTransport<M, R, W>
impl<M, R, W> Unpin for SerialTransport<M, R, W>
impl<M, R, W> UnwindSafe for SerialTransport<M, R, W>
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