#[repr(u16)]
pub enum Irq { TxDone = 1, RxDone = 2, PreambleDetected = 4, SyncDetected = 8, HeaderValid = 16, HeaderErr = 32, Err = 64, CadDone = 128, CadDetected = 256, Timeout = 512, }
Expand description

IRQ bit mapping

See table 37 “IRQ bit mapping and definition” in the reference manual for more information.

Variants§

§

TxDone = 1

Packet transmission finished.

  • Packet type: LoRa and GFSK
  • Operation: TX
§

RxDone = 2

Packet reception finished.

  • Packet type: LoRa and GFSK
  • Operation: RX
§

PreambleDetected = 4

Preamble detected.

  • Packet type: LoRa and GFSK
  • Operation: RX
§

SyncDetected = 8

Synchronization word valid.

  • Packet type: GFSK
  • Operation: RX
§

HeaderValid = 16

Header valid.

  • Packet type: LoRa
  • Operation: RX
§

HeaderErr = 32

Header CRC error.

  • Packet type: LoRa
  • Operation: RX
§

Err = 64

Dual meaning error.

For GFSK RX this indicates a preamble, syncword, address, CRC, or length error.

For LoRa RX this indicates a CRC error.

§

CadDone = 128

Channel activity detection finished.

  • Packet type: LoRa
  • Operation: CAD
§

CadDetected = 256

Channel activity detected.

  • Packet type: LoRa
  • Operation: CAD
§

Timeout = 512

RX or TX timeout.

  • Packet type: LoRa and GFSK
  • Operation: RX and TX

Implementations§

source§

impl Irq

source

pub const fn mask(self) -> u16

Get the bitmask for an IRQ.

Example
use stm32wlxx_hal::subghz::Irq;

assert_eq!(Irq::TxDone.mask(), 0x0001);
assert_eq!(Irq::Timeout.mask(), 0x0200);

Trait Implementations§

source§

impl Clone for Irq

source§

fn clone(&self) -> Irq

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 Irq

source§

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

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

impl PartialEq for Irq

source§

fn eq(&self, other: &Irq) -> 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 Irq

source§

impl Eq for Irq

source§

impl StructuralEq for Irq

source§

impl StructuralPartialEq for Irq

Auto Trait Implementations§

§

impl RefUnwindSafe for Irq

§

impl Send for Irq

§

impl Sync for Irq

§

impl Unpin for Irq

§

impl UnwindSafe for Irq

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.