2 * betty.c - alternative firmware for the betty tv ;)
4 * author: hackbard@hackdaworld.org
15 #define cc1100_init spi1_init(8,SPI_MASTER,8)
23 char announce[]="betty - live from flash at 0x80000000! ;)\r\n";
40 button_set_retries(&button,100);
57 uart0_send_string(announce);
64 if(button_get_event(&button)) {
65 //uart0_send_string(announce);
66 switch(button.key[0]) {
68 display_logo((u8 *)default_logo);
73 DISPLAY_SET_CONTRAST(contrast);
78 DISPLAY_SET_CONTRAST(contrast);
81 display_fill_screen(DISPLAY_FILL_W);
84 display_fill_screen(DISPLAY_FILL_LG);
87 display_fill_screen(DISPLAY_FILL_DG);
90 display_fill_screen(DISPLAY_FILL_B);
93 display_draw_rectangle(20,20,40,40,
98 display_draw_rectangle(50,50,40,40,
103 display_draw_font(70,70,
104 (u8 *)default_font+(0x33<<3),
109 display_font_page(23,19,(u8 *)default_font+(0x34<<3),DISPLAY_FILL_B);
112 display_font_page(10,19,(u8 *)default_font+(0x35<<3),DISPLAY_FILL_DG);
115 display_font_page(2,19,(u8 *)default_font+(0x36<<3),DISPLAY_FILL_LG);
118 display_draw_rectangle(2,2,4,4,
123 display_draw_rectangle(8,8,4,4,
128 display_rectangle_page(80,15,16,2,DISPLAY_FILL_B,0x7f);
129 uart0_send_byte('b');
132 display_rectangle_page(90,16,16,2,DISPLAY_FILL_LG,0x7f);
133 uart0_send_byte('e');
136 display_clear_screen();