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:
- 2:b411648dfe54
- Parent:
- 1:b188393f5b49
- Child:
- 3:2c0af5f5fa13
--- a/TLC5940.cpp Mon Oct 12 04:28:01 2015 +0000 +++ b/TLC5940.cpp Tue Oct 13 12:20:23 2015 +0000 @@ -32,18 +32,11 @@ gs_data[15-channel] = brightness; } -void TLC5940::setAll(uint16_t brightness) -{ - for (int i = 0; i < 16; i++) - { - gs_data[i] = brightness; - } -} void TLC5940::flush() { - _sclk.write(1); - _sclk.write(0); + //_sclk.write(1); + //_sclk.write(0); for(int i = 0; i < 16; i++){ _spi.write(gs_data[i]);