X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fbetty.c;h=427d32b57cdae5f118ce289165501ec137606fb2;hp=c2aaa386b291d9421a8890295a26f757a5423b16;hb=8d3d33c4904bfbdc95b290c5e5e6e60c92e30d7a;hpb=ac35214abd7d42a7294047d1c8b7ce7552a38fbf 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();