Struct radio_sx128x::Sx128x
source · pub struct Sx128x<Base> { /* private fields */ }
Expand description
Sx128x device object
Implementations§
source§impl<Spi, BusyPin, ReadyPin, SdnPin, PinError, Delay> Sx128x<Base<Spi, BusyPin, ReadyPin, SdnPin, Delay>>
impl<Spi, BusyPin, ReadyPin, SdnPin, PinError, Delay> Sx128x<Base<Spi, BusyPin, ReadyPin, SdnPin, Delay>>
source§impl<Hal> Sx128x<Hal>
impl<Hal> Sx128x<Hal>
sourcepub fn new(
hal: Hal,
config: &Config
) -> Result<Self, Error<<Hal as Hal>::CommsError, <Hal as Hal>::PinError>>
pub fn new( hal: Hal, config: &Config ) -> Result<Self, Error<<Hal as Hal>::CommsError, <Hal as Hal>::PinError>>
Create a new Sx128x instance over a generic Hal implementation
pub fn reset(&mut self) -> Result<(), <Hal as HalError>::E>
pub fn configure(&mut self, config: &Config) -> Result<(), <Hal as HalError>::E>
pub fn firmware_version(&mut self) -> Result<u16, <Hal as HalError>::E>
pub fn set_frequency(&mut self, f: u32) -> Result<(), <Hal as HalError>::E>
sourcepub fn set_irq_dio_mask(
&mut self,
irq: Irq,
dio1: DioMask,
dio2: DioMask,
dio3: DioMask
) -> Result<(), <Hal as HalError>::E>
pub fn set_irq_dio_mask( &mut self, irq: Irq, dio1: DioMask, dio2: DioMask, dio3: DioMask ) -> Result<(), <Hal as HalError>::E>
Set the IRQ and DIO masks
pub fn calibrate( &mut self, c: CalibrationParams ) -> Result<(), <Hal as HalError>::E>
Trait Implementations§
source§impl<Hal> DelayNs for Sx128x<Hal>where
Hal: Hal,
impl<Hal> DelayNs for Sx128x<Hal>where
Hal: Hal,
source§fn delay_ns(&mut self, t: u32)
fn delay_ns(&mut self, t: u32)
Pauses execution for at minimum
ns
nanoseconds. Pause can be longer
if the implementation requires it due to precision/timing issues.source§impl<Hal> Interrupts for Sx128x<Hal>where
Hal: Hal,
impl<Hal> Interrupts for Sx128x<Hal>where
Hal: Hal,
radio::Interrupts
implementation for the SX128x
source§impl<Hal> Receive for Sx128x<Hal>where
Hal: Hal,
impl<Hal> Receive for Sx128x<Hal>where
Hal: Hal,
radio::Receive
implementation for the SX128x
§type Info = PacketInfo
type Info = PacketInfo
Receive info structure
Auto Trait Implementations§
impl<Base> Freeze for Sx128x<Base>where
Base: Freeze,
impl<Base> RefUnwindSafe for Sx128x<Base>where
Base: RefUnwindSafe,
impl<Base> Send for Sx128x<Base>where
Base: Send,
impl<Base> Sync for Sx128x<Base>where
Base: Sync,
impl<Base> Unpin for Sx128x<Base>where
Base: Unpin,
impl<Base> UnwindSafe for Sx128x<Base>where
Base: UnwindSafe,
Blanket Implementations§
source§impl<T, S, E> BlockingSetState<S, E> for T
impl<T, S, E> BlockingSetState<S, E> for T
fn set_state_checked( &mut self, state: S, options: BlockingOptions ) -> Result<(), BlockingError<E>>
source§impl<T, E> BlockingTransmit<E> for T
impl<T, E> BlockingTransmit<E> for T
fn do_transmit( &mut self, data: &[u8], tx_options: BlockingOptions ) -> Result<(), BlockingError<E>>
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