pub enum DeviceRequest {
DownloadFirmware {
firmware: Vmo,
offset: u64,
responder: DeviceDownloadFirmwareResponder,
},
GetFirmwareName {
responder: DeviceGetFirmwareNameResponder,
},
GetFirmwareVersion {
responder: DeviceGetFirmwareVersionResponder,
},
GetTimeSync {
responder: DeviceGetTimeSyncResponder,
},
SetWakeLock {
value: McuWakeLockValue,
responder: DeviceSetWakeLockResponder,
},
GetWakeUpEventDuration {
responder: DeviceGetWakeUpEventDurationResponder,
},
SetWakeUpEventDuration {
duration: i64,
responder: DeviceSetWakeUpEventDurationResponder,
},
HardwareReset {
isp_pin_0: PinState,
isp_pin_1: PinState,
isp_pin_2: PinState,
responder: DeviceHardwareResetResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: DeviceControlHandle,
method_type: MethodType,
},
}
Expand description
Client is expected to pass the vmo handle to nanohub when issuing a DownloadFirmware request.
Variants§
DownloadFirmware
Request to sent to nanohub to load the firmware.
GetFirmwareName
The name of the firmware binary running on the MCU.
Fields
§
responder: DeviceGetFirmwareNameResponder
GetFirmwareVersion
The version of the firmware binary running on the MCU.
Fields
§
responder: DeviceGetFirmwareVersionResponder
GetTimeSync
The time since boot recorded by the AP and the MCU.
Fields
§
responder: DeviceGetTimeSyncResponder
SetWakeLock
Set an MCU wake lock request to prevent the MCU from entering a low-power state.
GetWakeUpEventDuration
Get the current duration of time the MCU will remain awake.
Fields
§
responder: DeviceGetWakeUpEventDurationResponder
SetWakeUpEventDuration
Set a duration of time for the MCU to remain awake.
HardwareReset
Initiates a hardware reset.
Fields
§
responder: DeviceHardwareResetResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: DeviceControlHandle
§
method_type: MethodType
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_download_firmware( self, ) -> Option<(Vmo, u64, DeviceDownloadFirmwareResponder)>
pub fn into_get_firmware_name(self) -> Option<DeviceGetFirmwareNameResponder>
pub fn into_get_firmware_version( self, ) -> Option<DeviceGetFirmwareVersionResponder>
pub fn into_get_time_sync(self) -> Option<DeviceGetTimeSyncResponder>
pub fn into_set_wake_lock( self, ) -> Option<(McuWakeLockValue, DeviceSetWakeLockResponder)>
pub fn into_get_wake_up_event_duration( self, ) -> Option<DeviceGetWakeUpEventDurationResponder>
pub fn into_set_wake_up_event_duration( self, ) -> Option<(i64, DeviceSetWakeUpEventDurationResponder)>
pub fn into_hardware_reset( self, ) -> Option<(PinState, PinState, PinState, DeviceHardwareResetResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceRequest
impl !RefUnwindSafe for DeviceRequest
impl Send for DeviceRequest
impl Sync for DeviceRequest
impl Unpin for DeviceRequest
impl !UnwindSafe for DeviceRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more