]> git.karo-electronics.de Git - oswald.git/blobdiff - ui/LcdDisplay.c
Countless fixes and enhancements
[oswald.git] / ui / LcdDisplay.c
index 4f6bf99a3a9922f00c55a6f9775190c9f4d1dfe5..87bae7fe197f6f0382bc87451fae880d9a42b4e7 100644 (file)
@@ -109,7 +109,6 @@ void DrawLcdLineBresenhamWW(u8t xstart, u8t ystart, u8t xend, u8t yend, u8t thic
        }
 }
 
-
 u8t WriteLcdCharacter(u8t x, u8t y, u8t Character)
 {
        u8t CharacterHeight = GetCharacterHeight();
@@ -150,3 +149,20 @@ void WriteLcdString(u8t x, u8t y, u8t *str)
        }
 }
 
+
+void WriteLcdNumber(u8t x, u8t y, s16t number)
+{
+       register lx, i, strl;
+       u8t str[8];
+
+       itoa(number, str, 10);
+       strl = oswald_strlen(str);
+       if (strl == 0)
+               return;
+
+       lx = x;
+       for (i=0; i<strl; i++) {
+               lx += WriteLcdCharacter(lx, y, str[i]);
+       }
+}
+