Library for Sure Electronics HT1632 based LED matrix displays. Supports multiple displays connected together.

Dependents:   HT1632MsgScroller SMS_LEDMatrixPrinter

Files at this revision

API Documentation at this revision

Comitter:
SomeRandomBloke
Date:
Mon Nov 12 23:13:04 2012 +0000
Parent:
4:7513dd37efed
Child:
6:80f554fd77a0
Commit message:
Added displayOn/Off functions

Changed in this revision

HT1632_LedMatrix.cpp Show annotated file Show diff for this revision Revisions of this file
HT1632_LedMatrix.h Show annotated file Show diff for this revision Revisions of this file
--- a/HT1632_LedMatrix.cpp	Fri Nov 09 22:27:39 2012 +0000
+++ b/HT1632_LedMatrix.cpp	Mon Nov 12 23:13:04 2012 +0000
@@ -117,6 +117,21 @@
     cursorY = 0;
 }
 
+void HT1632_LedMatrix::displayOff( void ) {
+    for (uint8_t chipno=0; chipno<4; chipno++) {
+        chipfree(chipno);     // unselect it
+        sendcmd(chipno, HT1632_CMD_LEDOFF);    // LEDs on
+    }
+}
+
+void HT1632_LedMatrix::displayOn( void ) {
+    for (uint8_t chipno=0; chipno<4; chipno++) {
+        chipfree(chipno);     // unselect it
+        sendcmd(chipno, HT1632_CMD_LEDON);    // LEDs on
+    }
+}
+
+
 /***********************************************************************
  * chipselect / chipfree
  * Select or de-select a particular ht1632 chip.
--- a/HT1632_LedMatrix.h	Fri Nov 09 22:27:39 2012 +0000
+++ b/HT1632_LedMatrix.h	Mon Nov 12 23:13:04 2012 +0000
@@ -55,6 +55,8 @@
 
     // Init/Clear/position functions
     void init( uint8_t, uint8_t );
+    void displayOff( void ) ;
+    void displayOn( void ) ;
     void clear(void);
     void setBrightness( unsigned char );
     uint8_t putChar( int, int, char );