Heroic Robotics / SD600A

Fork of SD600A by Heroic Robotics

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?

UserRevisionLine numberNew 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