High-level driver for RGB-LEDs.
More...
High-level driver for RGB-LEDs.
|
file | rgbled.h |
| High-level driver for easy handling of RGB-LEDs.
|
|
◆ rgbled_init()
void rgbled_init |
( |
rgbled_t * |
led, |
|
|
pwm_t |
pwm, |
|
|
int |
channel_r, |
|
|
int |
channel_g, |
|
|
int |
channel_b |
|
) |
| |
Initialize the RGB LED by assigning PWM channels to colors.
- Parameters
-
[in] | led | Struct identifying the LED |
[in] | pwm | PWM device to drive the LED |
[in] | channel_r | PWM channel connected to red |
[in] | channel_g | PWM channel connected to green |
[in] | channel_b | PWM channel connected to blue |
◆ rgbled_set()
Set the RGB-LED to the given color value.
- Parameters
-
[in] | led | Struct identifying the LED to set |
[in] | color | Color to set the led to |