diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2015-12-09 22:13:10 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2015-12-09 22:13:10 +0300 |
commit | 7e152ff3f5ff8f4c3d97f8f9cff90e38e2d86ff8 (patch) | |
tree | 0805367d3caaa9e67e19c70110226b37cf928f3f /pixelset.h | |
parent | ebfccf2415397a68f786f32ebc6505f84297dbc1 (diff) |
Add CRGBArray for defining the leds - preferred method to the normal array, now.
Diffstat (limited to 'pixelset.h')
-rw-r--r-- | pixelset.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -190,6 +190,16 @@ public: } }; +__attribute__((always_inline)) +inline CRGB *operator+(const CPixelSet & pixels, int offset) { return (CRGB*)pixels + offset; } + typedef CPixelSet CRGBSet; +template<int SIZE> +class CRGBArray : public CPixelSet { + CRGB rawleds[SIZE]; +public: + CRGBArray() : CPixelSet(rawleds, SIZE) {} +}; + #endif |