feat: add multi-intensity LED support - #60
Open
thomas-brunel wants to merge 1 commit into
Open
thomas-brunel wants to merge 1 commit into
thomas-brunel wants to merge 1 commit into
Conversation
Signed-off-by: Thomas BRUNEL <thomas.brunel@madic.com>
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.
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:
led_get_multi_intensityandled_set_multi_intensityfunctions to allow reading and setting red, green, and blue intensity values for an LED insrc/led.cand declared them insrc/led.h. These functions interact with the/sys/class/leds/<name>/multi_intensitysysfs interface and include validation to ensure values are within the 0–255 range.Testing:
tests/test_led.cto 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.