PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Social
libbadgetools
leds_rgb.c
1
#include <propeller.h>
2
#include "
badgetools.h
"
3
4
light
badgeLight;
5
light
*ledsself;
6
7
int32_t cpcog;
8
9
void
rgb
(
int
side,
int
color)
10
{
11
color &= 0b111;
12
if
(side ==
L
)
13
{
14
light_set_rgb2(color);
15
}
16
else
if
(side ==
R
)
17
{
18
light_set_rgb1(color);
19
}
20
}
21
22
/*
23
TERMS OF USE: MIT License
24
25
Permission is hereby granted, free of charge, to any person obtaining a
26
copy of this software and associated documentation files (the "Software"),
27
to deal in the Software without restriction, including without limitation
28
the rights to use, copy, modify, merge, publish, distribute, sublicense,
29
and/or sell copies of the Software, and to permit persons to whom the
30
Software is furnished to do so, subject to the following conditions:
31
32
The above copyright notice and this permission notice shall be included in
33
all copies or substantial portions of the Software.
34
35
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41
DEALINGS IN THE SOFTWARE.
42
*/
43
light
Definition:
badgetools.h:1224
R
#define R
For selecting the right of the two RGB LEDs. Example: rgb(R, GREEN) would set the right RGB LED to th...
Definition:
badgetools.h:96
rgb
void rgb(int side, int color)
Sets the color of the left or right RGB LED. Examples: rgb(L, RED) makes the left RGB LED glow red....
Definition:
leds_rgb.c:9
L
#define L
For selecting the left of the two RGB LEDs. Example: rgb(L, RED) would set the left RGB LED to the co...
Definition:
badgetools.h:88
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17