stupid mistake fixed, display basically working now!
[my-code/arm.git] / betty / betty.c
index ed42475..163a8e2 100644 (file)
@@ -23,7 +23,6 @@ int main() {
        char announce[]="betty - live from flash at 0x80000000! ;)\r\n";
        t_button button;
        u8 contrast;
-       int cnt;
 
        /* system init */
        pll_init();
@@ -51,6 +50,7 @@ int main() {
        pause(0xffffff);
 
        /* display init */
+       display_bl_toggle();
        display_init();
        contrast=0x38;
 
@@ -80,11 +80,11 @@ int main() {
                                                contrast+=1;
                                        DISPLAY_SET_CONTRAST(contrast);
                                        break;
+                               case BUTTON_TV:
+                                       display_fill_screen(button.key[0]);
+                                       break;
                                default:
-                                       DISPLAY_SET_C_ADDR(0);
-                                       DISPLAY_SET_PAGE_ADDR(0);
-                                       for(cnt=0;cnt<DISPLAY_RAM_CONTENT;cnt++)
-                                               DISPLAY_DATA=button.key[0];
+                                       display_clear_screen();
                                        break;
                        }
                }