pub struct DeviceProxy { /* private fields */ }
Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.power/Device.
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn register_power_domain(
&self,
min_needed_voltage: u32,
max_supported_voltage: u32,
) -> QueryResponseFut<DeviceRegisterPowerDomainResult, DefaultFuchsiaResourceDialect>
pub fn register_power_domain( &self, min_needed_voltage: u32, max_supported_voltage: u32, ) -> QueryResponseFut<DeviceRegisterPowerDomainResult, DefaultFuchsiaResourceDialect>
Register the callee for this power domain. The callee will be registered until UnregisterPowerDomain is called. Any voltage changes to the power domain will be made considering the min_needed_voltage(in uV) and max_supported_voltage(in uV) published here. If voltages mentioned are out of supported voltage range of domain(obtained by calling GetSupportedVoltageRange), the callee will be registered with the supported voltage range.
Sourcepub fn unregister_power_domain(
&self,
) -> QueryResponseFut<DeviceUnregisterPowerDomainResult, DefaultFuchsiaResourceDialect>
pub fn unregister_power_domain( &self, ) -> QueryResponseFut<DeviceUnregisterPowerDomainResult, DefaultFuchsiaResourceDialect>
Unregister the callee for this power domain. The callee will no longer be considered as a dependent of this power domain.
Sourcepub fn get_supported_voltage_range(
&self,
) -> QueryResponseFut<DeviceGetSupportedVoltageRangeResult, DefaultFuchsiaResourceDialect>
pub fn get_supported_voltage_range( &self, ) -> QueryResponseFut<DeviceGetSupportedVoltageRangeResult, DefaultFuchsiaResourceDialect>
Get Supported Voltage Range. min and max are in micorVolts(uV)
Sourcepub fn request_voltage(
&self,
voltage: u32,
) -> QueryResponseFut<DeviceRequestVoltageResult, DefaultFuchsiaResourceDialect>
pub fn request_voltage( &self, voltage: u32, ) -> QueryResponseFut<DeviceRequestVoltageResult, DefaultFuchsiaResourceDialect>
Request a particular voltage. The actual_voltage is the voltage that the power domain is transitioned to after considering supported voltage ranges of all the registered dependents. “voltage” should be in uV.
Sourcepub fn get_current_voltage(
&self,
index: u32,
) -> QueryResponseFut<DeviceGetCurrentVoltageResult, DefaultFuchsiaResourceDialect>
pub fn get_current_voltage( &self, index: u32, ) -> QueryResponseFut<DeviceGetCurrentVoltageResult, DefaultFuchsiaResourceDialect>
Get current voltage in uV.
Sourcepub fn get_power_domain_status(
&self,
) -> QueryResponseFut<DeviceGetPowerDomainStatusResult, DefaultFuchsiaResourceDialect>
pub fn get_power_domain_status( &self, ) -> QueryResponseFut<DeviceGetPowerDomainStatusResult, DefaultFuchsiaResourceDialect>
Get power domain status
Sourcepub fn write_pmic_ctrl_reg(
&self,
reg_addr: u32,
value: u32,
) -> QueryResponseFut<DeviceWritePmicCtrlRegResult, DefaultFuchsiaResourceDialect>
pub fn write_pmic_ctrl_reg( &self, reg_addr: u32, value: u32, ) -> QueryResponseFut<DeviceWritePmicCtrlRegResult, DefaultFuchsiaResourceDialect>
Write to ctrl register of PMIC
Sourcepub fn read_pmic_ctrl_reg(
&self,
reg_addr: u32,
) -> QueryResponseFut<DeviceReadPmicCtrlRegResult, DefaultFuchsiaResourceDialect>
pub fn read_pmic_ctrl_reg( &self, reg_addr: u32, ) -> QueryResponseFut<DeviceReadPmicCtrlRegResult, DefaultFuchsiaResourceDialect>
Read ctrl register of PMIC
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type RegisterPowerDomainResponseFut = QueryResponseFut<Result<(), i32>>
type UnregisterPowerDomainResponseFut = QueryResponseFut<Result<(), i32>>
type GetSupportedVoltageRangeResponseFut = QueryResponseFut<Result<(u32, u32), i32>>
type RequestVoltageResponseFut = QueryResponseFut<Result<u32, i32>>
type GetCurrentVoltageResponseFut = QueryResponseFut<Result<u32, i32>>
type GetPowerDomainStatusResponseFut = QueryResponseFut<Result<PowerDomainStatus, i32>>
type WritePmicCtrlRegResponseFut = QueryResponseFut<Result<(), i32>>
type ReadPmicCtrlRegResponseFut = QueryResponseFut<Result<u32, i32>>
fn register_power_domain( &self, min_needed_voltage: u32, max_supported_voltage: u32, ) -> Self::RegisterPowerDomainResponseFut
fn unregister_power_domain(&self) -> Self::UnregisterPowerDomainResponseFut
fn get_supported_voltage_range( &self, ) -> Self::GetSupportedVoltageRangeResponseFut
fn request_voltage(&self, voltage: u32) -> Self::RequestVoltageResponseFut
fn get_current_voltage(&self, index: u32) -> Self::GetCurrentVoltageResponseFut
fn get_power_domain_status(&self) -> Self::GetPowerDomainStatusResponseFut
fn write_pmic_ctrl_reg( &self, reg_addr: u32, value: u32, ) -> Self::WritePmicCtrlRegResponseFut
fn read_pmic_ctrl_reg(&self, reg_addr: u32) -> Self::ReadPmicCtrlRegResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy
controls.