Add Heltec RC32, RC52 and RCC6 boards, and LC760CA GNSS support (#11572)

* refactor(graphics): select Arduino_GFX panels with a capability flag

TFTDisplay tested `defined(HACKADAY_COMMUNICATOR)` in a dozen places to mean
"this panel is driven by Arduino_GFX rather than LovyanGFX". Every new
Arduino_GFX board had to be appended to all of them.

Move the decision into the variant as USE_ARDUINO_GFX so the display code
stops naming individual boards. No behaviour change: the Hackaday Communicator
is still the only board that sets it.

* feat(boards): add Heltec RC32, RC52 and RCC6

Three boards around the same 128x220 NV3001B panel: RC32 (ESP32-S3), RCC6
(ESP32-C6) and RC52 (nRF52840). They differ only in how the panel bus is
wired, so they share one branch in TFTDisplay behind TFT_NV3001B.

RC32 and RC52 also carry a rotary encoder on a TCA6408 I2C expander. That
lands as its own input source rather than as board conditionals inside
i2cButton, which is the M5Stack UnitC6L button driver and stays untouched.

On RC52 and RCC6 the panel is an add-on module, so probe it before reporting
a screen. The probe reuses the bit-banged SPI helper that already backs the
T114 ST7789 check.

Arduino_GFX is pinned to the upstream commit that added the NV3001B driver;
it has not shipped in a tagged release yet.

Co-Authored-By: Quency-D <55523105+Quency-D@users.noreply.github.com>

* feat(gps): detect and configure the LC760CA GNSS module

The LC760CA is another Unicore part, so it joins the $PDTINFO probe family
and reuses the CM121 message-rate setup. It answers with CC1161W.

GNSS_MODEL_LC760CA goes immediately before GNSS_MODEL_GENERIC_NMEA: the
sentinel has to stay last because isValidGnssModel() uses it as the exclusive
upper bound on values the probe cache may hold. Placing the new model after
it would leave LC760CA permanently uncacheable.

Co-Authored-By: Quency-D <55523105+Quency-D@users.noreply.github.com>

* fix(graphics): re-init the NV3001B after the panel rail comes back

DISPLAYOFF de-asserts VTFT_CTRL, which cuts power to the panel, so the
controller loses MADCTL, COLMOD and gamma. displayOn() only sends sleep-out
and cannot restore them, leaving the panel dark or in the wrong format after
wake. Re-run begin() once the rail has settled, and repaint in full since the
re-init leaves display RAM undefined.

Also stop the TCA6408 rotary polling from two threads at once. Registering as
an InputPollable meant InputBroker's pollSoon task could call pollOnce() while
runOnce() was mid-transfer on the main thread, with nothing serialising Wire
or the decoder state. Drop InputPollable and have the interrupt wake the
thread instead, the way ButtonThread does, so the bus and the decode stay on
one thread.

* fix(graphics): skip the NV3001B wake when re-init fails

begin() reports whether the bus came up. Ignoring it meant a failed re-init
still lit the backlight and drove a full-screen repaint at a panel that was
never initialised.

* chore(boards): ship the Heltec RC boards at release level

release is the normal level for a variant; the matrix generator still builds
each of these in this PR because they add a new platformio.ini.

---------

Co-authored-by: Quency-D <55523105+Quency-D@users.noreply.github.com>
This commit is contained in:
Ben Meadors
2026-08-23 11:00:37 +00:00
committed by GitHub
co-authored by Quency-D
parent ac330e6a6b
commit bfd1e1a231
23 changed files with 1031 additions and 17 deletions
@@ -0,0 +1,20 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303A
#define USB_PID 0x1001
static const uint8_t TX = 16;
static const uint8_t RX = 17;
static const int8_t SDA = -1;
static const int8_t SCL = -1;
static const uint8_t MISO = 20;
static const uint8_t SCK = 21;
static const uint8_t MOSI = 22;
static const uint8_t SS = 23;
#endif /* Pins_Arduino_h */
@@ -0,0 +1,35 @@
[env:heltec-rcc6]
custom_meshtastic_hw_model = 143
custom_meshtastic_hw_model_slug = HELTEC_RCC6
custom_meshtastic_architecture = esp32-c6
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = Heltec RCC6
custom_meshtastic_images = heltec-rcc6.svg
custom_meshtastic_tags = Heltec
custom_meshtastic_partition_scheme = 16MB
custom_meshtastic_has_mui = false
extends = esp32c6_base
board = heltec_rcc6
board_level = release
board_build.partitions = default_16MB.csv
upload_protocol = esptool
build_flags =
${esp32c6_base.build_flags}
-D HELTEC_RCC6
-I variants/esp32c6/heltec_rcc6
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
-DMESHTASTIC_EXCLUDE_AUDIO=1
lib_deps =
${esp32c6_base.lib_deps}
# renovate: datasource=git-refs depName=moononournation-Arduino_GFX packageName=https://github.com/moononournation/Arduino_GFX gitBranch=master
# Pinned to a commit rather than a tag: the NV3001B driver has not shipped in a release yet.
https://github.com/moononournation/Arduino_GFX/archive/4d5afb05ce70a51895fe65efc7838d606b2a95a7.zip
lib_ignore =
${esp32c6_base.lib_ignore}
ESP32 Codec2
+59
View File
@@ -0,0 +1,59 @@
#pragma once
#define _VARIANT_HELTEC_RCC6_
#define BUTTON_PIN 9
#define HAS_SCREEN 1
#define HAS_SPI_TFT 1
#define USE_TFTDISPLAY 1
#define USE_ARDUINO_GFX 1
#define TFT_NV3001B 1
#define TFT_NV3001B_DETECT 1
#define HAS_GPS 0
#define HAS_WIRE 0
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define USE_SX1262
#define LORA_SCK 21
#define LORA_MISO 20
#define LORA_MOSI 22
#define LORA_CS 23
#define LORA_RESET 8
#define LORA_DIO1 19
#define LORA_BUSY 10
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_BUSY
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define BATTERY_PIN 6
#define ADC_CHANNEL ADC_CHANNEL_6
#define ADC_CTRL 5
#define ADC_CTRL_ENABLED HIGH
#define ADC_MULTIPLIER 4.95f
#define TFT_SCL 4
#define TFT_SDA 15
#define TFT_CS 18
#define TFT_RS 3
#define TFT_DC TFT_RS
#define TFT_RST 0
#define TFT_EN 2
#define TFT_EN_ON LOW
#define TFT_EN_OFF HIGH
#define VTFT_CTRL TFT_EN
#define TFT_BL 1
#define TFT_BLK TFT_BL
#define TFT_BACKLIGHT_ON HIGH
#define TFT_BACKLIGHT_OFF LOW
#define TFT_WIDTH 128
#define TFT_HEIGHT 220
#define TFT_BLACK 0
#define SPI_FREQUENCY 4000000
#define SCREEN_ROTATE
#define SERIAL_PRINT_PORT 1
@@ -12,6 +12,7 @@
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
#define USE_TFTDISPLAY 1
#define HAS_SPI_TFT 1
#define USE_ARDUINO_GFX 1
#define USE_POWERSAVE
#define SLEEP_TIME 120
@@ -0,0 +1,60 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
static const uint8_t TX = 43;
static const uint8_t RX = 44;
static const uint8_t SDA = 21;
static const uint8_t SCL = 18;
static const uint8_t SS = 10;
static const uint8_t MOSI = 12;
static const uint8_t MISO = 13;
static const uint8_t SCK = 11;
static const uint8_t A0 = 1;
static const uint8_t A1 = 2;
static const uint8_t A2 = 3;
static const uint8_t A3 = 4;
static const uint8_t A4 = 5;
static const uint8_t A5 = 6;
static const uint8_t A6 = 7;
static const uint8_t A7 = 8;
static const uint8_t A8 = 9;
static const uint8_t A9 = 10;
static const uint8_t A10 = 11;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 14;
static const uint8_t A14 = 15;
static const uint8_t A15 = 16;
static const uint8_t A16 = 17;
static const uint8_t A17 = 18;
static const uint8_t A18 = 19;
static const uint8_t A19 = 20;
static const uint8_t T1 = 1;
static const uint8_t T2 = 2;
static const uint8_t T3 = 3;
static const uint8_t T4 = 4;
static const uint8_t T5 = 5;
static const uint8_t T6 = 6;
static const uint8_t T7 = 7;
static const uint8_t T8 = 8;
static const uint8_t T9 = 9;
static const uint8_t T10 = 10;
static const uint8_t T11 = 11;
static const uint8_t T12 = 12;
static const uint8_t T13 = 13;
static const uint8_t T14 = 14;
static const uint8_t RST_LoRa = 9;
static const uint8_t BUSY_LoRa = 1;
static const uint8_t DIO1_LoRa = 14;
#endif /* Pins_Arduino_h */
@@ -0,0 +1,28 @@
[env:heltec-rc32]
custom_meshtastic_hw_model = 141
custom_meshtastic_hw_model_slug = HELTEC_RC32
custom_meshtastic_architecture = esp32-s3
custom_meshtastic_display_name = Heltec RC32
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_images = heltec-rc32.svg
custom_meshtastic_tags = Heltec
custom_meshtastic_requires_dfu = true
custom_meshtastic_partition_scheme = 16MB
custom_meshtastic_has_mui = false
extends = esp32s3_base
board = heltec_rc32
board_level = release
board_build.partitions = default_16MB.csv
build_flags =
${esp32s3_base.build_flags}
-D HELTEC_RC32
-D USE_PIN_BUZZER=PIN_BUZZER
-D BOARD_HAS_PSRAM
-I variants/esp32s3/heltec_rc32
lib_deps =
${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=moononournation-Arduino_GFX packageName=https://github.com/moononournation/Arduino_GFX gitBranch=master
# Pinned to a commit rather than a tag: the NV3001B driver has not shipped in a release yet.
https://github.com/moononournation/Arduino_GFX/archive/4d5afb05ce70a51895fe65efc7838d606b2a95a7.zip
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include_next "sdkconfig.h"
// qio_opi enables this, but Meshtastic removes the matching IDF component.
#ifdef CONFIG_NETWORK_PROV_NETWORK_TYPE_WIFI
#undef CONFIG_NETWORK_PROV_NETWORK_TYPE_WIFI
#endif
#define CONFIG_NETWORK_PROV_NETWORK_TYPE_WIFI 0
#ifndef CONFIG_LITTLEFS_PAGE_SIZE
#define CONFIG_LITTLEFS_MAX_PARTITIONS 3
#define CONFIG_LITTLEFS_PAGE_SIZE 256
#define CONFIG_LITTLEFS_OBJ_NAME_LEN 64
#define CONFIG_LITTLEFS_READ_SIZE 128
#define CONFIG_LITTLEFS_WRITE_SIZE 128
#define CONFIG_LITTLEFS_LOOKAHEAD_SIZE 128
#define CONFIG_LITTLEFS_CACHE_SIZE 512
#define CONFIG_LITTLEFS_BLOCK_CYCLES 512
#define CONFIG_LITTLEFS_USE_MTIME 1
#define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1
#define CONFIG_LITTLEFS_MALLOC_STRATEGY_DEFAULT 1
#define CONFIG_LITTLEFS_ASSERTS 1
#endif
+78
View File
@@ -0,0 +1,78 @@
#ifndef _VARIANT_HELTEC_RC32_
#define _VARIANT_HELTEC_RC32_
#define HAS_SCREEN 1
#define HAS_SPI_TFT 1
#define USE_TFTDISPLAY 1
#define USE_ARDUINO_GFX 1
#define TFT_NV3001B 1
#define TFT_NV3001B_DETECT 1
#define TFT_SCL 17
#define TFT_SDA 38
#define TFT_CS 39
#define TFT_RS 16
#define TFT_DC TFT_RS
#define TFT_RST 4
#define TFT_EN 6
#define TFT_EN_ON LOW
#define TFT_EN_OFF HIGH
#define VTFT_CTRL TFT_EN
#define TFT_BL 5
#define TFT_BLK TFT_BL
#define TFT_BACKLIGHT_ON HIGH
#define TFT_BACKLIGHT_OFF LOW
#define TFT_WIDTH 128
#define TFT_HEIGHT 220
#define TFT_BLACK 0
#define SPI_FREQUENCY 8000000
#define SCREEN_ROTATE
#define BUTTON_PIN 0
#define HAS_GPS 1
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 44
#define GPS_TX_PIN 43
#define PIN_GPS_EN 45
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_RESET 40
#define GPS_RESET_MODE LOW
#define PIN_GPS_PPS 41
#define I2C_SCL 18
#define I2C_SDA 21
#define SENSOR_INT 42
#define SENSOR_RST 2
#define SENSOR_POWER_CTRL_PIN 46
#define SENSOR_POWER_ON HIGH
#define HAS_TCA6408_ROTARY 1
#define PERIPHERAL_WARMUP_MS 100
#define LED_POWER 47
#define PIN_BUZZER 48
#define USE_SX1262
#define LORA_SCK 11
#define LORA_MISO 13
#define LORA_MOSI 12
#define LORA_CS 10
#define LORA_DIO0 RADIOLIB_NC
#define LORA_DIO1 14
#define LORA_RESET 9
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY 1
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define BATTERY_PIN 7
#define ADC_CHANNEL ADC_CHANNEL_6
#define ADC_CTRL 15
#define ADC_CTRL_ENABLED HIGH
#define ADC_MULTIPLIER 4.9
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5
#endif
@@ -0,0 +1,30 @@
; Heltec RC52 nRF52840/SX1262 device
[env:heltec-rc52]
custom_meshtastic_hw_model = 142
custom_meshtastic_hw_model_slug = HELTEC_RC52
custom_meshtastic_architecture = nrf52840
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = Heltec RC52
custom_meshtastic_images = heltec-rc52.svg
custom_meshtastic_tags = Heltec
extends = nrf52840_base
board = heltec_rc52
board_level = release
debug_tool = jlink
build_flags = ${nrf52840_base.build_flags}
-UOLEDDISPLAY_REDUCE_MEMORY ; TFTDisplay.cpp needs the lib's buffer_back for dirty-window diffing
-Ivariants/nrf52840/heltec_rc52
-DHELTEC_RC52
-D PIN_BUZZER=5
-D USE_PIN_BUZZER=PIN_BUZZER
-DCONFIG_NFCT_PINS_AS_GPIOS=1
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_rc52>
lib_deps =
${nrf52840_base.lib_deps}
# renovate: datasource=git-refs depName=moononournation-Arduino_GFX packageName=https://github.com/moononournation/Arduino_GFX gitBranch=master
# Pinned to a commit rather than a tag: the NV3001B driver has not shipped in a release yet.
https://github.com/moononournation/Arduino_GFX/archive/4d5afb05ce70a51895fe65efc7838d606b2a95a7.zip
+103
View File
@@ -0,0 +1,103 @@
#include "variant.h"
#include "Arduino.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0 - pins 0 and 1 are hardwired for xtal and should never be enabled
0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
pinMode(PIN_LED1, OUTPUT);
digitalWrite(PIN_LED1, LED_STATE_OFF);
pinMode(PIN_GPS_EN, OUTPUT);
digitalWrite(PIN_GPS_EN, !GPS_EN_ACTIVE);
pinMode(PIN_GPS_RESET, OUTPUT);
digitalWrite(PIN_GPS_RESET, !GPS_RESET_MODE);
pinMode(PIN_GPS_PPS, INPUT);
pinMode(SENSOR_POWER_CTRL_PIN, OUTPUT);
digitalWrite(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON);
pinMode(SENSOR_RST, OUTPUT);
digitalWrite(SENSOR_RST, HIGH);
pinMode(SENSOR_INT, INPUT);
pinMode(PIN_BUZZER, OUTPUT);
digitalWrite(PIN_BUZZER, LOW);
}
void variant_shutdown()
{
detachInterrupt(PIN_BUTTON1);
detachInterrupt(PIN_GPS_PPS);
detachInterrupt(SENSOR_INT);
pinMode(PIN_GPS_EN, OUTPUT);
digitalWrite(PIN_GPS_EN, !GPS_EN_ACTIVE);
pinMode(SENSOR_POWER_CTRL_PIN, OUTPUT);
digitalWrite(SENSOR_POWER_CTRL_PIN, !SENSOR_POWER_ON);
pinMode(PIN_BUZZER, OUTPUT);
digitalWrite(PIN_BUZZER, LOW);
pinMode(PIN_LED1, OUTPUT);
digitalWrite(PIN_LED1, LOW);
pinMode(ADC_CTRL, OUTPUT);
digitalWrite(ADC_CTRL, !ADC_CTRL_ENABLED);
pinMode(RADIOCORE_FEM_EN, OUTPUT);
digitalWrite(RADIOCORE_FEM_EN, LOW);
pinMode(RADIOCORE_VFEM_CTRL, OUTPUT);
digitalWrite(RADIOCORE_VFEM_CTRL, LOW);
pinMode(PIN_WIRE_SDA, OUTPUT);
digitalWrite(PIN_WIRE_SDA, LOW);
pinMode(PIN_WIRE_SCL, OUTPUT);
digitalWrite(PIN_WIRE_SCL, LOW);
nrf_gpio_cfg_default(PIN_WIRE_SDA);
nrf_gpio_cfg_default(PIN_WIRE_SCL);
nrf_gpio_cfg_default(PIN_GPS_PPS);
nrf_gpio_cfg_default(GPS_RX_PIN);
nrf_gpio_cfg_default(GPS_TX_PIN);
nrf_gpio_cfg_default(PIN_GPS_RESET);
nrf_gpio_cfg_default(SENSOR_POWER_CTRL_PIN);
nrf_gpio_cfg_default(SENSOR_RST);
nrf_gpio_cfg_default(SENSOR_INT);
nrf_gpio_cfg_default(SX126X_DIO1);
nrf_gpio_cfg_default(SX126X_BUSY);
nrf_gpio_cfg_default(SX126X_RESET);
nrf_gpio_cfg_default(PIN_SPI_MISO);
nrf_gpio_cfg_default(PIN_SPI_MOSI);
nrf_gpio_cfg_default(PIN_SPI_SCK);
nrf_gpio_cfg_default(RADIOCORE_FEM_EN);
nrf_gpio_cfg_default(RADIOCORE_VFEM_CTRL);
pinMode(TFT_EN, OUTPUT);
digitalWrite(TFT_EN, HIGH);
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, LOW);
pinMode(TFT_CS, OUTPUT);
digitalWrite(TFT_CS, LOW);
pinMode(TFT_RS, OUTPUT);
digitalWrite(TFT_RS, LOW);
pinMode(TFT_SCL, OUTPUT);
digitalWrite(TFT_SCL, LOW);
pinMode(TFT_SDA, OUTPUT);
digitalWrite(TFT_SDA, LOW);
pinMode(TFT_RST, OUTPUT);
digitalWrite(TFT_RST, LOW);
nrf_gpio_cfg_default(TFT_EN);
nrf_gpio_cfg_default(TFT_BL);
nrf_gpio_cfg_default(TFT_CS);
nrf_gpio_cfg_default(TFT_RS);
nrf_gpio_cfg_default(TFT_SCL);
nrf_gpio_cfg_default(TFT_SDA);
nrf_gpio_cfg_default(TFT_RST);
}
+136
View File
@@ -0,0 +1,136 @@
#ifndef _VARIANT_HELTEC_RC52_
#define _VARIANT_HELTEC_RC52_
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32 kHz crystal for LF
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (1)
#define NUM_ANALOG_OUTPUTS (0)
#define PIN_LED1 (0 + 15)
#define LED_POWER PIN_LED1
#define LED_BLUE (-1)
#define LED_GREEN PIN_LED1
#define LED_STATE_ON 1
#define LED_STATE_OFF (LED_STATE_ON ^ 1)
#define HAS_SCREEN 1
#define HAS_SPI_TFT 1
#define USE_TFTDISPLAY 1
#define USE_ARDUINO_GFX 1
#define TFT_NV3001B 1
#define TFT_NV3001B_DETECT 1
#define HAS_GPS 1
#define HAS_WIRE 1
/*
* Optional RS-T108 / NV3001B TFT module on P2
*/
#define TFT_SCL (0 + 30)
#define TFT_SDA (32 + 2)
#define TFT_CS (32 + 4)
#define TFT_RS (0 + 28)
#define TFT_DC TFT_RS
#define TFT_RST (0 + 10)
#define TFT_EN (32 + 13)
#define TFT_EN_ON LOW
#define TFT_EN_OFF HIGH
#define VTFT_CTRL TFT_EN
#define TFT_BL (0 + 9)
#define TFT_BACKLIGHT_ON HIGH
#define TFT_BACKLIGHT_OFF LOW
#define TFT_WIDTH 128
#define TFT_HEIGHT 220
#define SPI_FREQUENCY 8000000
#define SCREEN_ROTATE
/*
* Buttons
*/
#define PIN_BUTTON1 (32 + 10) // P1.10, external pull-up, active low
/*
* Sensor I2C and control pins
*/
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (32 + 11) // P1.11
#define PIN_WIRE_SCL (0 + 2) // P0.02
#define SENSOR_POWER_CTRL_PIN (0 + 12)
#define SENSOR_POWER_ON HIGH
#define SENSOR_INT (0 + 20)
#define SENSOR_RST (32 + 15)
#define HAS_TCA6408_ROTARY 1
/*
* Serial interfaces
*/
#define GPS_RX_PIN (0 + 8)
#define GPS_TX_PIN (0 + 7)
#define PIN_GPS_EN (32 + 9)
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_PPS (32 + 1)
#define PIN_GPS_RESET (32 + 6)
#define GPS_RESET_MODE LOW
#define GPS_THREAD_INTERVAL 50
#define PERIPHERAL_WARMUP_MS 100
#define PIN_SERIAL1_RX GPS_RX_PIN
#define PIN_SERIAL1_TX GPS_TX_PIN
#define PIN_SERIAL2_RX (-1)
#define PIN_SERIAL2_TX (-1)
/*
* LoRa radio
*/
#define USE_SX1262
#define SX126X_CS (0 + 13) // P0.13
#define LORA_CS SX126X_CS
#define SX126X_DIO1 (0 + 11) // P0.11
#define SX126X_BUSY (0 + 24) // P0.24
#define SX126X_RESET (32 + 0) // P1.00
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define RADIOCORE_FEM_EN (0 + 26)
#define RADIOCORE_VFEM_CTRL (0 + 16)
/*
* SPI
*/
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO (0 + 14)
#define PIN_SPI_MOSI (0 + 22)
#define PIN_SPI_SCK (0 + 25)
#define PIN_SPI1_MISO (-1)
#define PIN_SPI1_MOSI TFT_SDA
#define PIN_SPI1_SCK TFT_SCL
/*
* Battery
*/
#define ADC_CTRL (0 + 4)
#define ADC_CTRL_ENABLED HIGH
#define BATTERY_PIN (0 + 31) // P0.31/AIN7
#define ADC_RESOLUTION 14
#define BATTERY_SENSE_RESOLUTION_BITS 12
#define BATTERY_SENSE_RESOLUTION 4096.0
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER (4.9F)
#ifdef __cplusplus
}
#endif
#endif