Enum stm32wlxx_hal::subghz::StatusMode  
source · #[repr(u8)]pub enum StatusMode {
    StandbyRc = 2,
    StandbyHse = 3,
    Fs = 4,
    Rx = 5,
    Tx = 6,
}Expand description
sub-GHz radio operating mode.
See Get_Status under section 5.8.5 “Communication status information commands”
in the reference manual.
This is returned by Status::mode.
Variants§
StandbyRc = 2
Standby mode with RC 13MHz.
StandbyHse = 3
Standby mode with HSE32.
Fs = 4
Frequency Synthesis mode.
Rx = 5
Receive mode.
Tx = 6
Transmit mode.
Implementations§
source§impl StatusMode
 
impl StatusMode
sourcepub const fn from_raw(bits: u8) -> Result<Self, u8>
 
pub const fn from_raw(bits: u8) -> Result<Self, u8>
Create a new StatusMode from bits.
Example
use stm32wlxx_hal::subghz::StatusMode;
assert_eq!(StatusMode::from_raw(0x2), Ok(StatusMode::StandbyRc));
assert_eq!(StatusMode::from_raw(0x3), Ok(StatusMode::StandbyHse));
assert_eq!(StatusMode::from_raw(0x4), Ok(StatusMode::Fs));
assert_eq!(StatusMode::from_raw(0x5), Ok(StatusMode::Rx));
assert_eq!(StatusMode::from_raw(0x6), Ok(StatusMode::Tx));
// Other values are reserved
assert_eq!(StatusMode::from_raw(0), Err(0));Trait Implementations§
source§impl Clone for StatusMode
 
impl Clone for StatusMode
source§fn clone(&self) -> StatusMode
 
fn clone(&self) -> StatusMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for StatusMode
 
impl Debug for StatusMode
source§impl PartialEq for StatusMode
 
impl PartialEq for StatusMode
source§fn eq(&self, other: &StatusMode) -> bool
 
fn eq(&self, other: &StatusMode) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.impl Copy for StatusMode
impl Eq for StatusMode
impl StructuralEq for StatusMode
impl StructuralPartialEq for StatusMode
Auto Trait Implementations§
impl RefUnwindSafe for StatusMode
impl Send for StatusMode
impl Sync for StatusMode
impl Unpin for StatusMode
impl UnwindSafe for StatusMode
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