pub struct ClockSynchronousProxy { /* private fields */ }Implementations§
Source§impl ClockSynchronousProxy
impl ClockSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ClockEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ClockEvent, 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 enable(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockEnableResult, Error>
pub fn enable( &self, ___deadline: MonotonicInstant, ) -> Result<ClockEnableResult, Error>
Enables (ungates) this clock.
Drivers must call enable on all clocks they depend upon.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support Enable.
Returns ZX_ERR_TIMED_OUT if an operation timed out (for instance, a PLL was unable to lock).
Returns ZX_ERR_INTERNAL if the operation failed for any other reason.
Sourcepub fn disable(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockDisableResult, Error>
pub fn disable( &self, ___deadline: MonotonicInstant, ) -> Result<ClockDisableResult, Error>
Disables (gates) this clock.
Drivers should call this method to indicate to the clock subsystem that
a particular clock signal is no longer necessary.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support Disable
Returns ZX_ERR_INTERNAL if the operation failed for any other reason.
Sourcepub fn is_enabled(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockIsEnabledResult, Error>
pub fn is_enabled( &self, ___deadline: MonotonicInstant, ) -> Result<ClockIsEnabledResult, Error>
Returns true if a given clock is running.
May query the hardware or return a cached value.
IsEnabled shall not alter the state of the clock tree in any way.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support IsEnabled.
Sourcepub fn set_rate(
&self,
hz: u64,
___deadline: MonotonicInstant,
) -> Result<ClockSetRateResult, Error>
pub fn set_rate( &self, hz: u64, ___deadline: MonotonicInstant, ) -> Result<ClockSetRateResult, Error>
Attempt to set the rate of the clock provider.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support SetRate
Returns ZX_ERR_INVALID_ARGS if the requested rate is not one that is reported as supported by QuerySupportedRate.
Returns ZX_ERR_TIMED_OUT if an operation timed out (for instance, a PLL was unable to lock).
Returns ZX_ERR_INTERNAL if the operation failed for any other reason.
Sourcepub fn query_supported_rate(
&self,
hz_in: u64,
___deadline: MonotonicInstant,
) -> Result<ClockQuerySupportedRateResult, Error>
pub fn query_supported_rate( &self, hz_in: u64, ___deadline: MonotonicInstant, ) -> Result<ClockQuerySupportedRateResult, Error>
Query the hardware for the highest supported rate that does not
exceed hz_in.
QuerySupportedRate shall not alter the state of the clock tree in any way.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support QuerySupportedRate.
Returns ZX_ERR_OUT_OF_RANGE if a suitable rate could not be found.
Sourcepub fn get_rate(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockGetRateResult, Error>
pub fn get_rate( &self, ___deadline: MonotonicInstant, ) -> Result<ClockGetRateResult, Error>
Returns the current rate that a given clock is running at.
GetRate shall not alter the state of the clock tree in any way.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support GetRate .
Sourcepub fn set_input(
&self,
idx: u32,
___deadline: MonotonicInstant,
) -> Result<ClockSetInputResult, Error>
pub fn set_input( &self, idx: u32, ___deadline: MonotonicInstant, ) -> Result<ClockSetInputResult, Error>
Sets the input of this clock by index. I.e. by selecting a mux.
This clock has N inputs defined 0 through N-1, which are valid arguemts
as the index to SetInput.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support SetInput
Returns ZX_ERR_OUT_OF_RANGE if idx is outside of the range supplied by GetNumInputs.
Returns ZX_ERR_INTERNAL if the operation failed for any other reason.
Sourcepub fn get_num_inputs(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockGetNumInputsResult, Error>
pub fn get_num_inputs( &self, ___deadline: MonotonicInstant, ) -> Result<ClockGetNumInputsResult, Error>
Returns the number of inputs this clock has.
Any value between 0 and UINT32_MAX is a valid return for this method.
A Root Oscillator may return 0 for instance, if it has no inputs.
GetNumInputs shall not alter the state of the clock tree in any way.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support GetNumInputs.
Sourcepub fn get_input(
&self,
___deadline: MonotonicInstant,
) -> Result<ClockGetInputResult, Error>
pub fn get_input( &self, ___deadline: MonotonicInstant, ) -> Result<ClockGetInputResult, Error>
Returns the index of the current input of this clock.
GetInput shall not alter the state of the clock tree in any way.
Returns ZX_ERR_NOT_SUPPORTED if this clock type does not support GetInput.
Sourcepub fn get_properties(
&self,
___deadline: MonotonicInstant,
) -> Result<(u32, String), Error>
pub fn get_properties( &self, ___deadline: MonotonicInstant, ) -> Result<(u32, String), Error>
Returns the static properties of a clock.
Trait Implementations§
Source§impl Debug for ClockSynchronousProxy
impl Debug for ClockSynchronousProxy
Source§impl From<Channel> for ClockSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ClockSynchronousProxy
Source§impl From<ClockSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ClockSynchronousProxy> for NullableHandle
Source§fn from(value: ClockSynchronousProxy) -> Self
fn from(value: ClockSynchronousProxy) -> Self
Source§impl FromClient for ClockSynchronousProxy
Available on Fuchsia only.
impl FromClient for ClockSynchronousProxy
Source§type Protocol = ClockMarker
type Protocol = ClockMarker
Source§fn from_client(value: ClientEnd<ClockMarker>) -> Self
fn from_client(value: ClientEnd<ClockMarker>) -> Self
Source§impl SynchronousProxy for ClockSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ClockSynchronousProxy
Source§type Proxy = ClockProxy
type Proxy = ClockProxy
Source§type Protocol = ClockMarker
type Protocol = ClockMarker
Proxy controls.