Convenience routines for an I"C connected LCD display. Handy things like taking cursor to home, positioning cursor, clearing display, writing strings etc

Dependents:   gu_squirt_tester

Revision:
4:ce867009531a
Parent:
3:5744bf6006e1
Child:
6:31bcd2c72da9
--- a/jtlcd.cpp	Fri Nov 09 09:36:36 2012 +0000
+++ b/jtlcd.cpp	Sun Nov 11 09:43:33 2012 +0000
@@ -296,6 +296,22 @@
 } 
 
 /*==============================================================*/
+/* Writes to LCD and fills rest of line with space based on lcd maxlength                     */
+/*==============================================================*/
+void LcdWriteTextLine(char *text) 
+{ 
+ 
+ int length = strlen(text);
+ int diff = LCD_LINE_SIZE -length;
+    LcdWriteText(text);
+    if (diff >0)
+    {
+        for (int n=0; n <= diff; n++)
+            LcdWriteText(" ");
+    
+    }
+} 
+/*==============================================================*/
 /* attemp at lcdlcdprintf                       */
 /*==============================================================*/