Skip to main content

DeviceErrors

Struct DeviceErrors 

Source
pub struct DeviceErrors(/* private fields */);
Expand description

The errors an SX126x has recorded, from GetDeviceErrors and Table 13-86.

Implementations§

Source§

impl DeviceErrors

Source

pub const RC64K_CALIBRATION: DeviceErrors

Bit 0: the RC64k calibration failed.

Source

pub const RC13M_CALIBRATION: DeviceErrors

Bit 1: the RC13M calibration failed.

Source

pub const PLL_CALIBRATION: DeviceErrors

Bit 2: the PLL calibration failed.

Source

pub const ADC_CALIBRATION: DeviceErrors

Bit 3: the ADC calibration failed.

Source

pub const IMAGE_CALIBRATION: DeviceErrors

Bit 4: the image calibration failed.

Source

pub const XOSC_START: DeviceErrors

Bit 5: the crystal oscillator failed to start. Expected at power on and after a cold wake when a TCXO is fitted, and cleared with ClearDeviceErrors.

Source

pub const PLL_LOCK: DeviceErrors

Bit 6: the PLL failed to lock.

Source

pub const PA_RAMP: DeviceErrors

Bit 8: the power amplifier failed to ramp.

Source

pub const fn from_bytes(bytes: [u8; 2]) -> DeviceErrors

Decodes a GetDeviceErrors answer.

§Arguments
  • bytes - the OpError bytes, most significant first.
§Returns

The recorded errors.

Source

pub const fn bits(self) -> u16

Returns the raw error bits.

§Returns

The OpError value.

Source

pub const fn contains(self, other: DeviceErrors) -> bool

Reports whether every error of another set was recorded.

§Arguments
  • other - the errors to look for.
§Returns

true when all of them are set.

Source

pub const fn is_empty(self) -> bool

Reports whether no error was recorded.

§Returns

true when no bit is set.

Trait Implementations§

Source§

impl Clone for DeviceErrors

Source§

fn clone(&self) -> DeviceErrors

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for DeviceErrors

Source§

impl Debug for DeviceErrors

Source§

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

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

impl Default for DeviceErrors

Source§

fn default() -> DeviceErrors

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

impl Eq for DeviceErrors

Source§

impl Hash for DeviceErrors

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DeviceErrors

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DeviceErrors

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.