]> git.karo-electronics.de Git - oswald.git/blobdiff - ui/LcdDisplay.c
Lot's of stuff...
[oswald.git] / ui / LcdDisplay.c
index 725908a4ab999860fbe6cb865b69ad6bfab5baa1..f4e26c951479ec5052496419d36243d83bb0f40f 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "LcdDisplay.h"
 
+
 void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_t width, const uint8_t height, const void *bmp)
 {
        uint8_t x, y;
@@ -20,7 +21,7 @@ void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_
        }
 }
 
-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;
  
@@ -65,7 +66,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;
  
@@ -122,7 +123,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);
@@ -137,10 +138,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");
        }
@@ -148,11 +149,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;
 
@@ -164,7 +165,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];