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
Diff: SLCD.cpp
- Revision:
- 9:397c0df0d38d
- Parent:
- 7:0e084b33d730
diff -r 99e4215cfc11 -r 397c0df0d38d SLCD.cpp --- a/SLCD.cpp Fri Mar 14 15:31:39 2014 +0000 +++ b/SLCD.cpp Sun Mar 23 23:25:08 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,10 @@ 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+ 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