pub struct DeviceSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceEvent, 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_mmio_by_id(
&self,
index: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceGetMmioByIdResult, Error>
pub fn get_mmio_by_id( &self, index: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceGetMmioByIdResult, Error>
Returns a memory mapped IO (MMIO) resource for the given |index|.
- error
ZX_ERR_OUT_OF_RANGE
if |index| is equal or greater than the number of mmios. - error
ZX_ERR_INTERNAL
if the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUND
if the retrieved mmio’s base address is NULL.
Sourcepub fn get_mmio_by_name(
&self,
name: &str,
___deadline: MonotonicInstant,
) -> Result<DeviceGetMmioByNameResult, Error>
pub fn get_mmio_by_name( &self, name: &str, ___deadline: MonotonicInstant, ) -> Result<DeviceGetMmioByNameResult, Error>
Returns a memory mapped IO (MMIO) resource for the given |name|.
- error
ZX_ERR_INVALID_ARGS
if |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGE
if |name| is not found. - error
ZX_ERR_INTERNAL
if the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUND
if the retrieved’s mmio base address is NULL.
Sourcepub fn get_interrupt_by_id(
&self,
index: u32,
flags: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceGetInterruptByIdResult, Error>
pub fn get_interrupt_by_id( &self, index: u32, flags: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceGetInterruptByIdResult, Error>
Returns an interrupt handle for the given |index|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create
.
- error
ZX_ERR_OUT_OF_RANGE
if |index| is equal or greater than the number of interrupts. - error
ZX_ERR_INTERNAL
if the retrieved interrupt is not valid.
Sourcepub fn get_interrupt_by_name(
&self,
name: &str,
flags: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceGetInterruptByNameResult, Error>
pub fn get_interrupt_by_name( &self, name: &str, flags: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceGetInterruptByNameResult, Error>
Returns an interrupt handle for the given |name|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create
.
- error
ZX_ERR_INVALID_ARGS
if |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGE
if |name| is not found. - error
ZX_ERR_INTERNAL
if the retrieved interrupt is not valid.
Sourcepub fn get_bti_by_id(
&self,
index: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceGetBtiByIdResult, Error>
pub fn get_bti_by_id( &self, index: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceGetBtiByIdResult, Error>
Returns a bus transaction initiator (bti) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGE
if |index| is equal or greater than the number of btis. - error
ZX_ERR_INTERNAL
if the retrieved bti is not valid.
Sourcepub fn get_bti_by_name(
&self,
name: &str,
___deadline: MonotonicInstant,
) -> Result<DeviceGetBtiByNameResult, Error>
pub fn get_bti_by_name( &self, name: &str, ___deadline: MonotonicInstant, ) -> Result<DeviceGetBtiByNameResult, Error>
Returns a bus transaction initiator (bti) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGS
if |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGE
if |name| is not found. - error
ZX_ERR_INTERNAL
if the retrieved bti is not valid.
Sourcepub fn get_smc_by_id(
&self,
index: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceGetSmcByIdResult, Error>
pub fn get_smc_by_id( &self, index: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceGetSmcByIdResult, Error>
Returns a secure monitor call (smc) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGE
if |index| is equal or greater than the number of smcs. - error
ZX_ERR_INTERNAL
if the retrieved smc is not valid.
Sourcepub fn get_smc_by_name(
&self,
name: &str,
___deadline: MonotonicInstant,
) -> Result<DeviceGetSmcByNameResult, Error>
pub fn get_smc_by_name( &self, name: &str, ___deadline: MonotonicInstant, ) -> Result<DeviceGetSmcByNameResult, Error>
Returns a secure monitor call (smc) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGS
if |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGE
if |name| is not found. - error
ZX_ERR_INTERNAL
if the retrieved smc is not valid.
Sourcepub fn get_power_configuration(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetPowerConfigurationResult, Error>
pub fn get_power_configuration( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetPowerConfigurationResult, Error>
Returns power configuration for the device the driver has bound to.
Sourcepub fn get_node_device_info(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetNodeDeviceInfoResult, Error>
pub fn get_node_device_info( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetNodeDeviceInfoResult, Error>
Returns information about the device corresponding to the node that the driver has bound to.
Sourcepub fn get_board_info(
&self,
___deadline: MonotonicInstant,
) -> Result<DeviceGetBoardInfoResult, Error>
pub fn get_board_info( &self, ___deadline: MonotonicInstant, ) -> Result<DeviceGetBoardInfoResult, Error>
Return information about the board the device is attached to.
Sourcepub fn get_metadata(
&self,
id: &str,
___deadline: MonotonicInstant,
) -> Result<DeviceGetMetadataResult, Error>
pub fn get_metadata( &self, id: &str, ___deadline: MonotonicInstant, ) -> Result<DeviceGetMetadataResult, Error>
Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.
Trait Implementations§
Source§impl Debug for DeviceSynchronousProxy
impl Debug for DeviceSynchronousProxy
Source§impl From<Channel> for DeviceSynchronousProxy
impl From<Channel> for DeviceSynchronousProxy
Source§impl From<DeviceSynchronousProxy> for Handle
impl From<DeviceSynchronousProxy> for Handle
Source§fn from(value: DeviceSynchronousProxy) -> Self
fn from(value: DeviceSynchronousProxy) -> Self
Source§impl FromClient for DeviceSynchronousProxy
impl FromClient for DeviceSynchronousProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Source§fn from_client(value: ClientEnd<DeviceMarker>) -> Self
fn from_client(value: ClientEnd<DeviceMarker>) -> Self
Source§impl SynchronousProxy for DeviceSynchronousProxy
impl SynchronousProxy for DeviceSynchronousProxy
Source§type Proxy = DeviceProxy
type Proxy = DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy
controls.