Skip to main content

open_sx126x

Function open_sx126x 

Source
pub fn open_sx126x(
    wiring: &Wiring,
    board: Board,
) -> Result<LinuxRadio, OpenError>
Expand description

Opens an SX1261, SX1262, SX1268, or LLCC68 module and resets it.

§Arguments

  • wiring - the SPI device and the lines, which must name the BUSY line.
  • board - how the module wires the chip: its amplifier, clock, antenna switch, and regulator.

§Returns

The radio, reset and in standby, ready for Radio::configure.

§Errors

Returns OpenError::NoBusyLine if the wiring names no BUSY line, OpenError::Unsupported on any platform but Linux, OpenError::Bus if the SPI device or a line cannot be opened, and OpenError::Radio if no SX126x answers.