GenericSx127xInterfaceVariant

Struct GenericSx127xInterfaceVariant 

Source
pub struct GenericSx127xInterfaceVariant<CTRL, WAIT> { /* private fields */ }
Expand description

Base for the InterfaceVariant implementation for the Sx127x combination

Implementations§

Source§

impl<CTRL, WAIT> GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: OutputPin, WAIT: Wait,

Source

pub fn new( reset: CTRL, irq: WAIT, rf_switch_rx: Option<CTRL>, rf_switch_tx: Option<CTRL>, ) -> Result<Self, RadioError>

Create an InterfaceVariant instance for an stm32l0/sx1276 combination

Trait Implementations§

Source§

impl<CTRL, WAIT> InterfaceVariant for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: OutputPin, WAIT: Wait,

Source§

async fn reset(&mut self, delay: &mut impl DelayNs) -> Result<(), RadioError>

Reset the LoRa chip
Source§

async fn wait_on_busy(&mut self) -> Result<(), RadioError>

Wait for the LoRa chip to become available for an operation
Source§

async fn await_irq(&mut self) -> Result<(), RadioError>

Wait for the LoRa chip to indicate an event has occurred
Source§

async fn enable_rf_switch_rx(&mut self) -> Result<(), RadioError>

Enable an antenna used for receive operations, disabling other antennas
Source§

async fn enable_rf_switch_tx(&mut self) -> Result<(), RadioError>

Enable an antenna used for send operations, disabling other antennas
Source§

async fn disable_rf_switch(&mut self) -> Result<(), RadioError>

Disable all antennas

Auto Trait Implementations§

§

impl<CTRL, WAIT> Freeze for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: Freeze, WAIT: Freeze,

§

impl<CTRL, WAIT> RefUnwindSafe for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: RefUnwindSafe, WAIT: RefUnwindSafe,

§

impl<CTRL, WAIT> Send for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: Send, WAIT: Send,

§

impl<CTRL, WAIT> Sync for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: Sync, WAIT: Sync,

§

impl<CTRL, WAIT> Unpin for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: Unpin, WAIT: Unpin,

§

impl<CTRL, WAIT> UnwindSafe for GenericSx127xInterfaceVariant<CTRL, WAIT>
where CTRL: UnwindSafe, WAIT: UnwindSafe,

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.