Added Heltec V4.3 support/FEM autodetection

This commit is contained in:
2026-04-26 14:08:23 +03:00
parent 0ef379595f
commit bc60028852
5 changed files with 146 additions and 26 deletions

View File

@@ -151,6 +151,10 @@
#endif
#endif
#define LORA_PA_UNKNOWN 0x00
#define LORA_PA_GC1109 0x01
#define LORA_PA_KCT8103L 0x02
#define HAS_DISPLAY false
#define HAS_BLUETOOTH false
#define HAS_BLE false
@@ -363,7 +367,7 @@
#define HAS_SLEEP true
#define PIN_WAKEUP GPIO_NUM_0
#define WAKEUP_LEVEL 0
#define OCP_TUNED 0x18
#define OCP_TUNED 0x28
const int pin_btn_usr1 = 0;
@@ -411,8 +415,9 @@
#define HAS_LORA_LNA true
#define PIN_WAKEUP GPIO_NUM_0
#define WAKEUP_LEVEL 0
#define OCP_TUNED 0x18
#define OCP_TUNED 0x28
#define Vext GPIO_NUM_36
#define LORA_PA_MODEL LORA_PA_UNKNOWN;
const int pin_btn_usr1 = 0;
@@ -434,14 +439,17 @@
#define LORA_LNA_GAIN 17
#define LORA_LNA_GVT 12
#define LORA_PA_GC1109 true
#define LORA_PA_PWR_EN 7
#define LORA_PA_CSD 2
#define LORA_PA_CPS 46
#define LORA_PA_CSD 2 // Same pin on GC1109
#define LORA_PA_CPS 46 // Same pin on GC1109
#define LORA_PA_CTX 5 // Only used on KCT8103
#define PA_MAX_OUTPUT 28
#define PA_GAIN_POINTS 22
#define PA_GAIN_VALUES 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 9, 8, 7
#define LORA_LNA_KCT8103L_GAIN 21
const int PA_GC1109_VALUES[PA_GAIN_POINTS] = {11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 9, 8, 7};
const int PA_KCT8103L_VALUES[PA_GAIN_POINTS] = {13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 9, 8, 7};
const int pin_cs = 8;
const int pin_busy = 13;
@@ -529,13 +537,10 @@
const int pin_np = 12;
const int pin_dac = 25;
const int pin_adc = 34;
// CBA already defined by framework
//const int SD_MISO = 2;
// CBA already defined by framework
//const int SD_MOSI = 15;
const int SD_MISO = 2;
const int SD_MOSI = 15;
const int SD_CLK = 14;
// CBA already defined by framework
//const int SD_CS = 13;
const int SD_CS = 13;
#if HAS_NP == false
#if defined(EXTERNAL_LEDS)
const int pin_led_rx = 12;
@@ -980,7 +985,7 @@
// Default OCP value if not specified
// in board configuration
#ifndef OCP_TUNED
#define OCP_TUNED 0x18
#define OCP_TUNED 0x28
#endif
#ifndef PA_MAX_OUTPUT