Testing WS2801

Dependencies:   mbed

Fork of ws2801 by Thomas Olsson

Committer:
wertyfrog
Date:
Tue Jun 14 19:20:50 2011 +0000
Revision:
0:b964d673c7db
Child:
1:363dd100d793
documentation test 1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wertyfrog 0:b964d673c7db 1 #ifndef WS2801_H
wertyfrog 0:b964d673c7db 2 #define WS2801_H
wertyfrog 0:b964d673c7db 3
wertyfrog 0:b964d673c7db 4 #include "mbed.h"
wertyfrog 0:b964d673c7db 5 #include "HTML_color.h"
wertyfrog 0:b964d673c7db 6
wertyfrog 0:b964d673c7db 7 class ws2801
wertyfrog 0:b964d673c7db 8 {
wertyfrog 0:b964d673c7db 9 public:
wertyfrog 0:b964d673c7db 10 /** Create a new ws2801 object
wertyfrog 0:b964d673c7db 11 *
wertyfrog 0:b964d673c7db 12 * More details about the function goes here
wertyfrog 0:b964d673c7db 13 * and here
wertyfrog 0:b964d673c7db 14 *
wertyfrog 0:b964d673c7db 15 * @param CKI clock pin
wertyfrog 0:b964d673c7db 16 * @param SDI data pin
wertyfrog 0:b964d673c7db 17 * @param STRIP_LENGTH number of ws2801 IC's i strip or array
wertyfrog 0:b964d673c7db 18 * @param reset_delay delay in us to allow latching data
wertyfrog 0:b964d673c7db 19 * @returns nothing
wertyfrog 0:b964d673c7db 20 */
wertyfrog 0:b964d673c7db 21 ws2801(PinName CKI, PinName SDI, int STRIP_LENGTH = 32, int reset_delay = 800);
wertyfrog 0:b964d673c7db 22 /** write RGB color data to strip or array
wertyfrog 0:b964d673c7db 23 *
wertyfrog 0:b964d673c7db 24 * More details about the function goes here
wertyfrog 0:b964d673c7db 25 * and here
wertyfrog 0:b964d673c7db 26 *
wertyfrog 0:b964d673c7db 27 * @param strip_colors array of color data, size must be 24xSTRIP_LENGHT bits
wertyfrog 0:b964d673c7db 28 */
wertyfrog 0:b964d673c7db 29 void post(int *strip_colors);
wertyfrog 0:b964d673c7db 30 /** clears the array or strip (all off)
wertyfrog 0:b964d673c7db 31 *
wertyfrog 0:b964d673c7db 32 * More details about the function goes here
wertyfrog 0:b964d673c7db 33 * and here
wertyfrog 0:b964d673c7db 34 *
wertyfrog 0:b964d673c7db 35 */
wertyfrog 0:b964d673c7db 36 void clear(void);
wertyfrog 0:b964d673c7db 37 /** dimms the entire array
wertyfrog 0:b964d673c7db 38 *
wertyfrog 0:b964d673c7db 39 * More details about the function goes here
wertyfrog 0:b964d673c7db 40 * and here
wertyfrog 0:b964d673c7db 41 *
wertyfrog 0:b964d673c7db 42 * @param level level in percent
wertyfrog 0:b964d673c7db 43 * @returns current level
wertyfrog 0:b964d673c7db 44 */
wertyfrog 0:b964d673c7db 45 int setlevel(int level=100);
wertyfrog 0:b964d673c7db 46 /** set reset/write delay
wertyfrog 0:b964d673c7db 47 *
wertyfrog 0:b964d673c7db 48 * More details about the function goes here
wertyfrog 0:b964d673c7db 49 * and here
wertyfrog 0:b964d673c7db 50 *
wertyfrog 0:b964d673c7db 51 * @param delay delay in us
wertyfrog 0:b964d673c7db 52 * @returns delay in us
wertyfrog 0:b964d673c7db 53 */
wertyfrog 0:b964d673c7db 54 int setdelay(int reset_delay=800);
wertyfrog 0:b964d673c7db 55
wertyfrog 0:b964d673c7db 56 private:
wertyfrog 0:b964d673c7db 57 DigitalOut _CKI;
wertyfrog 0:b964d673c7db 58 DigitalOut _SDI;
wertyfrog 0:b964d673c7db 59 int _STRIP_LENGTH;
wertyfrog 0:b964d673c7db 60 int _level;
wertyfrog 0:b964d673c7db 61 int _reset_delay;
wertyfrog 0:b964d673c7db 62 };
wertyfrog 0:b964d673c7db 63
wertyfrog 0:b964d673c7db 64 #endif