pub struct UsbFunctionInterfaceSynchronousProxy { /* private fields */ }Implementations§
Source§impl UsbFunctionInterfaceSynchronousProxy
impl UsbFunctionInterfaceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<UsbFunctionInterfaceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<UsbFunctionInterfaceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn control(
&self,
setup: &UsbSetup,
write: &[u8],
___deadline: MonotonicInstant,
) -> Result<UsbFunctionInterfaceControlResult, Error>
pub fn control( &self, setup: &UsbSetup, write: &[u8], ___deadline: MonotonicInstant, ) -> Result<UsbFunctionInterfaceControlResult, Error>
Callback for handling ep0 control requests.
setup is the control request to handle.
write is the data to write to the endpoint.
read is the data to read from the endpoint.
Sourcepub fn set_configured(
&self,
configured: bool,
speed: UsbSpeed,
___deadline: MonotonicInstant,
) -> Result<UsbFunctionInterfaceSetConfiguredResult, Error>
pub fn set_configured( &self, configured: bool, speed: UsbSpeed, ___deadline: MonotonicInstant, ) -> Result<UsbFunctionInterfaceSetConfiguredResult, Error>
Inform the function driver when the USB device configured state changes.
Called with configured == true in response to a SET_CONFIGURATION
control request that selects a configuration that contains this
function. In this case, the function driver should use
[fuchsia.hardware.usb.endpoint/Endpoint] to configure its endpoints.
Called with configured == false when configuration is disabled or USB
is disconnected. The function driver should then use
[fuchsia.hardware.usb.endpoint/Endpoint] to disable its endpoints.
Sourcepub fn set_interface(
&self,
interface: u8,
alt_setting: u8,
___deadline: MonotonicInstant,
) -> Result<UsbFunctionInterfaceSetInterfaceResult, Error>
pub fn set_interface( &self, interface: u8, alt_setting: u8, ___deadline: MonotonicInstant, ) -> Result<UsbFunctionInterfaceSetInterfaceResult, Error>
Called to set an alternate setting for an interface due to a
SET_INTERFACE control request.
The function driver should use
[fuchsia.hardware.usb.endpoint/Endpoint] to configure or disable the
interface’s endpoints as appropriate.
Trait Implementations§
Source§impl From<Channel> for UsbFunctionInterfaceSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for UsbFunctionInterfaceSynchronousProxy
Source§impl From<UsbFunctionInterfaceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<UsbFunctionInterfaceSynchronousProxy> for NullableHandle
Source§fn from(value: UsbFunctionInterfaceSynchronousProxy) -> Self
fn from(value: UsbFunctionInterfaceSynchronousProxy) -> Self
Source§impl FromClient for UsbFunctionInterfaceSynchronousProxy
Available on Fuchsia only.
impl FromClient for UsbFunctionInterfaceSynchronousProxy
Source§type Protocol = UsbFunctionInterfaceMarker
type Protocol = UsbFunctionInterfaceMarker
Source§fn from_client(value: ClientEnd<UsbFunctionInterfaceMarker>) -> Self
fn from_client(value: ClientEnd<UsbFunctionInterfaceMarker>) -> Self
Source§impl SynchronousProxy for UsbFunctionInterfaceSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for UsbFunctionInterfaceSynchronousProxy
Source§type Proxy = UsbFunctionInterfaceProxy
type Proxy = UsbFunctionInterfaceProxy
Source§type Protocol = UsbFunctionInterfaceMarker
type Protocol = UsbFunctionInterfaceMarker
Proxy controls.