This library creates the interface to operate the TLC5940. This device manages 16 PWM outputs.

Files at this revision

API Documentation at this revision

Comitter:
Fiuba
Date:
Sat Nov 27 00:37:33 2010 +0000
Parent:
0:64ea4d75027c
Child:
2:500ec33cd4b6
Commit message:
Fixed doxygen documentation (hope so)

Changed in this revision

tlc5940.cpp Show annotated file Show diff for this revision Revisions of this file
tlc5940.h Show annotated file Show diff for this revision Revisions of this file
--- a/tlc5940.cpp	Sat Nov 27 00:28:33 2010 +0000
+++ b/tlc5940.cpp	Sat Nov 27 00:37:33 2010 +0000
@@ -1,10 +1,25 @@
+/*
+ * tlc5940 - Interface to operate TI's IC TLC5940
+ * Copyright (C) 2010 German Bassi.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
 #include "tlc5940.h"
 #include "mbed.h"
 
-/** Create a tlc5940 interface object connected to some specifics pins
- *
- * @param DC_data[] Dot Correction values for initialization
- */
 tlc5940::tlc5940 (int DC_data[]) : VPROG(p21), SIN(p22), SCLK(p23), XLAT(p24), BLANK(p25), DCPROG(p27), GSCLK(p26), SOUT(p28), XERR(p29) {
     first_cycle_flag = false;
 
@@ -36,10 +51,6 @@
     // DC input cycle ends
 }
 
-/** Send the specified set of grayscale values
- *
- * @param data[] Array of 12-bit Grayscale values for transmission
- */
 void tlc5940::send_data (int data[]) {
     // Grayscale data input + Grayscale PWM
     data_counter = 0;
--- a/tlc5940.h	Sat Nov 27 00:28:33 2010 +0000
+++ b/tlc5940.h	Sat Nov 27 00:37:33 2010 +0000
@@ -1,3 +1,22 @@
+/*
+ * tlc5940 - Interface to operate TI's IC TLC5940
+ * Copyright (C) 2010 German Bassi.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
 #ifndef MBED_TLC5940_H
 #define MBED_TLC5940_H
 
@@ -21,7 +40,16 @@
     DigitalIn XERR;
 
 public:
+    /** Create a tlc5940 interface object connected to some specifics pins
+     *
+     * @param DC_data[] Dot Correction values for initialization
+     */
     tlc5940 (int DC_data[]);
+
+    /** Send the specified set of grayscale values
+     *
+     * @param data[] Array of 12-bit Grayscale values for transmission
+     */
     void send_data (int data[]);
 };