X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fbetty.c;h=200bd6f473ede0ad27337bc3cd3db045479273e0;hp=859860a03e4ce8e9347afe3c69fb26c95c36bac8;hb=2c6f5744c29fb65d904aa5fe40b5ce541247f900;hpb=7f516b2153b747636e0b379882457ef3ea0ed23f diff --git a/betty/betty.c b/betty/betty.c index 859860a..200bd6f 100644 --- a/betty/betty.c +++ b/betty/betty.c @@ -47,15 +47,20 @@ int main() { /* pause - seems to not work if running from flash! (?) */ pause(0xffffff); + /* display init */ + display_init(); + + /* pasue again */ + /* announce */ uart0_send_string(announce); - /* toggle backlight */ - display_bl_toggle(); - //addr=0x82000000; - flash_sector_erase(BANK2,0); - addr=FLASH_BANK2; + //flash_sector_erase(BANK2,0); + //addr=FLASH_BANK2; + + DISPLAY_SET_C_ADDR(0); + DISPLAY_SET_PAGE_ADDR(0); while(1) { pause(0x0fffff); @@ -64,9 +69,8 @@ int main() { if(button_get_event(&button)) { uart0_send_string(announce); if(button.key[0]==BUTTON_POWER) { - display_bl_toggle(); - flash_write_buf(addr,(u16 *)announce,42); - addr+=64; + DISPLAY_DATA=0xff; + DISPLAY_DATA=0xff; } } }