]> hackdaworld.org Git - my-code/arm.git/commitdiff
pause values somehow reasonable for flash and ram usage
authorhackbard <hackbard@staubsauger.localdomain>
Sat, 15 Sep 2007 02:36:18 +0000 (04:36 +0200)
committerhackbard <hackbard@staubsauger.localdomain>
Sat, 15 Sep 2007 02:36:18 +0000 (04:36 +0200)
betty/betty.c
betty/betty.h

index c2aaa386b291d9421a8890295a26f757a5423b16..427d32b57cdae5f118ce289165501ec137606fb2 100644 (file)
@@ -46,13 +46,10 @@ int main() {
         * start it ...
         */
 
-       /* pause - seems to not work if running from flash! (?) */
-       pause(0xffffff);
-
        /* display init */
        display_bl_toggle();
        display_init();
-       contrast=0x32;
+       contrast=0x38;
 
        /* pasue again */
 
@@ -61,15 +58,14 @@ int main() {
 
        
        while(1) {
-               pause(0x0fffff);
+               pause(0x05ffff);
 
                /* button test! */
                if(button_get_event(&button)) {
-                       //uart0_send_string(announce);
-                       uart0_send_byte(contrast);
+                       uart0_send_string(announce);
                        switch(button.key[0]) {
                                case BUTTON_POWER:
-                                       display_load_logo(0);
+                                       display_logo((u8 *)default_logo);
                                        break;
                                case BUTTON_DOWN:
                                        if(contrast>0x00)
@@ -96,12 +92,18 @@ int main() {
                                case BUTTON_1:
                                        display_draw_rectangle(20,20,40,40,
                                                               DISPLAY_FILL_B,
-                                                              0);
+                                                              0xff);
                                        break;
                                case BUTTON_2:
                                        display_draw_rectangle(50,50,40,40,
                                                               DISPLAY_FILL_LG,
-                                                              0);
+                                                              0x7f);
+                                       break;
+                               case BUTTON_3:
+                                       display_draw_font(70,70,
+                                                         (u8 *)default_font+(0x33>>3),
+                                                              DISPLAY_FILL_LG,
+                                                              0xff);
                                        break;
                                default:
                                        display_clear_screen();
index 761f74d76756acc7542c3a64d36f280e35f3a4f5..f21d0922674b788c85086fa7e2249f8eea4dd151 100644 (file)
 #include "flash.h"
 #include "pffs.h"
 
+// font/logo
+#include "default_font.h"
+#include "default_logo.h"
+
 /*
  * defines
  */