Heroic Robotics / SD600A

Fork of SD600A by Heroic Robotics

Committer:
heroic
Date:
Mon Aug 25 05:17:51 2014 +0000
Revision:
29:0200c63e1158
Parent:
27:6667543f3b28
Add support for service() method.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
heroic 5:c2579d6415e1 1 // Mbed library to control HL1606-based RGB LED Strips
heroic 5:c2579d6415e1 2 // Partially based on work (c) 2011 Jelmer Tiete
heroic 5:c2579d6415e1 3 //
heroic 5:c2579d6415e1 4 // Ported from Arduino by
heroic 5:c2579d6415e1 5 // Jas Strong <jasmine@electronpusher.org>
heroic 5:c2579d6415e1 6 /*****************************************************************************/
heroic 4:0b75eb84a6d2 7
heroic 4:0b75eb84a6d2 8 // This is a pure virtual parent class for all LED strips, so that different types
heroic 4:0b75eb84a6d2 9 // of strip may be used in a single array or container.
heroic 4:0b75eb84a6d2 10
heroic 4:0b75eb84a6d2 11 #include "mbed.h"
heroic 4:0b75eb84a6d2 12 #ifndef LEDSTRIP_H
heroic 4:0b75eb84a6d2 13 #define LEDSTRIP_H
heroic 4:0b75eb84a6d2 14
heroic 4:0b75eb84a6d2 15 class LedStrip {
heroic 4:0b75eb84a6d2 16 public:
heroic 4:0b75eb84a6d2 17 virtual void begin(void)=0;
heroic 4:0b75eb84a6d2 18 virtual void show(void)=0;
heroic 4:0b75eb84a6d2 19 virtual void blank(void)=0;
heroic 29:0200c63e1158 20 virtual void service(void)=0;
heroic 4:0b75eb84a6d2 21 virtual void setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b)=0;
heroic 27:6667543f3b28 22 virtual void setPackedPixels(uint8_t * buffer, uint32_t n)=0;
heroic 4:0b75eb84a6d2 23 virtual void setPixelB(uint16_t n, uint8_t b)=0;
heroic 4:0b75eb84a6d2 24 virtual void setPixelG(uint16_t n, uint8_t g)=0;
heroic 4:0b75eb84a6d2 25 virtual void setPixelR(uint16_t n, uint8_t r)=0;
heroic 4:0b75eb84a6d2 26 virtual void setPixelColor(uint16_t n, uint32_t c)=0;
heroic 4:0b75eb84a6d2 27 virtual uint16_t numPixels(void)=0;
heroic 4:0b75eb84a6d2 28 virtual uint32_t Color(uint8_t, uint8_t, uint8_t)=0;
heroic 23:2e60470dd134 29 virtual uint32_t total_luminance(void);
heroic 4:0b75eb84a6d2 30 };
heroic 4:0b75eb84a6d2 31 #endif