TLC5940 library which supports SWSPI, has API to specify grayscale PWM period and has API like Arduino library.
Fork of TLC5940 by
Diff: TLC5940.cpp
- Revision:
- 6:04354724a9c6
- Parent:
- 5:c35b2b62f2f3
diff -r c35b2b62f2f3 -r 04354724a9c6 TLC5940.cpp --- a/TLC5940.cpp Sat Oct 17 06:52:23 2015 +0000 +++ b/TLC5940.cpp Sun Oct 18 12:06:51 2015 +0000 @@ -41,10 +41,14 @@ _spi.write(gs_data[i]); } - _blank.write(1); + if (!_gspwmcycle_repeat) { // avoid unexpected refresh for use of GS PWM as blink + _blank.write(1); + } _xlat.write(1); _xlat.write(0); - _blank.write(0); + if (!_gspwmcycle_repeat) { + _blank.write(0); + } } template<typename T>