High-level driver for RGB-LEDs. More...

Detailed Description


file  rgbled.h
 High-level driver for easy handling of RGB-LEDs.

Data Structures

struct  rgbled_t
 Descriptor struct for rgbleds. More...


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. More...
void rgbled_set (const rgbled_t *led, color_rgb_t *color)
 Set the RGB-LED to the given color value. More...

Function Documentation

◆ rgbled_init()

void rgbled_init ( rgbled_t led,
pwm_t  pwm,
int  channel_r,
int  channel_g,
int  channel_b 
[in]ledStruct identifying the LED
[in]pwmPWM device to drive the LED
[in]channel_rPWM channel connected to red
[in]channel_gPWM channel connected to green
[in]channel_bPWM channel connected to blue

◆ rgbled_set()

void rgbled_set ( const rgbled_t led,
color_rgb_t color 
[in]ledStruct identifying the LED to set
[in]colorColor to set the led to