This library creates the interface to operate the TLC5940. This device manages 16 PWM outputs.
Diff: tlc5940.h
- Revision:
- 3:40cb2f9adc4d
- Parent:
- 2:500ec33cd4b6
--- a/tlc5940.h Sat Nov 27 00:50:01 2010 +0000 +++ b/tlc5940.h Sat Nov 27 01:08:28 2010 +0000 @@ -22,6 +22,32 @@ #include "mbed.h" +/** TI's TLC5940 interface class + * + * Example: + * @code + * // Turn on all the outputs + * # include "mbed.h" + * # include "tlc5940.h" + * + * int main() { + * int DC_data[2*96]; + * int GS_data[2*16]; + * + * // Dot Correction Values + * for (int i=0; i<2*96; i++) DC_data[i] = 1; + * // Grayscale Values + * for (int i=0; i<2*16; i++) GS_data[i] = 0xFF; + * + * // Create object + * tlc5940 tlc_driver(2, DC_data); + * // Send data + * tlc_driver.send_data(GS_data); + * + * while (1) {} + * } + * @endcode + */ class tlc5940 { private: bool first_cycle_flag;