char announce[]="betty - live from flash at 0x80000000! ;)\r\n";
t_button button;
u8 contrast;
- int cnt;
/* system init */
pll_init();
contrast+=1;
DISPLAY_SET_CONTRAST(contrast);
break;
+ case BUTTON_TV:
+ display_fill_screen(button.key[0]);
+ break;
default:
display_clear_screen();
break;
* functions
*/
-void display_clear_screen(void) {
+void display_fill_screen(u8 fill) {
u8 page,width;
DISPLAY_SET_C_ADDR(0);
DISPLAY_SET_PAGE_ADDR(page);
for(width=0;width<DISPLAY_DIMX;width++) {
- DISPLAY_DATA=0x00;
- DISPLAY_DATA=0x00;
+ DISPLAY_DATA=fill;
+ DISPLAY_DATA=fill;
}
}
}
+void display_clear_screen(void) {
+
+ display_fill_screen(0x00);
+}
+
void display_init(void) {
DISPLAY_EXIT_POWER_SAVE;
DISPLAY_CMD=(((b)&0x0f)<<4|((a)&0x0f)); \
DISPLAY_CMD=0x8d; \
DISPLAY_CMD=(((d)&0x0f)<<4|((c)&0x0f))
-#define DISPLAY_SET_BLACK(a,b,c,d) DISPLAY_CMD=0x88; \
+#define DISPLAY_SET_BLACK(a,b,c,d) DISPLAY_CMD=0x8e; \
DISPLAY_CMD=(((b)&0x0f)<<4|((a)&0x0f)); \
- DISPLAY_CMD=0x89; \
+ DISPLAY_CMD=0x8f; \
DISPLAY_CMD=(((d)&0x0f)<<4|((c)&0x0f))
#define DISPLAY_SET_PWM_FRC(p,f) DISPLAY_CMD=(0x90| \
(((f&0x01)<<2)|(p&0x03)))
#define DISPLAY_EXTENDED_FEATURES DISPLAY_CMD=0xf0
/* function prototypes */
+void display_fill_screen(u8 fill);
void display_clear_screen(void);
void display_init(void);
void display_load_logo(u8 *src);