Skip to content

HD108 method using PARLIO peripheral on ESP32-C6#907

Open
tommag wants to merge 3 commits intoMakuna:masterfrom
tommag:hd108-parlio
Open

HD108 method using PARLIO peripheral on ESP32-C6#907
tommag wants to merge 3 commits intoMakuna:masterfrom
tommag:hd108-parlio

Conversation

@tommag
Copy link
Copy Markdown

@tommag tommag commented Jan 27, 2026

Hello,

Here is a method to use the new PARLIO peripheral in ESP32-C5 / C6 / P4 / H2 / H4

I have only defined it for the HD108 type yet but it should be pretty easy to adapt for other 2 wire LEDs, while freeing the SPI controller for other tasks.

I also fixed the generic HD108 method that had refresh issues.

Tested with an ESP32-C6 and HD108 LEDs at max 10MHz (but should work up to 40MHz).

Thanks for sharing your work and for the nice code architecture, I enjoyed adding features to the lib which is not always the case !

Without setting valid_gpio_num to -1, GPIO0 will be setup for the valid signal
Copy link
Copy Markdown
Owner

@Makuna Makuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some minor style updates needed

private:
void initParlio()
{
parlio_tx_unit_config_t config = {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style:
This library uses the "curly braces on their own line" format style.
While in general initialization (like this line) are often not strictly inforced, it more important for branching statements EVEN if they are single line (see below).

_wire.transmitBytes(startFrame, sizeof(startFrame));
//start frame : 128bits (16bytes) with DIN = 0
for (int i = 0; i < 16; i++)
_wire.transmitByte(0x00);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style:
This library uses the "all code blocks require wrapping curly braces" and "curly braces on their own line" format styles.
so this needs to change to something like...

for (int i = 0; i < 16; i++)
{
            _wire.transmitByte(0x00);
}

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.

2 participants