for led jacket

Dependents:   ws2812test

Fork of WS2812 by Rendy Devara

Committer:
elmoow
Date:
Wed Aug 16 23:24:49 2017 +0000
Revision:
2:645ab1279245
Parent:
1:8910a1fcbdb0
final1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
devararendy 0:f080cb888db6 1 #ifndef WS2812_H
devararendy 0:f080cb888db6 2 #define WS2812_H
devararendy 0:f080cb888db6 3 #include "mbed.h"
devararendy 0:f080cb888db6 4
devararendy 0:f080cb888db6 5 class WS2812
devararendy 0:f080cb888db6 6 {
devararendy 0:f080cb888db6 7 public:
devararendy 0:f080cb888db6 8
devararendy 0:f080cb888db6 9 uint8_t Red;
devararendy 0:f080cb888db6 10 uint8_t Green;
devararendy 0:f080cb888db6 11 uint8_t Blue;
devararendy 0:f080cb888db6 12
devararendy 0:f080cb888db6 13 WS2812(PinName pin, int qty);
devararendy 0:f080cb888db6 14 ~WS2812();
devararendy 0:f080cb888db6 15 void writeColor(uint32_t RGB);
devararendy 0:f080cb888db6 16 void send1Color(uint32_t RGB);
devararendy 1:8910a1fcbdb0 17 void sendColors(uint32_t * ColorBuffer);
devararendy 0:f080cb888db6 18 void sendReset();
devararendy 0:f080cb888db6 19
devararendy 0:f080cb888db6 20 private:
devararendy 0:f080cb888db6 21 int LED_Qty;
devararendy 0:f080cb888db6 22 PinName dataPin;
devararendy 0:f080cb888db6 23 DigitalOut dataOut;
devararendy 0:f080cb888db6 24
devararendy 0:f080cb888db6 25 void writeByte(uint8_t data);
devararendy 0:f080cb888db6 26 void send0();
devararendy 0:f080cb888db6 27 void send1();
devararendy 0:f080cb888db6 28 };
devararendy 0:f080cb888db6 29
devararendy 0:f080cb888db6 30 #endif