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: mbed FastIO FastPWM USBDevice
Diff: TLC5940/TLC5940.h
- Revision:
- 28:2097c6f8f2db
- Parent:
- 26:cb71c4af2912
- Child:
- 29:582472d0bc57
diff -r 26de4b0917a7 -r 2097c6f8f2db TLC5940/TLC5940.h
--- a/TLC5940/TLC5940.h Wed Sep 23 05:08:26 2015 +0000
+++ b/TLC5940/TLC5940.h Wed Sep 23 05:38:27 2015 +0000
@@ -116,10 +116,11 @@
blank(BLANK),
xlat(XLAT),
nchips(nchips),
- newGSData(false)
+ newGSData(true)
{
// allocate the grayscale buffer
gs = new unsigned short[nchips*16];
+ memset(gs, 0, nchips*16*sizeof(gs[0]));
// Configure SPI format and speed. Note that KL25Z ONLY supports 8-bit
// mode. The TLC5940 nominally requires 12-bit data blocks for the
@@ -139,7 +140,7 @@
gsclk.period(1.0/GSCLK_SPEED);
gsclk.write(.5);
blank = 0;
-
+
// Set up the first call to the reset function, which asserts BLANK to
// end the PWM cycle and handles new grayscale data output and latching.
// The original version of this library uses a timer to call reset