Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ws2801 by
Diff: ws2801.h
- Revision:
- 0:b964d673c7db
- Child:
- 1:363dd100d793
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ws2801.h Tue Jun 14 19:20:50 2011 +0000
@@ -0,0 +1,64 @@
+#ifndef WS2801_H
+#define WS2801_H
+
+#include "mbed.h"
+#include "HTML_color.h"
+
+class ws2801
+{
+public:
+ /** Create a new ws2801 object
+ *
+ * More details about the function goes here
+ * and here
+ *
+ * @param CKI clock pin
+ * @param SDI data pin
+ * @param STRIP_LENGTH number of ws2801 IC's i strip or array
+ * @param reset_delay delay in us to allow latching data
+ * @returns nothing
+ */
+ ws2801(PinName CKI, PinName SDI, int STRIP_LENGTH = 32, int reset_delay = 800);
+ /** write RGB color data to strip or array
+ *
+ * More details about the function goes here
+ * and here
+ *
+ * @param strip_colors array of color data, size must be 24xSTRIP_LENGHT bits
+ */
+ void post(int *strip_colors);
+ /** clears the array or strip (all off)
+ *
+ * More details about the function goes here
+ * and here
+ *
+ */
+ void clear(void);
+ /** dimms the entire array
+ *
+ * More details about the function goes here
+ * and here
+ *
+ * @param level level in percent
+ * @returns current level
+ */
+ int setlevel(int level=100);
+ /** set reset/write delay
+ *
+ * More details about the function goes here
+ * and here
+ *
+ * @param delay delay in us
+ * @returns delay in us
+ */
+ int setdelay(int reset_delay=800);
+
+private:
+ DigitalOut _CKI;
+ DigitalOut _SDI;
+ int _STRIP_LENGTH;
+ int _level;
+ int _reset_delay;
+};
+
+#endif
\ No newline at end of file
