Skip to content

Commit ec42640

Browse files
mariusfaber98fifieldt
authored andcommitted
Add basic LR1121 support for T-Beam S3, full support needs #4775 fixed
1 parent b6830a6 commit ec42640

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "RadioLib.h"
2+
3+
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};
4+
5+
static const Module::RfSwitchMode_t rfswitch_table[] = {
6+
// mode DIO5 DIO6
7+
{LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}},
8+
{LR11x0::MODE_TX, {LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}},
9+
{LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},
10+
{LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE,
11+
};

variants/esp32s3/tbeam-s3-core/variant.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// not found then probe for SX1262
1616
#define USE_SX1262
1717
#define USE_SX1268
18+
#define USE_LR1121
1819

1920
#define LORA_DIO0 -1 // a No connect on the SX1262 module
2021
#define LORA_RESET 5
@@ -34,6 +35,19 @@
3435
// code)
3536
#endif
3637

38+
// LR1121
39+
#ifdef USE_LR1121
40+
#define LR1121_IRQ_PIN 1
41+
#define LR1121_NRESET_PIN LORA_RESET
42+
#define LR1121_BUSY_PIN 4
43+
#define LR1121_SPI_NSS_PIN 10
44+
#define LR1121_SPI_SCK_PIN 12
45+
#define LR1121_SPI_MOSI_PIN 11
46+
#define LR1121_SPI_MISO_PIN 13
47+
#define LR11X0_DIO3_TCXO_VOLTAGE 3.0
48+
#define LR11X0_DIO_AS_RF_SWITCH
49+
#endif
50+
3751
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
3852
// and waking from light sleep
3953
// #define PMU_IRQ 40
@@ -64,4 +78,4 @@
6478
// has 32768 Hz crystal
6579
#define HAS_32768HZ 1
6680

67-
#define USE_SH1106
81+
#define USE_SH1106

0 commit comments

Comments
 (0)