aboutsummaryrefslogtreecommitdiff
path: root/src/include/device/rgbled.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-08-12 14:49:32 +1000
committerLorenz Meier <lm@inf.ethz.ch>2013-08-14 15:02:15 +0200
commit21a919d973c13d7d2259b47116480ade819d7b8c (patch)
treedcf5bfffd01046a27ad3ebc9b12726808c1c6827 /src/include/device/rgbled.h
parente14d034528088412e6d85f5c0c07917e8076e981 (diff)
downloadpx4-firmware-21a919d973c13d7d2259b47116480ade819d7b8c.tar.gz
px4-firmware-21a919d973c13d7d2259b47116480ade819d7b8c.tar.bz2
px4-firmware-21a919d973c13d7d2259b47116480ade819d7b8c.zip
rgbled: added LED_MODE_RGB to allow for constant RGB values
this allows apps to fully control the 3 LED elements
Diffstat (limited to 'src/include/device/rgbled.h')
-rw-r--r--src/include/device/rgbled.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/device/rgbled.h b/src/include/device/rgbled.h
index a18920892..600a65d28 100644
--- a/src/include/device/rgbled.h
+++ b/src/include/device/rgbled.h
@@ -65,3 +65,17 @@
* The script is terminated by a zero command.
*/
#define RGBLED_SET_USER_SCRIPT _RGBLEDIOC(3)
+
+/** set constant RGB values */
+#define RGBLED_SET _RGBLEDIOC(4)
+
+/*
+ structure passed to RGBLED_SET ioctl()
+ Note that the driver scales the brightness to 0 to 255, regardless
+ of the hardware scaling
+ */
+struct RGBLEDSet {
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
+};