Struct stm32wlxx_hal::subghz::CalibrateImage
source · pub struct CalibrateImage(/* private fields */);
Expand description
Image calibration.
Argument of calibrate_image
.
Implementations§
source§impl CalibrateImage
impl CalibrateImage
sourcepub const ISM_430_440: CalibrateImage = _
pub const ISM_430_440: CalibrateImage = _
Image calibration for the 430 - 440 MHz ISM band.
sourcepub const ISM_470_510: CalibrateImage = _
pub const ISM_470_510: CalibrateImage = _
Image calibration for the 470 - 510 MHz ISM band.
sourcepub const ISM_779_787: CalibrateImage = _
pub const ISM_779_787: CalibrateImage = _
Image calibration for the 779 - 787 MHz ISM band.
sourcepub const ISM_863_870: CalibrateImage = _
pub const ISM_863_870: CalibrateImage = _
Image calibration for the 863 - 870 MHz ISM band.
sourcepub const ISM_902_928: CalibrateImage = _
pub const ISM_902_928: CalibrateImage = _
Image calibration for the 902 - 928 MHz ISM band.
sourcepub const fn new(f1: u8, f2: u8) -> CalibrateImage
pub const fn new(f1: u8, f2: u8) -> CalibrateImage
Create a new CalibrateImage
structure from raw values.
Example
use stm32wlxx_hal::subghz::CalibrateImage;
const CAL: CalibrateImage = CalibrateImage::new(0xE1, 0xE9);
assert_eq!(CAL, CalibrateImage::ISM_902_928);
sourcepub fn from_freq(freq1: u16, freq2: u16) -> CalibrateImage
pub fn from_freq(freq1: u16, freq2: u16) -> CalibrateImage
Create a new CalibrateImage
structure from two frequencies.
Arguments
The units for freq1
and freq2
are in MHz.
Panics
- Panics if
freq1
is less thanfreq2
. - Panics if
freq1
orfreq2
is not a multiple of 4MHz. - Panics if
freq1
orfreq2
is greater than1020
.
Example
Create an image calibration for the 430 - 440 MHz ISM band.
use stm32wlxx_hal::subghz::CalibrateImage;
let cal: CalibrateImage = CalibrateImage::from_freq(428, 444);
assert_eq!(cal, CalibrateImage::ISM_430_440);
Trait Implementations§
source§impl Clone for CalibrateImage
impl Clone for CalibrateImage
source§fn clone(&self) -> CalibrateImage
fn clone(&self) -> CalibrateImage
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 CalibrateImage
impl Debug for CalibrateImage
source§impl Default for CalibrateImage
impl Default for CalibrateImage
source§impl PartialEq for CalibrateImage
impl PartialEq for CalibrateImage
source§fn eq(&self, other: &CalibrateImage) -> bool
fn eq(&self, other: &CalibrateImage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CalibrateImage
impl Eq for CalibrateImage
impl StructuralEq for CalibrateImage
impl StructuralPartialEq for CalibrateImage
Auto Trait Implementations§
impl RefUnwindSafe for CalibrateImage
impl Send for CalibrateImage
impl Sync for CalibrateImage
impl Unpin for CalibrateImage
impl UnwindSafe for CalibrateImage
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