Skip to content

feat: add M5Stack Unit C6L variant support - #2632

Closed
vistalba wants to merge 0 commit into
meshcore-dev:devfrom
vistalba:pr-to-dev
Closed

feat: add M5Stack Unit C6L variant support#2632
vistalba wants to merge 0 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

@vistalba
vistalba marked this pull request as ready for review May 27, 2026 04:43
@MeshTast

MeshTast commented Jun 24, 2026

Copy link
Copy Markdown

Thanks for supporting this device!! 👍

PS: Now I order 3 of these 😃

@Improver2000

Copy link
Copy Markdown

Wonderful! I'll switch then from Meshtastic to MeshCore with my m5stack. It's a nice simple starting device.

@vistalba

vistalba commented Aug 2, 2026

Copy link
Copy Markdown
Author

I re-opend this as a new PR directly forked from this MeshCore repo.
You can find it here: #3100

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.

3 participants