Struct stm32wlxx_hal::subghz::FskFdev
source · pub struct FskFdev { /* private fields */ }
Expand description
Frequency deviation argument for FskModParams::set_fdev
Implementations§
source§impl FskFdev
impl FskFdev
sourcepub const fn from_hertz(hz: u32) -> Self
pub const fn from_hertz(hz: u32) -> Self
Create a new FskFdev
from a frequency deviation in hertz, rounded
down.
Example
use stm32wlxx_hal::subghz::FskFdev;
const FDEV: FskFdev = FskFdev::from_hertz(31_250);
assert_eq!(FDEV.as_hertz(), 31_250);
sourcepub const fn from_raw(bits: u32) -> Self
pub const fn from_raw(bits: u32) -> Self
Create a new FskFdev
from a raw bit value.
bits = fdev × 225 / 32 MHz
Note: Only the first 24 bits of the u32
are used, the bits
argument will be masked.
Example
use stm32wlxx_hal::subghz::FskFdev;
const FDEV: FskFdev = FskFdev::from_raw(0x8000);
assert_eq!(FDEV.as_hertz(), 31_250);
Trait Implementations§
source§impl Ord for FskFdev
impl Ord for FskFdev
source§impl PartialEq for FskFdev
impl PartialEq for FskFdev
source§impl PartialOrd for FskFdev
impl PartialOrd for FskFdev
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for FskFdev
impl Eq for FskFdev
impl StructuralEq for FskFdev
impl StructuralPartialEq for FskFdev
Auto Trait Implementations§
impl RefUnwindSafe for FskFdev
impl Send for FskFdev
impl Sync for FskFdev
impl Unpin for FskFdev
impl UnwindSafe for FskFdev
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