summaryrefslogtreecommitdiff
path: root/drivers/chibios/ws2812.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-03-21 05:20:04 +0000
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commitae6a8965ad345204de4ab631823b261364484962 (patch)
tree601dead00748cb286adfbbda1e70b0c6e0f99a1d /drivers/chibios/ws2812.h
parent0b34abe5b860b7819db885bded2993483d0f0df6 (diff)
Initial arm->chibios pass - simplify some platform logic (#8450)
Diffstat (limited to 'drivers/chibios/ws2812.h')
-rw-r--r--drivers/chibios/ws2812.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/chibios/ws2812.h b/drivers/chibios/ws2812.h
new file mode 100644
index 0000000000..41c22a00b8
--- /dev/null
+++ b/drivers/chibios/ws2812.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "quantum/color.h"
+
+/* User Interface
+ *
+ * Input:
+ * ledarray: An array of GRB data describing the LED colors
+ * number_of_leds: The number of LEDs to write
+ *
+ * The functions will perform the following actions:
+ * - Set the data-out pin as output
+ * - Send out the LED data
+ * - Wait 50us to reset the LEDs
+ */
+void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);