pub struct ControllerSynchronousProxy { /* private fields */ }Implementations§
Source§impl ControllerSynchronousProxy
impl ControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ControllerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ControllerEvent, 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 set_control(
&self,
options: &ControlOptions,
___deadline: MonotonicInstant,
) -> Result<ControllerSetControlResult, Error>
pub fn set_control( &self, options: &ControlOptions, ___deadline: MonotonicInstant, ) -> Result<ControllerSetControlResult, Error>
Applies operational and electrical constraints to the charger converter.
Validation is atomic: a request rejected with NOT_SUPPORTED or INVALID_ARGS leaves
hardware and session state untouched. The response is returned only after all corresponding
hardware register writes have completed and been acknowledged by the charger IC.
Parameters:
options: The constraints to apply. Present fields overwrite the constraints previously set on this connection for those fields; omitted fields leave this connection’s prior constraints for those fields unchanged.
Errors:
NOT_SUPPORTED: One or more requested constraints are not adjustable on this hardware/arbiter, or the requestedoperating_modeis absent fromSpec.supported_modes.INVALID_ARGS: A requested value is outside the range the hardware can program, or the requestedoperating_modeconflicts with the active power path state (for example, requestingOperatingMode::OTGwhile external input power is online on the same port).IO: Communication failure with the charger hardware (e.g. SPMI transfer failure).INTERNAL: Internal driver error.
Sourcepub fn clear_control(
&self,
options: &ControlOptions,
___deadline: MonotonicInstant,
) -> Result<ControllerClearControlResult, Error>
pub fn clear_control( &self, options: &ControlOptions, ___deadline: MonotonicInstant, ) -> Result<ControllerClearControlResult, Error>
Withdraws constraints applied through this connection for the fields present in options.
options acts as a field mask: only field presence (set vs. unset) is inspected, and the
field values themselves are ignored.
- If
optionsis empty (no fields set), all constraints applied through this connection are withdrawn. - If one or more fields are set in
options, only the constraints corresponding to those fields are withdrawn, leaving any other fields untouched.
Each cleared field reverts to the next active constraint, if any, or otherwise to the
autonomous hardware / board-configured default that [Controller] restores on close.
Succeeds without effect for any targeted field that is not currently constrained.
Parameters:
options: Mask ofControlOptionsfields whose constraints should be withdrawn, or an empty table to withdraw all constraints on this connection.
Errors:
IO: Communication failure with the charger hardware. Fields that could not be reverted retain their constraint, so the call can be retried.INTERNAL: Internal driver error.
Trait Implementations§
Source§impl Debug for ControllerSynchronousProxy
impl Debug for ControllerSynchronousProxy
Source§impl From<Channel> for ControllerSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ControllerSynchronousProxy
Source§impl From<ControllerSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ControllerSynchronousProxy> for NullableHandle
Source§fn from(value: ControllerSynchronousProxy) -> Self
fn from(value: ControllerSynchronousProxy) -> Self
Source§impl FromClient for ControllerSynchronousProxy
Available on Fuchsia only.
impl FromClient for ControllerSynchronousProxy
Source§type Protocol = ControllerMarker
type Protocol = ControllerMarker
Source§fn from_client(value: ClientEnd<ControllerMarker>) -> Self
fn from_client(value: ClientEnd<ControllerMarker>) -> Self
Source§impl SynchronousProxy for ControllerSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ControllerSynchronousProxy
Source§type Proxy = ControllerProxy
type Proxy = ControllerProxy
Source§type Protocol = ControllerMarker
type Protocol = ControllerMarker
Proxy controls.