Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgb_leds_write() doesn't allow setting the brightness on individual LEDs. #4

Open
adamgreen opened this issue Apr 8, 2023 · 0 comments

Comments

@adamgreen
Copy link
Contributor

Maybe the rgb_color structure could be renamed to something like rgbi_color where it could contain an intensity/brightness value for each LED or have the rgb_leds_write() take an array of uint8_t values for brightnesses instead of a single value.

typedef struct rgb_color {
  /// The value of the red component, from 0 to 255.
  uint8_t red;
  /// The value of the green component, from 0 to 255.
  uint8_t green;
  /// The value of the blue component, from 0 to 255.
  uint8_t blue;
  /// The value of the brightness component, from 0 to 31.
} rgbi_color;

void rgb_leds_write(rgbi_color * colors, uint32_t count);

-OR-

void rgb_leds_write(rgb_color * colors, uint8_t * brightness, uint32_t count);
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

No branches or pull requests

1 participant