RGB-LED driver¶
High-level driver for RGB-LEDs.
-
void
rgbled_init
(rgbled_t * led,pwm.h::pwm_t
pwm, int channel_r, int channel_g, int channel_b)¶ Initialize the RGB LED by assigning PWM channels to colors.
Parameters
led: Struct identifying the LED pwm: PWM device to drive the LED channel_r: PWM channel connected to red channel_g: PWM channel connected to green channel_b: PWM channel connected to blue
-
void
rgbled_set
(const rgbled_t * led, color_rgb_t * color)¶ Set the RGB-LED to the given color value.
Parameters
led: Struct identifying the LED to set color: Color to set the led to