Enum stm32wlxx_hal::subghz::CmdStatus
source · #[repr(u8)]pub enum CmdStatus {
Available = 2,
Timeout = 3,
ProcessingError = 4,
ExecutionFailure = 5,
Complete = 6,
}
Expand description
Command status.
See Get_Status
under section 5.8.5 “Communication status information commands”
in the reference manual.
This is returned by Status::cmd
.
Variants§
Available = 2
Data available to host.
Packet received successfully and data can be retrieved.
Timeout = 3
Command time out.
Command took too long to complete triggering a sub-GHz radio watchdog timeout.
ProcessingError = 4
Command processing error.
Invalid opcode or incorrect number of parameters.
ExecutionFailure = 5
Command execution failure.
Command successfully received but cannot be executed at this time, requested operating mode cannot be entered or requested data cannot be sent.
Complete = 6
Transmit command completed.
Current packet transmission completed.
Implementations§
source§impl CmdStatus
impl CmdStatus
sourcepub const fn from_raw(bits: u8) -> Result<Self, u8>
pub const fn from_raw(bits: u8) -> Result<Self, u8>
Create a new CmdStatus
from bits.
Example
use stm32wlxx_hal::subghz::CmdStatus;
assert_eq!(CmdStatus::from_raw(0x2), Ok(CmdStatus::Available));
assert_eq!(CmdStatus::from_raw(0x3), Ok(CmdStatus::Timeout));
assert_eq!(CmdStatus::from_raw(0x4), Ok(CmdStatus::ProcessingError));
assert_eq!(CmdStatus::from_raw(0x5), Ok(CmdStatus::ExecutionFailure));
assert_eq!(CmdStatus::from_raw(0x6), Ok(CmdStatus::Complete));
// Other values are reserved
assert_eq!(CmdStatus::from_raw(0), Err(0));
Trait Implementations§
source§impl PartialEq for CmdStatus
impl PartialEq for CmdStatus
impl Copy for CmdStatus
impl Eq for CmdStatus
impl StructuralEq for CmdStatus
impl StructuralPartialEq for CmdStatus
Auto Trait Implementations§
impl RefUnwindSafe for CmdStatus
impl Send for CmdStatus
impl Sync for CmdStatus
impl Unpin for CmdStatus
impl UnwindSafe for CmdStatus
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