Add basic LR1121 support for T-Beam S3, full support needs #4775 fixed

This commit is contained in:
mariusfaber98 2025-10-15 11:54:41 +02:00
parent 034d2dd025
commit a8b006d51d
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,11 @@
#include "RadioLib.h"
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};
static const Module::RfSwitchMode_t rfswitch_table[] = {
// mode DIO5 DIO6
{LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}},
{LR11x0::MODE_TX, {LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}},
{LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},
{LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE,
};

View File

@ -15,6 +15,7 @@
// not found then probe for SX1262 // not found then probe for SX1262
#define USE_SX1262 #define USE_SX1262
#define USE_SX1268 #define USE_SX1268
#define USE_LR1121
#define LORA_DIO0 -1 // a No connect on the SX1262 module #define LORA_DIO0 -1 // a No connect on the SX1262 module
#define LORA_RESET 5 #define LORA_RESET 5
@ -34,6 +35,19 @@
// code) // code)
#endif #endif
// LR1121
#ifdef USE_LR1121
#define LR1121_IRQ_PIN 1
#define LR1121_NRESET_PIN LORA_RESET
#define LR1121_BUSY_PIN 4
#define LR1121_SPI_NSS_PIN 10
#define LR1121_SPI_SCK_PIN 12
#define LR1121_SPI_MOSI_PIN 11
#define LR1121_SPI_MISO_PIN 13
#define LR11X0_DIO3_TCXO_VOLTAGE 3.0
#define LR11X0_DIO_AS_RF_SWITCH
#endif
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts // Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
// and waking from light sleep // and waking from light sleep
// #define PMU_IRQ 40 // #define PMU_IRQ 40
@ -64,4 +78,4 @@
// has 32768 Hz crystal // has 32768 Hz crystal
#define HAS_32768HZ 1 #define HAS_32768HZ 1
#define USE_SH1106 #define USE_SH1106