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 SD600A by
LedStrip.h@5:c2579d6415e1, 2012-10-08 (annotated)
- Committer:
- heroic
- Date:
- Mon Oct 08 20:47:32 2012 +0000
- Revision:
- 5:c2579d6415e1
- Parent:
- 4:0b75eb84a6d2
- Child:
- 23:2e60470dd134
First cut of HL1606 driver.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| heroic | 5:c2579d6415e1 | 1 | |
| heroic | 5:c2579d6415e1 | 2 | // Mbed library to control HL1606-based RGB LED Strips |
| heroic | 5:c2579d6415e1 | 3 | // Partially based on work (c) 2011 Jelmer Tiete |
| heroic | 5:c2579d6415e1 | 4 | // |
| heroic | 5:c2579d6415e1 | 5 | // Ported from Arduino by |
| heroic | 5:c2579d6415e1 | 6 | // Jas Strong <jasmine@electronpusher.org> |
| heroic | 5:c2579d6415e1 | 7 | /*****************************************************************************/ |
| heroic | 4:0b75eb84a6d2 | 8 | |
| heroic | 4:0b75eb84a6d2 | 9 | // This is a pure virtual parent class for all LED strips, so that different types |
| heroic | 4:0b75eb84a6d2 | 10 | // of strip may be used in a single array or container. |
| heroic | 4:0b75eb84a6d2 | 11 | |
| heroic | 4:0b75eb84a6d2 | 12 | #include "mbed.h" |
| heroic | 4:0b75eb84a6d2 | 13 | #ifndef LEDSTRIP_H |
| heroic | 4:0b75eb84a6d2 | 14 | #define LEDSTRIP_H |
| heroic | 4:0b75eb84a6d2 | 15 | |
| heroic | 4:0b75eb84a6d2 | 16 | class LedStrip { |
| heroic | 4:0b75eb84a6d2 | 17 | public: |
| heroic | 4:0b75eb84a6d2 | 18 | virtual void begin(void)=0; |
| heroic | 4:0b75eb84a6d2 | 19 | virtual void show(void)=0; |
| heroic | 4:0b75eb84a6d2 | 20 | virtual void blank(void)=0; |
| heroic | 4:0b75eb84a6d2 | 21 | virtual void setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b)=0; |
| heroic | 4:0b75eb84a6d2 | 22 | virtual void setPixelB(uint16_t n, uint8_t b)=0; |
| heroic | 4:0b75eb84a6d2 | 23 | virtual void setPixelG(uint16_t n, uint8_t g)=0; |
| heroic | 4:0b75eb84a6d2 | 24 | virtual void setPixelR(uint16_t n, uint8_t r)=0; |
| heroic | 4:0b75eb84a6d2 | 25 | virtual void setPixelColor(uint16_t n, uint32_t c)=0; |
| heroic | 4:0b75eb84a6d2 | 26 | virtual uint16_t numPixels(void)=0; |
| heroic | 4:0b75eb84a6d2 | 27 | virtual uint32_t Color(uint8_t, uint8_t, uint8_t)=0; |
| heroic | 4:0b75eb84a6d2 | 28 | }; |
| heroic | 4:0b75eb84a6d2 | 29 | #endif |
