pub struct Bus<'d, T: Instance, V: VbusDetect = ()> { /* private fields */ }Expand description
USB bus.
Trait Implementations§
Source§impl<'d, T: Instance, V: VbusDetect> Bus for Bus<'d, T, V>
impl<'d, T: Instance, V: VbusDetect> Bus for Bus<'d, T, V>
Source§fn control_max_packet_size(&self) -> usize
fn control_max_packet_size(&self) -> usize
Maximum packet size for the control pipe.
Source§fn control_data_out<'s, 'b>(
&'s mut self,
buf: &'b mut [u8],
) -> impl Future<Output = Result<usize, EndpointError>> + use<'s, 'b, 'd, T, V>
fn control_data_out<'s, 'b>( &'s mut self, buf: &'b mut [u8], ) -> impl Future<Output = Result<usize, EndpointError>> + use<'s, 'b, 'd, T, V>
Read a DATA OUT transfer into
buf in response to a control write request. Read moreSource§fn control_data_in<'s, 'b>(
&'s mut self,
data: &'b [u8],
needs_zlp: bool,
) -> impl Future<Output = Result<(), EndpointDisabledError>> + use<'s, 'b, 'd, T, V>
fn control_data_in<'s, 'b>( &'s mut self, data: &'b [u8], needs_zlp: bool, ) -> impl Future<Output = Result<(), EndpointDisabledError>> + use<'s, 'b, 'd, T, V>
Send a DATA IN transfer with
data in response to a control read request. Read moreSource§fn control_accept_set_address(&mut self, addr: u8) -> impl Future<Output = ()>
fn control_accept_set_address(&mut self, addr: u8) -> impl Future<Output = ()>
Accept SET_ADDRESS control and change bus address. Read more
Source§fn endpoint_set_stalled(
&mut self,
ep_addr: EndpointAddress,
stalled: bool,
) -> impl Future<Output = ()>
fn endpoint_set_stalled( &mut self, ep_addr: EndpointAddress, stalled: bool, ) -> impl Future<Output = ()>
Set or clear the STALL condition for an endpoint. Read more
Source§fn endpoint_is_stalled(&mut self, ep_addr: EndpointAddress) -> bool
fn endpoint_is_stalled(&mut self, ep_addr: EndpointAddress) -> bool
Get whether the STALL condition is set for an endpoint.
Source§fn endpoint_set_enabled(
&mut self,
ep_addr: EndpointAddress,
enabled: bool,
) -> impl Future<Output = ()>
fn endpoint_set_enabled( &mut self, ep_addr: EndpointAddress, enabled: bool, ) -> impl Future<Output = ()>
Enable or disable an endpoint. Read more
Source§fn endpoint_is_enabled(&mut self, ep_addr: EndpointAddress) -> bool
fn endpoint_is_enabled(&mut self, ep_addr: EndpointAddress) -> bool
Get whether an endpoint is enabled.
Source§fn remote_wakeup(&mut self) -> impl Future<Output = Result<(), Unsupported>>
fn remote_wakeup(&mut self) -> impl Future<Output = Result<(), Unsupported>>
Initiate a remote wakeup of the host by the device. Read more
Source§async fn force_reset(&mut self) -> Result<(), Unsupported>
async fn force_reset(&mut self) -> Result<(), Unsupported>
Simulate a disconnect from the USB bus, causing the host to reset and re-enumerate the
device. Read more
Auto Trait Implementations§
impl<'d, T, V = ()> !RefUnwindSafe for Bus<'d, T, V>
impl<'d, T, V = ()> !UnwindSafe for Bus<'d, T, V>
impl<'d, T, V> Forget for Bus<'d, T, V>
impl<'d, T, V> Freeze for Bus<'d, T, V>
impl<'d, T, V> Move for Bus<'d, T, V>
impl<'d, T, V> Send for Bus<'d, T, V>
impl<'d, T, V> Sync for Bus<'d, T, V>
impl<'d, T, V> Unpin for Bus<'d, T, V>
impl<'d, T, V> UnsafeUnpin for Bus<'d, T, V>
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