Skip to content

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

@adamgreen

Description

@adamgreen

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions