Skip to content

feat: add SP616E serial LED controller driver#1558

Open
MysticCodolic wants to merge 1 commit into
awawa-dev:masterfrom
MysticCodolic:feature/sp616e-driver
Open

feat: add SP616E serial LED controller driver#1558
MysticCodolic wants to merge 1 commit into
awawa-dev:masterfrom
MysticCodolic:feature/sp616e-driver

Conversation

@MysticCodolic

Copy link
Copy Markdown

Summary

Add native serial driver support for the SP616E LED controller. The SP616E uses a
simple protocol: raw RGB pixel data followed by a 0xFF terminator byte, with no
header, checksum, or length field. Default baud rate is 115200.

This follows the same architecture as existing serial drivers (TPM2, SEDU, etc.)
with the standard ProviderSerial base class.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

Fixes: #1557

Other information:

Files Changed (4 files, +85 lines)

File Type Description
include/led-drivers/serial/DriverSerialSP616E.h NEW Header — class declaration inheriting ProviderSerial
sources/led-drivers/serial/DriverSerialSP616E.cpp NEW Implementation — init, writeFiniteColors, auto-registration
sources/led-drivers/schemas/schema-sp616e.json NEW JSON schema — output port, baud rate (115200), delay after connect
sources/led-drivers/LedDeviceSchemas.qrc MODIFIED Register the schema in the Qt resource file

SP616E Protocol

Property Value
Header None
Pixel format Raw RGB (3 bytes per LED)
Terminator 0xFF
Frame size (LED count × 3) + 1 bytes
Checksum None
Default baud 115200
Default port /dev/ttyACM0

Implementation Notes

  • Follows the exact same pattern as DriverSerialTpm2 and DriverSerialSedu
  • Uses _ledRGBCount for buffer sizing (dynamic, no hardcoded LED limit)
  • Buffer is zero-initialized with explicit 0x00 fill
  • Terminator is set once in init() and preserved across frames
    (only the RGB region is overwritten by memcpy in writeFiniteColors)
  • Auto-registers via REGISTER_LED_DEVICE("sp616e", "leds_group_3_serial", ...)
image

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.

Add SP616E serial LED controller support

1 participant