Skip to content

Commit 362e072

Browse files
committed
[LR1121] an update of RF switch table for Nano Edition [skip ci]
1 parent a9e9a95 commit 362e072

File tree

1 file changed

+26
-0
lines changed
  • software/firmware/source/SoftRF/src/driver/radio

1 file changed

+26
-0
lines changed

software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ static const Module::RfSwitchMode_t rfswitch_table_hpdtek[] = {
259259
END_OF_MODE_TABLE,
260260
};
261261

262+
/* setDioAsRfSwitch(0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0) */
262263
static const uint32_t rfswitch_dio_pins_seeed[] = {
263264
RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,
264265
RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8,
@@ -297,6 +298,27 @@ static const Module::RfSwitchMode_t rfswitch_table_ebyte[] = {
297298
END_OF_MODE_TABLE,
298299
};
299300

301+
/* setDioAsRfSwitch(0x0F, 0x0, 0x0C, 0x08, 0x08, 0x6, 0x0, 0x5) */
302+
static const uint32_t rfswitch_dio_pins_radiomaster[] = {
303+
RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,
304+
RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8,
305+
RADIOLIB_NC
306+
};
307+
308+
static const Module::RfSwitchMode_t rfswitch_table_radiomaster[] = {
309+
// mode DIO5 DIO6 DIO7 DIO8
310+
{ LR11x0::MODE_STBY, { LOW, LOW, LOW, LOW } },
311+
// SKY13373 ( V1-DIO7 V2-DIO8 )
312+
{ LR11x0::MODE_RX, { LOW, LOW, HIGH, HIGH } },
313+
{ LR11x0::MODE_TX, { LOW, LOW, LOW, HIGH } },
314+
{ LR11x0::MODE_TX_HP, { LOW, LOW, LOW, HIGH } },
315+
// AT2401C ( RXEN-DIO5 TXEN-DIO6 )
316+
{ LR11x0::MODE_TX_HF, { LOW, HIGH, HIGH, LOW } },
317+
{ LR11x0::MODE_GNSS, { LOW, LOW, LOW, LOW } },
318+
{ LR11x0::MODE_WIFI, { HIGH, LOW, HIGH, LOW } },
319+
END_OF_MODE_TABLE,
320+
};
321+
300322
static const uint32_t rfswitch_dio_pins_elecrow[] = {
301323
RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,
302324
RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC
@@ -1014,7 +1036,11 @@ static void lr11xx_setup()
10141036
radio_semtech->setRfSwitchTable(rfswitch_dio_pins_lilygo, rfswitch_table_lilygo);
10151037
} else {
10161038
/* RadioMaster XR1 */
1039+
#if 1
1040+
radio_semtech->setRfSwitchTable(rfswitch_dio_pins_radiomaster, rfswitch_table_radiomaster);
1041+
#else
10171042
radio_semtech->setDioAsRfSwitch(0x0F, 0x0, 0x0C, 0x08, 0x08, 0x6, 0x0, 0x5);
1043+
#endif
10181044
}
10191045
state = radio_semtech->setOutputPower(txpow, high ? false : true);
10201046
}

0 commit comments

Comments
 (0)