pub struct BluetoothHci<'d, D: Driver<'d>> { /* private fields */ }Expand description
USB Bluetooth HCI class device.
Implementations§
Source§impl<'d, D: Driver<'d>> BluetoothHci<'d, D>
impl<'d, D: Driver<'d>> BluetoothHci<'d, D>
Sourcepub fn new(
builder: &mut Builder<'d, D>,
state: &'d mut State<'d>,
config: Config<'d>,
) -> Self
pub fn new( builder: &mut Builder<'d, D>, state: &'d mut State<'d>, config: Config<'d>, ) -> Self
Create a new Bluetooth HCI device class instance on the USB builder.
Sourcepub fn split(
self,
) -> (HciCommandReader<'d>, HciEventWriter<'d, D>, AclReader<'d, D>, AclWriter<'d, D>)
pub fn split( self, ) -> (HciCommandReader<'d>, HciEventWriter<'d, D>, AclReader<'d, D>, AclWriter<'d, D>)
Split this driver into separate command, event, and ACL reader/writer handles.
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the USB host to enable this interface.
Sourcepub async fn read_command(
&mut self,
buf: &mut [u8],
) -> Result<usize, EndpointError>
pub async fn read_command( &mut self, buf: &mut [u8], ) -> Result<usize, EndpointError>
Asynchronously await and read the next HCI Command from the host (received on EP0).
Returns the number of bytes copied into buf.
Sourcepub async fn send_event(&mut self, event: &[u8]) -> Result<(), EndpointError>
pub async fn send_event(&mut self, event: &[u8]) -> Result<(), EndpointError>
Asynchronously send an HCI Event packet to the host on the Interrupt IN endpoint.
Auto Trait Implementations§
impl<'d, D> !RefUnwindSafe for BluetoothHci<'d, D>
impl<'d, D> !UnwindSafe for BluetoothHci<'d, D>
impl<'d, D> Forget for BluetoothHci<'d, D>
impl<'d, D> Freeze for BluetoothHci<'d, D>
impl<'d, D> Move for BluetoothHci<'d, D>
impl<'d, D> Send for BluetoothHci<'d, D>
impl<'d, D> Sync for BluetoothHci<'d, D>
impl<'d, D> Unpin for BluetoothHci<'d, D>
impl<'d, D> UnsafeUnpin for BluetoothHci<'d, D>where
HciEventWriter<'d, D>: UnsafeUnpin,
AclReader<'d, D>: UnsafeUnpin,
AclWriter<'d, D>: UnsafeUnpin,
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