* functions
*/
-void bl_init(void) {
+void display_clear_screen(void) {
+
+ u32 cnt;
+
+ DISPLAY_SET_PAGE_ADDR(0);
+ DISPLAY_SET_C_ADDR(0);
+
+ for(cnt=0;cnt<DISPLAY_RAM_CONTENT;cnt++)
+ DISPLAY_DATA=0x00;
+}
+
+void display_init(void) {
+
+ /* configure the ext mem bank interface */
+ BCFG1=0x00000c42;
+
+ DISPLAY_SOFT_RESET;
+
+ pause(0xffffff);
+
+ DISPLAY_START_OSCILLATOR;
+
+ DISPLAY_SET_POWER(DISPLAY_V_BOOST|DISPLAY_REGULATOR);
+
+ display_clear_screen();
+
+ DISPLAY_SET_ON;
+}
+
+void display_load_logo(u8 *src) {
+
+ u32 cnt;
+
+ DISPLAY_SET_PAGE_ADDR(0);
+ DISPLAY_SET_C_ADDR(0);
+
+ for(cnt=0;cnt<DISPLAY_RAM_CONTENT;cnt++)
+ DISPLAY_DATA=src[cnt];
+}
+
+void display_bl_init(void) {
PINSEL0&=~(1<<9|(1<<8));
IODIR0|=(1<<4);
}
-void bl_toggle(void) {
+void display_bl_toggle(void) {
if(IOPIN0&(1<<4))
IOCLR0=(1<<4);
IOSET0=(1<<4);
}
-void bl_on(void) {
+void display_bl_on(void) {
IOCLR0=(1<<4);
}
-void bl_off(void) {
+void display_bl_off(void) {
IOSET0=(1<<4);
}