Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:61a420af8109, committed 2017-10-24
- Comitter:
- dogcatfee
- Date:
- Tue Oct 24 18:43:06 2017 -0700
- Parent:
- 0:ca792cac7591
- Commit message:
- Add clear
Changed in this revision
| SLCD.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| SLCD.h | Show annotated file Show diff for this revision Revisions of this file | 
--- a/SLCD.cpp	Fri Sep 22 00:48:15 2017 +0000
+++ b/SLCD.cpp	Tue Oct 24 18:43:06 2017 -0700
@@ -193,7 +193,12 @@
        lbContrast &= 0x0F;              //Forced to the only values accepted 
        LCD->GCR |= LCD_GCR_RVTRIM(lbContrast);
 }
- 
+
+void SLCD::clear()
+{
+    All_Segments(0);
+}
+
 void SLCD::All_Segments (int mode)
 {
  uint8_t lbTotalBytes = _CHARNUM * _LCDTYPE;              
--- a/SLCD.h	Fri Sep 22 00:48:15 2017 +0000
+++ b/SLCD.h	Tue Oct 24 18:43:06 2017 -0700
@@ -31,14 +31,15 @@
     void Home (void);
     void Contrast (uint8_t lbContrast);
     void All_Segments (int);     
+    void clear();
     void DP1 (int);
     void DP2 (int);
     void DP3 (int);
     void Colon (int);     
     uint8_t CharPosition;
-         
+
     virtual int _putc(int c);
     virtual int _getc() {
-        return 0;
+      return 0;
     }  
 };