SCLD peripheral of the KL46Z - with sign "-" just for USB Academy

Dependents:   KL46Z-Lab2_lodz KL46Z-Lab2_fullll KL46Z-Lab2_szkolenie kL46Z-Lab3-lodz ... more

Fork of SLCD by Erik -

Revision:
12:f5cc1eb350cf
Parent:
11:ef2b3b7f1b01
--- a/SLCD.cpp	Sun Mar 23 19:55:14 2014 +0000
+++ b/SLCD.cpp	Thu Mar 27 12:34:25 2014 +0000
@@ -81,6 +81,7 @@
     ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = ^,   offset=184
     ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = _,   offset=188
     ( SEGD+!SEGE+!SEGF+!SEGG) , (!SEGC+!SEGB+ SEGA) ,//Char = `,   offset=192
+    (!SEGD+!SEGE+!SEGF+ SEGG) , (!SEGC+!SEGB+!SEGA) ,//Char = -,   offset=196 //LG+ added '-'
 };
 
 SLCD::SLCD()
@@ -175,8 +176,11 @@
         lbValue -= 32; // UpperCase
     }
     if (lbValue<ASCCI_TABLE_START || lbValue >ASCCI_TABLE_END) {
+      if (lbValue!='-') //LG+
         lbValue = BLANK_CHARACTER;  // default value as space
     }
+    //if(lbValue=='-') lbValue += (-ASCCI_TABLE_START+3+(196)/4); else //LG+
+    if(lbValue=='-') lbValue = 196/4; else //LG+
     lbValue -=ASCCI_TABLE_START;        // Remove the offset to search in the ascci table
     arrayOffset = (lbValue * _CHAR_SIZE); // Compensate matrix offset
     // ensure bLCD position is in valid limit
@@ -195,7 +199,7 @@
     CharPosition++;
 }
 
-void SLCD::Home()
+void SLCD::Home (void)
 {
     CharPosition =  0;
 }
@@ -267,11 +271,11 @@
     DP(2, mode==1);
 }
 
-void SLCD::Colon (bool on)
+void SLCD::Colon (int mode)
 {
     uint8_t *lbpLCDWF;
     lbpLCDWF = (uint8_t *)&LCD->WF8B[0];
-    if (on) {
+    if (mode==1) {
         lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[7]]|=1;
     } else {
         lbpLCDWF[(uint8_t)WF_ORDERING_TABLE[7]]&=~1;