Loading...
Searching...
No Matches
rgbled.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
21#ifndef RGBLED_H
22#define RGBLED_H
23
24#include "color.h"
25#include "periph/pwm.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
34typedef struct {
39} rgbled_t;
40
50void rgbled_init(rgbled_t *led, pwm_t pwm, int channel_r, int channel_g, int channel_b);
51
58void rgbled_set(const rgbled_t *led, color_rgb_t *color);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* RGBLED_H */
Headers for the color handling module.
uint_fast8_t pwm_t
Default PWM type definition.
Definition pwm.h:92
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.
void rgbled_set(const rgbled_t *led, color_rgb_t *color)
Set the RGB-LED to the given color value.
Low-level PWM peripheral driver interface definitions.
Data-structure describing a RGB color.
Definition color.h:35
Descriptor struct for rgbleds.
Definition rgbled.h:34
int channel_g
set the G value in RGB
Definition rgbled.h:37
pwm_t device
PWM device to use to control rgbleds.
Definition rgbled.h:35
int channel_b
set the B value in RGB
Definition rgbled.h:38
int channel_r
set the R value in RGB
Definition rgbled.h:36