Dependents: Mbed-Mensch-1 jakob_menschergeredichnicht4 Mbed-Mensch-8 jakob_15041 ... more
WS2812B.h@1:a2549b9f2785, 2016-04-15 (annotated)
- Committer:
- ladner
- Date:
- Fri Apr 15 12:57:23 2016 +0000
- Revision:
- 1:a2549b9f2785
- Parent:
- 0:2981411e4f69
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ladner | 0:2981411e4f69 | 1 | #include "mbed.h" |
ladner | 0:2981411e4f69 | 2 | |
ladner | 0:2981411e4f69 | 3 | class LedOut |
ladner | 0:2981411e4f69 | 4 | { |
ladner | 0:2981411e4f69 | 5 | public: |
ladner | 0:2981411e4f69 | 6 | LedOut(PinName pin); |
ladner | 0:2981411e4f69 | 7 | void WriteLed(uint32_t leddata); |
ladner | 0:2981411e4f69 | 8 | private: |
ladner | 0:2981411e4f69 | 9 | DigitalOut Output; |
ladner | 0:2981411e4f69 | 10 | void writeledbit(char wert); |
ladner | 0:2981411e4f69 | 11 | }; |
ladner | 0:2981411e4f69 | 12 | |
ladner | 0:2981411e4f69 | 13 | uint32_t Brightness(uint32_t Colour,char Brightness); |
ladner | 0:2981411e4f69 | 14 | |
ladner | 0:2981411e4f69 | 15 | class RGBOut |
ladner | 0:2981411e4f69 | 16 | { |
ladner | 0:2981411e4f69 | 17 | public: |
ladner | 0:2981411e4f69 | 18 | RGBOut(PinName rPin,PinName gPin,PinName bPin); |
ladner | 0:2981411e4f69 | 19 | void set(float r,float g,float b); |
ladner | 0:2981411e4f69 | 20 | void set_RGB(uint32_t leddata); |
ladner | 0:2981411e4f69 | 21 | void set_r(float r); |
ladner | 0:2981411e4f69 | 22 | void set_g(float g); |
ladner | 0:2981411e4f69 | 23 | void set_b(float b); |
ladner | 0:2981411e4f69 | 24 | private: |
ladner | 0:2981411e4f69 | 25 | PwmOut Rout; |
ladner | 0:2981411e4f69 | 26 | PwmOut Gout; |
ladner | 0:2981411e4f69 | 27 | PwmOut Bout; |
ladner | 0:2981411e4f69 | 28 | }; |