pub struct Sx1231<Spi, CsPin, SpiError, PinError> { /* fields omitted */ }
Expand description
Sx1231 device object
Operating functions are implemented as traits from the radio package
impl<Spi, CsPin, SpiError, PinError> Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Create a new radio instance with the provided SPI implementation and pins
Return hardware resources for reuse
impl<Spi, CsPin, SpiError, PinError> Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
(re)apply device configuration
Fetch device silicon version
impl<Spi, CsPin, SpiError, PinError> Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
impl<Spi, CsPin, SpiError, PinError> Channel for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Set the channel for future receive or transmit operations
impl<Spi, CsPin, SpiError, PinError> Interrupts for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Fetch pending interrupts from the device
If the clear option is set, this will also clear any pending flags
impl<Spi, CsPin, SpiError, PinError> Power for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Set transmit power (using the existing PaConfig
)
impl<Spi, CsPin, SpiError, PinError> Receive for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Check receive state
This returns true if a boolean indicating whether a packet has been received.
The restart option specifies whether transient timeout or CRC errors should be
internally handled (returning Ok(false)) or passed back to the caller as errors.
Fetch a received message
This copies data into the provided slice, updates the provided information object,
and returns the number of bytes received on success
impl<Spi, CsPin, SpiError, PinError, Word, Bytes> Registers<Word> for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Word: RegisterWord<Bytes = Bytes>,
Bytes: Default + AsMut<[u8]>,
Poll for the current channel RSSI
This should only be called in receive mode
impl<Spi, CsPin, SpiError, PinError> State for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
impl<Spi, CsPin, SpiError, PinError> Transmit for Sx1231<Spi, CsPin, SpiError, PinError> where
Spi: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
CsPin: OutputPin<Error = PinError>,
SpiError: Debug,
PinError: Debug,
Check for transmission completion
This method should be polled (or checked following and interrupt) to indicate sending
has completed
impl<Spi, CsPin, SpiError, PinError> Send for Sx1231<Spi, CsPin, SpiError, PinError> where
CsPin: Send,
PinError: Send,
Spi: Send,
SpiError: Send,
impl<Spi, CsPin, SpiError, PinError> Sync for Sx1231<Spi, CsPin, SpiError, PinError> where
CsPin: Sync,
PinError: Sync,
Spi: Sync,
SpiError: Sync,
impl<Spi, CsPin, SpiError, PinError> Unpin for Sx1231<Spi, CsPin, SpiError, PinError> where
CsPin: Unpin,
PinError: Unpin,
Spi: Unpin,
SpiError: Unpin,
impl<Spi, CsPin, SpiError, PinError> UnwindSafe for Sx1231<Spi, CsPin, SpiError, PinError> where
CsPin: UnwindSafe,
PinError: UnwindSafe,
Spi: UnwindSafe,
SpiError: UnwindSafe,
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.