diff --git a/variants/esp32s3/tbeam-s3-core/rfswitch.h b/variants/esp32s3/tbeam-s3-core/rfswitch.h new file mode 100644 index 000000000..19080cec6 --- /dev/null +++ b/variants/esp32s3/tbeam-s3-core/rfswitch.h @@ -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, +}; \ No newline at end of file diff --git a/variants/esp32s3/tbeam-s3-core/variant.h b/variants/esp32s3/tbeam-s3-core/variant.h index 40ba0307a..1d99fbf14 100644 --- a/variants/esp32s3/tbeam-s3-core/variant.h +++ b/variants/esp32s3/tbeam-s3-core/variant.h @@ -15,6 +15,7 @@ // not found then probe for SX1262 #define USE_SX1262 #define USE_SX1268 +#define USE_LR1121 #define LORA_DIO0 -1 // a No connect on the SX1262 module #define LORA_RESET 5 @@ -34,6 +35,19 @@ // code) #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 // and waking from light sleep // #define PMU_IRQ 40 @@ -64,4 +78,4 @@ // has 32768 Hz crystal #define HAS_32768HZ 1 -#define USE_SH1106 +#define USE_SH1106 \ No newline at end of file