]> git.karo-electronics.de Git - oswald.git/blobdiff - ui/LcdDisplay.c
Starting to get rid of borrowed code (LcdDisplay, Fonts), integrate
[oswald.git] / ui / LcdDisplay.c
index f889bbc4ba7b7b118f95ff2212fd5379a090831d..ae4aea52b4497d950654593e88b2a5776908b1e9 100644 (file)
@@ -5,7 +5,8 @@
 
 #include "LcdDisplay.h"
 
-void DrawLcdLineBresenham(u8t xstart, u8t ystart, u8t xend, u8t yend)
+
+void DrawLcdLineBresenham(const uint8_t xstart, const uint8_t ystart, const uint8_t xend, const uint8_t yend)
 {
        int x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
  
@@ -50,7 +51,7 @@ void DrawLcdLineBresenham(u8t xstart, u8t ystart, u8t xend, u8t yend)
        // lcd_update_display();
 }
 
-void DrawLcdLineBresenhamWW(u8t xstart, u8t ystart, u8t xend, u8t yend, u8t thickness)
+void DrawLcdLineBresenhamWW(const uint8_t xstart, const uint8_t ystart, const uint8_t xend, const uint8_t yend, const uint8_t thickness)
 {
        int i, x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
  
@@ -107,7 +108,7 @@ void DrawLcdLineBresenhamWW(u8t xstart, u8t ystart, u8t xend, u8t yend, u8t thic
        // lcd_update_display();
 }
 
-u8t WriteLcdCharacter(u8t x, u8t y, u8t Character)
+u8t WriteLcdCharacter(const uint8_t x, const uint8_t y, const uint8_t Character)
 {
        u8t CharacterHeight = GetCharacterHeight();
        u8t CharacterWidth = GetCharacterWidth(Character);
@@ -122,10 +123,10 @@ u8t WriteLcdCharacter(u8t x, u8t y, u8t Character)
                        if (bitmap[ly] & (1<<lx)) {
                                hal_lcd_set_pixel(lx+x, ly+y, TRUE);
                                // printf(".");
-                       } else {
+                       } /*else {
                                hal_lcd_set_pixel(lx+x, ly+y, FALSE);
                                // printf(" ");
-                       }
+                       }*/
                }
                // printf("\n");
        }
@@ -133,11 +134,11 @@ u8t WriteLcdCharacter(u8t x, u8t y, u8t Character)
        return CharacterWidth + GetFontSpacing();
 }
 
-u8t WriteLcdString(u8t x, u8t y, char *str)
+u8t WriteLcdString(const uint8_t x, const uint8_t y, const char *str)
 {
        int lx, i, strl;
 
-       strl = oswald_strlen(str);
+       strl = oswald_strlen((char *)str);
        if (strl == 0)
                return 0;
 
@@ -149,7 +150,7 @@ u8t WriteLcdString(u8t x, u8t y, char *str)
 }
 
 
-void WriteLcdNumber(u8t x, u8t y, s16t number)
+void WriteLcdNumber(const uint8_t x, const uint8_t y, const int16_t number)
 {
        int lx, i, strl;
        char str[8];