pub struct Bus<'d, M = CriticalSectionRawMutex>{ /* private fields */ }Expand description
USB bus.
Implementations§
Source§impl<'d, M> Bus<'d, M>
impl<'d, M> Bus<'d, M>
Sourcepub fn core_soft_reset(&mut self)
pub fn core_soft_reset(&mut self)
Applies a DWC2 core soft reset.
Sourcepub fn configure_as_device(&mut self)
pub fn configure_as_device(&mut self)
Configures the PHY as a device.
Sourcepub fn config_v1(&mut self)
pub fn config_v1(&mut self)
Applies configuration specific to Core ID 0x0000_1100 and 0x0000_1200
Sourcepub fn config_v2v3(&mut self)
pub fn config_v2v3(&mut self)
Applies configuration specific to Core ID 0x0000_2000, 0x0000_2100, 0x0000_2300, 0x0000_3000 and 0x0000_3100
Sourcepub fn init_device(&mut self)
pub fn init_device(&mut self)
Initialize the device core once before polling for events.
Sourcepub fn deinit_device(&mut self)
pub fn deinit_device(&mut self)
Deinitialize the device.
Trait Implementations§
Source§impl<'d, M> Bus for Bus<'d, M>
impl<'d, M> Bus for Bus<'d, M>
Source§fn endpoint_set_stalled(&mut self, ep_addr: EndpointAddress, stalled: bool)
fn endpoint_set_stalled(&mut self, ep_addr: EndpointAddress, stalled: bool)
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)
fn endpoint_set_enabled(&mut self, ep_addr: EndpointAddress, enabled: bool)
Enable or disable an endpoint.
Source§async fn remote_wakeup(&mut self) -> Result<(), Unsupported>
async fn remote_wakeup(&mut self) -> Result<(), Unsupported>
Initiate a remote wakeup of the host by the device. Read more
Source§fn force_reset(&mut self) -> Result<(), Unsupported>
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, M = CriticalSectionRawMutex> !RefUnwindSafe for Bus<'d, M>
impl<'d, M = CriticalSectionRawMutex> !UnwindSafe for Bus<'d, M>
impl<'d, M> Freeze for Bus<'d, M>where
M: Freeze,
impl<'d, M> Send for Bus<'d, M>where
M: Send,
impl<'d, M> Sync for Bus<'d, M>where
M: Sync,
impl<'d, M> Unpin for Bus<'d, M>where
M: Unpin,
impl<'d, M> UnsafeUnpin for Bus<'d, M>where
M: 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