- uart0_send_string(announce);
- if(button.key[0]==BUTTON_POWER) {
- bl_toggle();
- flash_write_buf(addr,(u16 *)announce,42);
- addr+=64;
+ //uart0_send_string(announce);
+ uart0_send_byte(contrast);
+ switch(button.key[0]) {
+ case BUTTON_POWER:
+ display_load_logo(0);
+ break;
+ case BUTTON_DOWN:
+ if(contrast>0x00)
+ contrast-=1;
+ DISPLAY_SET_CONTRAST(contrast);
+ break;
+ case BUTTON_UP:
+ if(contrast<0x3f)
+ contrast+=1;
+ DISPLAY_SET_CONTRAST(contrast);
+ break;
+ case BUTTON_A:
+ display_fill_screen(DISPLAY_FILL_W);
+ break;
+ case BUTTON_B:
+ display_fill_screen(DISPLAY_FILL_LG);
+ break;
+ case BUTTON_C:
+ display_fill_screen(DISPLAY_FILL_DG);
+ break;
+ case BUTTON_D:
+ display_fill_screen(DISPLAY_FILL_B);
+ break;
+ case BUTTON_1:
+ display_draw_rectangle(20,20,40,40,
+ DISPLAY_FILL_B,
+ 0);
+ break;
+ case BUTTON_2:
+ display_draw_rectangle(50,50,40,40,
+ DISPLAY_FILL_LG,
+ 0);
+ break;
+ default:
+ display_clear_screen();
+ break;