Skip to content

feat: add multi-intensity LED support - #60

Open
thomas-brunel wants to merge 1 commit into
vsergeev:masterfrom
thomas-brunel:feat/support_multi_intensity
Open

thomas-brunel wants to merge 1 commit into
vsergeev:masterfrom
thomas-brunel:feat/support_multi_intensity

Conversation

@thomas-brunel

Copy link
Copy Markdown

This pull request adds support for getting and setting multi-color (RGB) intensity values for LEDs, including validation and error handling, and introduces corresponding tests to ensure correct behavior.

New multi-intensity (RGB) API:

  • Added led_get_multi_intensity and led_set_multi_intensity functions to allow reading and setting red, green, and blue intensity values for an LED in src/led.c and declared them in src/led.h. These functions interact with the /sys/class/leds/<name>/multi_intensity sysfs interface and include validation to ensure values are within the 0–255 range.

Testing:

  • Updated tests/test_led.c to add tests for the new multi-intensity API, including setting and getting RGB values, and checking for proper error handling when out-of-bounds values are provided.

Signed-off-by: Thomas BRUNEL <thomas.brunel@madic.com>
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