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.
Diff: WS281X.h
- Revision:
- 2:cc8e091fd975
- Parent:
- 0:dff187a80020
- Child:
- 3:786b31c65e7a
--- a/WS281X.h Wed Jul 27 08:12:04 2016 +0000 +++ b/WS281X.h Wed Jul 27 14:42:36 2016 +0000 @@ -59,21 +59,21 @@ void setRGBOrder(RGBOrder rgbOrder = WS281X::RGB); void repeatBlock(int block_size); - void clear(uint32_t color = 0); - void clear(RGBColor color) { clear((uint32_t)color); } + void clear(RGBColor color); + void clear(uint32_t color = 0) { clear((RGBColor)color); } void show(); - void show(uint32_t color); - void show(RGBColor color) { show((uint32_t)color); } + void show(RGBColor color); + void show(uint32_t color) { show((RGBColor)color); } - inline RGBColor operator[](int index) const + RGBColor operator[](int index) const { if ((uint16_t)index < _numPixels) return _pixels[index]; return _dummyPixel; } - inline RGBColor& operator[](int index) + RGBColor& operator[](int index) { if ((uint16_t)index < _numPixels) return _pixels[index]; @@ -89,8 +89,8 @@ int _1st, _2nd, _3rd; uint16_t _numPixels; + RGBColor *_pixels; RGBColor _dummyPixel; - RGBColor *_pixels; #if defined(TARGET_NXP) typedef uint32_t regsize_t;