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.
Dependencies: Multi_WS2811 mbed MMA8451Q
Fork of WS2811 by
Diff: WS2811.cpp
- Revision:
- 12:7ebd51549c04
- Parent:
- 11:d127f93be182
- Child:
- 13:1f65330abe92
diff -r d127f93be182 -r 7ebd51549c04 WS2811.cpp
--- a/WS2811.cpp Wed Feb 20 03:38:25 2013 +0000
+++ b/WS2811.cpp Thu Apr 11 22:16:07 2013 +0000
@@ -133,6 +133,11 @@
pixels[n*3+2] = b;
}
+void WS2811::setPackedPixels(uint8_t * buffer, uint32_t n) {
+ if (n >= numLEDs) return;
+ memcpy(pixels, buffer, (size_t) (n*3));
+}
+
void WS2811::setPixelColor(uint16_t n, uint32_t c) {
if (n >= numLEDs) return; // '>=' because arrays are 0-indexed

Generic WS2811/WS2812