Skip to content

Commit

Permalink
misc. cleanup of RadioLib driver [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed May 27, 2024
1 parent 1db9fa4 commit 9f1d970
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@ static void lr112x_setup()

SoC->SPI_begin();

mod = new Module(lmic_pins.nss, lmic_pins.dio[0],
lmic_pins.rst, lmic_pins.busy,
SPI);
uint32_t irq = lmic_pins.dio[0] == LMIC_UNUSED_PIN ?
RADIOLIB_NC : lmic_pins.dio[0];
uint32_t busy = lmic_pins.busy == LMIC_UNUSED_PIN ?
RADIOLIB_NC : lmic_pins.busy;

mod = new Module(lmic_pins.nss, irq, lmic_pins.rst, busy, SPI);
radio = new RADIO_TYPE(mod);

switch (settings->rf_protocol)
Expand Down Expand Up @@ -454,6 +457,11 @@ static void lr112x_setup()
state = radio->setRxBoostedGainMode(true);
#endif

#if USE_LR1121
// state = radio->setDioAsRfSwitch(/* TBD */);
state = radio->setRxBoosted(true);
#endif

radio->setPacketReceivedAction(lr112x_receive_handler);
}

Expand Down

0 comments on commit 9f1d970

Please sign in to comment.