pub struct CalibrateImage(/* private fields */);
Expand description

Image calibration.

Argument of calibrate_image.

Implementations§

source§

impl CalibrateImage

source

pub const ISM_430_440: CalibrateImage = _

Image calibration for the 430 - 440 MHz ISM band.

source

pub const ISM_470_510: CalibrateImage = _

Image calibration for the 470 - 510 MHz ISM band.

source

pub const ISM_779_787: CalibrateImage = _

Image calibration for the 779 - 787 MHz ISM band.

source

pub const ISM_863_870: CalibrateImage = _

Image calibration for the 863 - 870 MHz ISM band.

source

pub const ISM_902_928: CalibrateImage = _

Image calibration for the 902 - 928 MHz ISM band.

source

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);
source

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 than freq2.
  • Panics if freq1 or freq2 is not a multiple of 4MHz.
  • Panics if freq1 or freq2 is greater than 1020.
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

source§

fn clone(&self) -> CalibrateImage

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CalibrateImage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CalibrateImage

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for CalibrateImage

source§

fn eq(&self, other: &CalibrateImage) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for CalibrateImage

source§

impl Eq for CalibrateImage

source§

impl StructuralEq for CalibrateImage

source§

impl StructuralPartialEq for CalibrateImage

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.