* Add Meshnology W12 (WiFi LoRa 32 V5) variant with LR2021 radio ESP32-S3R8 + 16 MB flash + Semtech LR2021 dual-band LoRa + SSD1315 OLED, Heltec V3-style pinout. Pin map comes from the vendor pin sheet and vendor Arduino demos, confirmed on hardware: I2C scan finds the OLED at 0x3C on SDA17/SCL18, and the LR2021 answers on NSS=8 SCK=9 MISO=11 MOSI=10 with BUSY=13/NRESET=12 verified by reset-pulse probing. The IRQ line needs LR2021_IRQ_DIO_NUM 8. RadioLib defaults irqDioNum to 5, but DIO5 is not bonded out on this board - the two IRQ lines are DIO7 -> IO7 and DIO8 -> IO14, established by driving each radio DIO as a GPIO output and watching which ESP32 pin followed. Left at the default, every interrupt is routed to a floating pin: RX/TX still appear to work because RadioLibInterface::pollMissedIrqs() falls back to polling the IRQ status register, but the blocking scanChannel() waits on the pin itself and never returns. A shadow pins_arduino.h is needed because the generic esp32s3 one defines RGB_BUILTIN, which pulls the Arduino RMT HAL into the link and fails against this build's FreeRTOS config. * Address review: add W12 variant metadata, trim comments Declares the custom_meshtastic_* metadata the build manifest expects. Without it the emitted .mt.json carried no hwModel, slug, display name or support level, so the board was invisible to the flasher - and board_level = extra kept it out of PR builds entirely, which is why it never appeared in this PR's board list. It now matches the W10 sibling at board_level = pr with support level 1. hwModel stays 255/PRIVATE_HW until a W12 enum lands in the protobufs. Also trims the header comments to the one-or-two-line limit in AGENTS.md; the vendor pin sheet and probing evidence live in the PR description.
46 lines
2.5 KiB
C
46 lines
2.5 KiB
C
#pragma once
|
|
|
|
// Meshnology W12 "WiFi LoRa 32 V5" - ESP32-S3R8 (8 MB PSRAM) + 16 MB flash + Semtech LR2021
|
|
// dual-band LoRa (sub-GHz + 2.4 GHz) + SSD1315 0.96" OLED. Heltec V3-style pinout.
|
|
|
|
// ─── OLED ─────────────────────────────────────────────────────────────────────
|
|
// SSD1315 (SSD1306-compatible) 128x64 at 0x3C
|
|
#define USE_SSD1306
|
|
#define I2C_SDA 17
|
|
#define I2C_SCL 18
|
|
|
|
// Powers the OLED/peripheral rail; active LOW
|
|
#define VEXT_ENABLE 45
|
|
|
|
// ─── User input ───────────────────────────────────────────────────────────────
|
|
#define BUTTON_PIN 0 // BOOT doubles as user button
|
|
|
|
// ─── Battery ──────────────────────────────────────────────────────────────────
|
|
// GPIO2 monitors a second (solar/VUSB) divider and is not used here
|
|
#define BATTERY_PIN 1
|
|
#define ADC_CHANNEL ADC_CHANNEL_0 // GPIO1 = ADC1_CH0
|
|
#define ADC_MULTIPLIER 2.0
|
|
|
|
// ─── LoRa radio ───────────────────────────────────────────────────────────────
|
|
// RF switching is hardwired to the radio's CTX/CPS pins, and the external PA enables
|
|
// (IO3 sub-GHz, IO4 2.4GHz) are pulled high, so no RF-switch DIO table is needed.
|
|
#define USE_LR2021
|
|
#define LORA_SCK 9
|
|
#define LORA_MISO 11
|
|
#define LORA_MOSI 10
|
|
#define LORA_CS 8
|
|
#define LORA_DIO1 14 // radio DIO8; also the LoRa sleep-wake pin
|
|
|
|
#define LR2021_SPI_NSS_PIN LORA_CS
|
|
#define LR2021_IRQ_PIN LORA_DIO1
|
|
#define LR2021_NRESET_PIN 12
|
|
#define LR2021_BUSY_PIN 13
|
|
// Must be 8, not RadioLib's default of 5: DIO5 is not bonded out here, so the default
|
|
// points every interrupt at a floating pin and scanChannel() never returns.
|
|
#define LR2021_IRQ_DIO_NUM 8
|
|
// DIO7 -> IO7 is a second, unused IRQ line. Plain crystal on XTA/XTB, so no TCXO voltage.
|
|
|
|
// ─── Not wired up yet ─────────────────────────────────────────────────────────
|
|
// RGB LED on GPIO46 stays off: HAS_NEOPIXEL pulls in the RMT HAL, which fails to link here.
|
|
// L76K GNSS header (RX=39, TX=38, CTRL=48 active low, WAKE=40, PPS=41, RST=42) is unpopulated.
|