Skip to content

feat: add M5Stack Unit C6L variant support#2632

Open
vistalba wants to merge 1 commit into
meshcore-dev:devfrom
vistalba:pr-to-dev
Open

feat: add M5Stack Unit C6L variant support#2632
vistalba wants to merge 1 commit into
meshcore-dev:devfrom
vistalba:pr-to-dev

Conversation

@vistalba
Copy link
Copy Markdown

Summary

Adds full support for the M5Stack Unit C6L (ESP32-C6 + SX1262 LoRa), including PI4IO I/O expander for RF switch control and a custom minimal UITask for the 64x48 SSD1306 SPI display.

Changes

New variant: variants/m5stack_unit_c6l/

  • Board class (UnitC6LBoard): PI4IO I/O expander (reset, direction, pull-up/pull-down), SPI bus management, display/RF switch init
  • Hardware config (platformio.ini): corrected pins (NeoPixel TX on 2, I2C SDA=10/SCL=8, SPI shared with LoRa)
  • DIO flash mode: board_build.flash_mode = dio — fixes bootloop on ESP32-C6 rev v0.2 (see Added flash_mode=dio to avoid boot loop when flashing using merge.bin #2570)
  • 4 firmware environments: companion USB, companion BLE, repeater, room server

Display support (SSD1306SPIDisplay)

  • New SPI-bus-sharing OLED driver in src/helpers/ui/SSD1306SPIDisplay.*
  • Shares SPI bus with LoRa SX1262 via lazy init (spi_initialized flag)
  • Custom minimal UITask in variants/m5stack_unit_c6l/companion/ — shows PIN, scrolling node name, frequency, unread count
  • Fits 64x48 display (standard UITask overflows)

Shared fixes

  • src/helpers/esp32/SerialBLEInterface.cpp: fixed include "esp_mac.h"<esp_mac.h>
  • src/helpers/ui/DisplayDriver.h: added MarqueeScroller struct

Add variant configuration for M5Stack Unit C6L (ESP32-C6, SX1262 LoRa,
SSD1306 64x48 SPI display). Includes:
- Board class with PI4IO I/O expander for LoRa RF control
- DIO flash mode fix for ESP32-C6 bootloader compatibility
- SSD1306 SPI display with custom minimal UITask for 64x48
- CustomSerialBLEInterface fix for correct BLE Connected status
- All 4 firmware environments: companion (USB/BLE), repeater, room server
@vistalba vistalba marked this pull request as ready for review May 27, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant