pub struct ConfigurationSynchronousProxy { /* private fields */ }Implementations§
Source§impl ConfigurationSynchronousProxy
impl ConfigurationSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ConfigurationEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ConfigurationEvent, 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 get_configuration(
&self,
___deadline: MonotonicInstant,
) -> Result<ConfigurationGetConfigurationResult, Error>
pub fn get_configuration( &self, ___deadline: MonotonicInstant, ) -> Result<ConfigurationGetConfigurationResult, Error>
Retrieves the current USB device descriptor and active configuration descriptors.
§Errors
ZX_ERR_NOT_SUPPORTED: Peripheral function querying is not supported on the target hardware.
Sourcepub fn set_configuration(
&self,
device_desc: &DeviceDescriptor,
config_descriptors: &[Vec<FunctionDescriptor>],
___deadline: MonotonicInstant,
) -> Result<ConfigurationSetConfigurationResult, Error>
pub fn set_configuration( &self, device_desc: &DeviceDescriptor, config_descriptors: &[Vec<FunctionDescriptor>], ___deadline: MonotonicInstant, ) -> Result<ConfigurationSetConfigurationResult, Error>
Sets and activates a new USB peripheral function configuration.
Teardown of the previous peripheral function stack occurs before initializing and binding the newly specified functions. The call completes once the peripheral controller and underlying function drivers are registered and ready.
§Errors
ZX_ERR_INVALID_ARGS: Configuration parameters are invalid.ZX_ERR_ALREADY_BOUND: An existing peripheral configuration is locked or undergoing transition.ZX_ERR_NOT_SUPPORTED: The requested combination of functions cannot be supported simultaneously.
Sourcepub fn disconnect_cable(
&self,
duration: i64,
___deadline: MonotonicInstant,
) -> Result<ConfigurationDisconnectCableResult, Error>
pub fn disconnect_cable( &self, duration: i64, ___deadline: MonotonicInstant, ) -> Result<ConfigurationDisconnectCableResult, Error>
Disconnects the Type-C port CC lines via the USB power debug service
to simulate a physical cable unplug. If duration is positive,
schedules an automatic Type-C cable reconnect after duration using a
hardware wake alarm in the persistent usb-policy service so reconnect
still completes even if the calling CLI session is terminated when the
USB link drops.
Sourcepub fn connect_cable(
&self,
___deadline: MonotonicInstant,
) -> Result<ConfigurationConnectCableResult, Error>
pub fn connect_cable( &self, ___deadline: MonotonicInstant, ) -> Result<ConfigurationConnectCableResult, Error>
Reconnects the Type-C port CC lines via the USB power debug service after
a previous DisconnectCable call, cancelling any pending automatic
reconnect alarm.
Trait Implementations§
Source§impl From<Channel> for ConfigurationSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ConfigurationSynchronousProxy
Source§impl From<ConfigurationSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ConfigurationSynchronousProxy> for NullableHandle
Source§fn from(value: ConfigurationSynchronousProxy) -> Self
fn from(value: ConfigurationSynchronousProxy) -> Self
Source§impl FromClient for ConfigurationSynchronousProxy
Available on Fuchsia only.
impl FromClient for ConfigurationSynchronousProxy
Source§type Protocol = ConfigurationMarker
type Protocol = ConfigurationMarker
Source§fn from_client(value: ClientEnd<ConfigurationMarker>) -> Self
fn from_client(value: ClientEnd<ConfigurationMarker>) -> Self
Source§impl SynchronousProxy for ConfigurationSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ConfigurationSynchronousProxy
Source§type Proxy = ConfigurationProxy
type Proxy = ConfigurationProxy
Source§type Protocol = ConfigurationMarker
type Protocol = ConfigurationMarker
Proxy controls.