2 * display.c - handling the display
4 * author: hackbard@hackdaworld.org
10 #include "default_logo.h"
17 void display_clear_screen(void) {
21 DISPLAY_SET_PAGE_ADDR(0);
22 DISPLAY_SET_C_ADDR(0);
24 for(cnt=0;cnt<DISPLAY_RAM_CONTENT;cnt++)
28 void display_init(void) {
30 DISPLAY_EXIT_POWER_SAVE;
35 DISPLAY_START_OSCILLATOR;
37 DISPLAY_SET_REGULATOR(7);
39 DISPLAY_SET_CONTRAST(0x38);
41 DISPLAY_SET_CONV_FACTOR(0x01);
43 DISPLAY_SET_UW_CORNER(0x1c,0x0a);
44 DISPLAY_SET_LW_CORNER(0x75,0x81);
46 DISPLAY_SET_PWM_FRC(0,0);
48 DISPLAY_SET_WHITE(0,0,0,0);
49 DISPLAY_SET_LGRAY(4,4,4,4);
50 DISPLAY_SET_DGRAY(6,6,6,6);
51 DISPLAY_SET_BLACK(9,9,9,9);
53 DISPLAY_SET_SEGMENT_REMAP_00H;
54 DISPLAY_SET_COM_ODIR_REMAPPED;
56 DISPLAY_SET_POWER(DISPLAY_REGULATOR|DISPLAY_OPAMP);
58 DISPLAY_SET_POWER(DISPLAY_V_BOOST|DISPLAY_REGULATOR|DISPLAY_OPAMP);
60 DISPLAY_RAM_CONTENTS_ON;
64 display_clear_screen();
69 void display_load_logo(u8 *src) {
78 DISPLAY_SET_PAGE_ADDR(0);
79 DISPLAY_SET_C_ADDR(0);
81 for(cnt=0;cnt<DISPLAY_RAM_CONTENT;cnt++)
85 void display_bl_init(void) {
88 IOSET0=(1<<4); // off by default
91 void display_bl_toggle(void) {
99 void display_bl_on(void) {
104 void display_bl_off(void) {