From: hackbard Date: Sat, 15 Sep 2007 02:36:18 +0000 (+0200) Subject: pause values somehow reasonable for flash and ram usage X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=8d3d33c4904bfbdc95b290c5e5e6e60c92e30d7a;p=my-code%2Farm.git pause values somehow reasonable for flash and ram usage --- diff --git a/betty/betty.c b/betty/betty.c index c2aaa38..427d32b 100644 --- a/betty/betty.c +++ b/betty/betty.c @@ -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(); diff --git a/betty/betty.h b/betty/betty.h index 761f74d..f21d092 100644 --- a/betty/betty.h +++ b/betty/betty.h @@ -27,6 +27,10 @@ #include "flash.h" #include "pffs.h" +// font/logo +#include "default_font.h" +#include "default_logo.h" + /* * defines */