pub struct Host<'d, C: HostController> { /* private fields */ }Expand description
Implementations§
Source§impl<'d, C: HostController> Host<'d, C>
impl<'d, C: HostController> Host<'d, C>
Sourcepub const fn new(controller: &'d C) -> Self
pub const fn new(controller: &'d C) -> Self
Wrap a controller. The controller must be powered up already.
Sourcepub fn port(&self) -> PortStatus
pub fn port(&self) -> PortStatus
Read the root port without changing anything.
Sourcepub fn reset(&self) -> HostResult<PortStatus>
pub fn reset(&self) -> HostResult<PortStatus>
Power the port, drive a bus reset and report the negotiated speed.
A device has to be attached; this is what enumeration starts with.
Sourcepub fn wait_for_device(&self) -> HostResult<PortStatus>
pub fn wait_for_device(&self) -> HostResult<PortStatus>
Wait up to a second for a device to be attached.
Sourcepub fn enumerate(&self) -> HostResult<Device<'d, C>>
pub fn enumerate(&self) -> HostResult<Device<'d, C>>
Reset the port and enumerate the attached device at the first free address.
Sourcepub fn enumerate_at(&self, address: DeviceAddress) -> HostResult<Device<'d, C>>
pub fn enumerate_at(&self, address: DeviceAddress) -> HostResult<Device<'d, C>>
Reset the port and enumerate the attached device at address.
Auto Trait Implementations§
impl<'d, C> Forget for Host<'d, C>
impl<'d, C> Freeze for Host<'d, C>
impl<'d, C> Move for Host<'d, C>
impl<'d, C> RefUnwindSafe for Host<'d, C>where
&'d C: RefUnwindSafe,
impl<'d, C> Send for Host<'d, C>
impl<'d, C> Sync for Host<'d, C>
impl<'d, C> Unpin for Host<'d, C>
impl<'d, C> UnsafeUnpin for Host<'d, C>where
&'d C: UnsafeUnpin,
impl<'d, C> UnwindSafe for Host<'d, C>where
&'d C: UnwindSafe,
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