pub enum DeviceRequest {
Show 13 variants
GetMmioById {
index: u32,
responder: DeviceGetMmioByIdResponder,
},
GetMmioByName {
name: String,
responder: DeviceGetMmioByNameResponder,
},
GetInterruptById {
index: u32,
flags: u32,
responder: DeviceGetInterruptByIdResponder,
},
GetInterruptByName {
name: String,
flags: u32,
responder: DeviceGetInterruptByNameResponder,
},
GetBtiById {
index: u32,
responder: DeviceGetBtiByIdResponder,
},
GetBtiByName {
name: String,
responder: DeviceGetBtiByNameResponder,
},
GetSmcById {
index: u32,
responder: DeviceGetSmcByIdResponder,
},
GetSmcByName {
name: String,
responder: DeviceGetSmcByNameResponder,
},
GetPowerConfiguration {
responder: DeviceGetPowerConfigurationResponder,
},
GetNodeDeviceInfo {
responder: DeviceGetNodeDeviceInfoResponder,
},
GetBoardInfo {
responder: DeviceGetBoardInfoResponder,
},
GetMetadata {
id: String,
responder: DeviceGetMetadataResponder,
},
#[non_exhaustive]
_UnknownMethod {
ordinal: u64,
control_handle: DeviceControlHandle,
method_type: MethodType,
},
}
Variants§
GetMmioById
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.
GetMmioByName
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.
GetInterruptById
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.
GetInterruptByName
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.
GetBtiById
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.
GetBtiByName
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.
GetSmcById
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.
GetSmcByName
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.
GetPowerConfiguration
Returns power configuration for the device the driver has bound to.
Fields
responder: DeviceGetPowerConfigurationResponder
GetNodeDeviceInfo
Returns information about the device corresponding to the node that the driver has bound to.
Fields
responder: DeviceGetNodeDeviceInfoResponder
GetBoardInfo
Return information about the board the device is attached to.
Fields
responder: DeviceGetBoardInfoResponder
GetMetadata
Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: DeviceControlHandle
method_type: MethodType
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_mmio_by_id(self) -> Option<(u32, DeviceGetMmioByIdResponder)>
pub fn into_get_mmio_by_name( self, ) -> Option<(String, DeviceGetMmioByNameResponder)>
pub fn into_get_interrupt_by_id( self, ) -> Option<(u32, u32, DeviceGetInterruptByIdResponder)>
pub fn into_get_interrupt_by_name( self, ) -> Option<(String, u32, DeviceGetInterruptByNameResponder)>
pub fn into_get_bti_by_id(self) -> Option<(u32, DeviceGetBtiByIdResponder)>
pub fn into_get_bti_by_name( self, ) -> Option<(String, DeviceGetBtiByNameResponder)>
pub fn into_get_smc_by_id(self) -> Option<(u32, DeviceGetSmcByIdResponder)>
pub fn into_get_smc_by_name( self, ) -> Option<(String, DeviceGetSmcByNameResponder)>
pub fn into_get_power_configuration( self, ) -> Option<DeviceGetPowerConfigurationResponder>
pub fn into_get_node_device_info( self, ) -> Option<DeviceGetNodeDeviceInfoResponder>
pub fn into_get_board_info(self) -> Option<DeviceGetBoardInfoResponder>
pub fn into_get_metadata(self) -> Option<(String, DeviceGetMetadataResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL