T-Lora Pager: Support LR1121 and SX1280 models (#7956)

* T-Lora Pager: Support LR1121 and SX1280 models

* Remove ifdefs
This commit is contained in:
WillyJL 2025-09-13 13:50:02 +02:00 committed by Ben Meadors
parent b6dd99917d
commit 6d2093650a
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,18 @@
#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, { LOW, HIGH } },
{ LR11x0::MODE_TX, { HIGH, LOW } },
{ LR11x0::MODE_TX_HP, { HIGH, LOW } },
{ LR11x0::MODE_TX_HF, { LOW, LOW } },
{ LR11x0::MODE_GNSS, { LOW, LOW } },
{ LR11x0::MODE_WIFI, { LOW, LOW } },
END_OF_MODE_TABLE,
};

View File

@ -105,14 +105,16 @@
// LoRa // LoRa
#define USE_SX1262 #define USE_SX1262
#define USE_SX1268 #define USE_SX1268
#define USE_SX1280
#define USE_LR1121
#define LORA_SCK 35 #define LORA_SCK 35
#define LORA_MISO 33 #define LORA_MISO 33
#define LORA_MOSI 34 #define LORA_MOSI 34
#define LORA_CS 36 #define LORA_CS 36
#define LORA_RESET 47
#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 47
#define LORA_DIO1 14 // SX1262 IRQ #define LORA_DIO1 14 // SX1262 IRQ
#define LORA_DIO2 48 // SX1262 BUSY #define LORA_DIO2 48 // SX1262 BUSY
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled #define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
@ -123,3 +125,18 @@
#define SX126X_RESET LORA_RESET #define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 3.0 #define SX126X_DIO3_TCXO_VOLTAGE 3.0
#define SX128X_CS LORA_CS
#define SX128X_DIO1 LORA_DIO1
#define SX128X_BUSY LORA_DIO2
#define SX128X_RESET LORA_RESET
#define LR1121_IRQ_PIN LORA_DIO1
#define LR1121_NRESET_PIN LORA_RESET
#define LR1121_BUSY_PIN LORA_DIO2
#define LR1121_SPI_NSS_PIN LORA_CS
#define LR1121_SPI_SCK_PIN LORA_SCK
#define LR1121_SPI_MOSI_PIN LORA_MOSI
#define LR1121_SPI_MISO_PIN LORA_MISO
#define LR11X0_DIO3_TCXO_VOLTAGE 3.0
#define LR11X0_DIO_AS_RF_SWITCH