Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
28
extern
"C"
{
29
#endif
30
34
typedef
struct
{
35
pwm_t
device
;
36
int
channel_r
;
37
int
channel_g
;
38
int
channel_b
;
39
}
rgbled_t
;
40
41
51
void
rgbled_init
(
rgbled_t
*led,
pwm_t
pwm,
int
channel_r,
int
channel_g,
int
channel_b);
52
59
void
rgbled_set
(
const
rgbled_t
*led,
color_rgb_t
*color);
60
61
#ifdef __cplusplus
62
}
63
#endif
64
65
#endif
/* RGBLED_H */
66
rgbled_set
void rgbled_set(const rgbled_t *led, color_rgb_t *color)
Set the RGB-LED to the given color value.
rgbled_t::channel_r
int channel_r
set the R value in RGB
Definition:
rgbled.h:36
rgbled_t::channel_g
int channel_g
set the G value in RGB
Definition:
rgbled.h:37
rgbled_t
Descriptor struct for rgbleds.
Definition:
rgbled.h:34
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.
rgbled_t::channel_b
int channel_b
set the B value in RGB
Definition:
rgbled.h:38
rgbled_t::device
pwm_t device
PWM device to use to control rgbleds.
Definition:
rgbled.h:35
color.h
Headers for the color handling module.
pwm.h
Low-level PWM peripheral driver interface definitions.
color_rgb_t
Data-structure describing a RGB color.
Definition:
color.h:35
pwm_t
unsigned int pwm_t
Default PWM type definition.
Definition:
pwm.h:92
Generated on Tue Nov 24 2020 19:46:51 by
1.8.17