Library for Sure Electronics HT1632 based LED matrix displays. Supports multiple displays connected together.
Dependents: HT1632MsgScroller SMS_LEDMatrixPrinter
Diff: HT1632_LedMatrix.h
- Revision:
- 6:80f554fd77a0
- Parent:
- 5:33b2bfce06b7
- Child:
- 9:8a3c981babd9
diff -r 33b2bfce06b7 -r 80f554fd77a0 HT1632_LedMatrix.h --- a/HT1632_LedMatrix.h Mon Nov 12 23:13:04 2012 +0000 +++ b/HT1632_LedMatrix.h Tue Nov 20 13:08:43 2012 +0000 @@ -1,14 +1,53 @@ -/* -* HT1632_LedMatrix.h -* defintions for Holtek ht1632 LED driver -*/ +/** Library for Holtek HT1632 LED driver chip, + * As implemented on the Sure Electronics DE-DP10X display board + * 8 x 32 dot matrix LED module.) + * + * Original code by: + * Nov, 2008 by Bill Westfield ("WestfW") + * Copyrighted and distributed under the terms of the Berkely license + * (copy freely, but include this notice of original author.) + * + * Adapted for 8x32 display by FlorinC. + * + * Arduino Library Created and updated by Andrew Lindsay October/November 2009 + * + * Ported to Mbed platform by Andrew Lindsay, November 2012 + * + * @author Andrew Lindsay + * + * @section LICENSE + * + * Copyright (c) 2012 Andrew Lindsay (andrew [at] thiseldo [dot] co [dot] uk) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @section DESCRIPTION + * Definitions for Holtek HT1632 LED driver + * + */ #ifndef _HT1632_LEDMATRIX_H #define _HT1632_LEDMATRIX_H +// To include the graphic functions use the following. Comment out to exclude them #define USE_GRAPHIC - #include <inttypes.h> /* @@ -38,10 +77,15 @@ #define PIXEL_OFF 0 #define PIXEL_ON 1 -//class HT1632_LedMatrix +/** class HT1632_LedMatrix +*/ class HT1632_LedMatrix //: public Print { private: + /** Select a specific display + * + * @param chip number + */ void chipselect( uint8_t ); void chipfree( uint8_t ); void writebits( uint8_t, uint8_t ); @@ -51,6 +95,8 @@ void sendcol( uint8_t, uint8_t, uint8_t ); public: + /** Default Constructor + */ HT1632_LedMatrix( ); // Init/Clear/position functions