]> hackdaworld.org Git - my-code/arm.git/commitdiff
optimized load logo function (thnx to andersro)
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 13 Sep 2007 13:37:23 +0000 (15:37 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 13 Sep 2007 13:37:23 +0000 (15:37 +0200)
betty/display.c

index b3d3e9c89ff27d6c7d87d28c1da176f76f06354d..4d4e1e1a292498939fc9cc8ecd31cbbde1c199f8 100644 (file)
@@ -73,20 +73,17 @@ void display_load_logo(u8 *src) {
 
        u8 *s;
        u8 page,width;
-       u32 cnt;
 
        s=src;
        if(s==0)
                s=default_logo;
 
-       cnt=0;
        for(page=0;page<DISPLAY_PAGE_MAX;page++) {
                DISPLAY_SET_C_ADDR(0);
                DISPLAY_SET_PAGE_ADDR(page);
                for(width=0;width<DISPLAY_DIMX;width++) {
-                       DISPLAY_DATA=s[cnt];
-                       DISPLAY_DATA=s[cnt+1];
-                       cnt+=2;
+                       DISPLAY_DATA=*s++;
+                       DISPLAY_DATA=*s++;
                }
        }
 }