Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b>2013-02-08 21:39:20 +0400
committerdanielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b>2013-02-08 21:39:20 +0400
commit5b5a3bac1cec00f9cf80897dee4593f6459aad29 (patch)
tree1590e6203ac6654842f739199cf0f27eaee4d5e6 /controller.h
parent82d745035e84ab9c149931dab76d392e70490200 (diff)
Initial checkin of FastSPI_LED2 core files
Diffstat (limited to 'controller.h')
-rw-r--r--controller.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/controller.h b/controller.h
new file mode 100644
index 00000000..5916042f
--- /dev/null
+++ b/controller.h
@@ -0,0 +1,35 @@
+#ifndef __INC_CONTROLLER_H
+#define __INC_CONTROLLER_H
+
+#include <avr/io.h>
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// LED Controller interface definition
+//
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+class CLEDController {
+public:
+ // initialize the LED controller
+ virtual void init() = 0;
+
+ // reset any internal state to a clean point
+ virtual void reset() { init(); }
+
+ // note that the uint8_ts will be in the order that you want them sent out to the device.
+ // nLeds is the number of RGB leds being written to
+ virtual void showRGB(uint8_t *data, int nLeds) = 0;
+
+ // as above, but every 4th uint8_t is assumed to be alpha channel data, and will be skipped
+ virtual void showARGB(uint8_t *data, int nLeds) = 0;
+
+ // is the controller ready to write data out
+ virtual bool ready() { return true; }
+
+ // wait until the controller is ready to write data out
+ virtual void wait() { return; }
+};
+
+#endif \ No newline at end of file