feat: add SP616E serial LED controller driver#1558
Open
MysticCodolic wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add native serial driver support for the SP616E LED controller. The SP616E uses a
simple protocol: raw RGB pixel data followed by a
0xFFterminator byte, with noheader, checksum, or length field. Default baud rate is 115200.
This follows the same architecture as existing serial drivers (TPM2, SEDU, etc.)
with the standard
ProviderSerialbase class.What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
Fixes: #xxx[,#xxx], where "xxx" is the issue number)Fixes: #1557
Other information:
Files Changed (4 files, +85 lines)
include/led-drivers/serial/DriverSerialSP616E.hProviderSerialsources/led-drivers/serial/DriverSerialSP616E.cppsources/led-drivers/schemas/schema-sp616e.jsonsources/led-drivers/LedDeviceSchemas.qrcSP616E Protocol
0xFF(LED count × 3) + 1bytes/dev/ttyACM0Implementation Notes
DriverSerialTpm2andDriverSerialSedu_ledRGBCountfor buffer sizing (dynamic, no hardcoded LED limit)0x00fillinit()and preserved across frames(only the RGB region is overwritten by
memcpyinwriteFiniteColors)REGISTER_LED_DEVICE("sp616e", "leds_group_3_serial", ...)