PROTOCOLS
Clock
Defined in fuchsia.hardware.clock/clock.fidl
Disable
Disables (gates) this clock. Drivers should call this method to indicate to the clock subsystem that a particular clock signal is no longer necessary.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
Enable
Enables (ungates) this clock. Drivers must call enable on all clocks they depend upon.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
GetInput
Returns the index of the current input of this clock.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
index |
uint32
|
GetNumInputs
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.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
n |
uint32
|
GetRate
Returns the current rate that a given clock is running at.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
hz |
uint64
|
IsEnabled
Returns true
if a given clock is running.
May query the hardware or return a cached value.
Request
Name | Type |
---|
Response
Name | Type |
---|---|
s |
zx/status
|
enabled |
bool
|
QuerySupportedRate
Query the hardware for the highest supported rate that does not exceed hz_in.
Request
Name | Type |
---|---|
hz_in |
uint64
|
Response
Name | Type |
---|---|
s |
zx/status
|
hz_out |
uint64
|
SetInput
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.
Request
Name | Type |
---|---|
idx |
uint32
|
Response
Name | Type |
---|---|
s |
zx/status
|
SetRate
Attempt to set the rate of the clock provider.
Request
Name | Type |
---|---|
hz |
uint64
|
Response
Name | Type |
---|---|
s |
zx/status
|