FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/r2d/lcds/Simple/r2d_task_init_i.c @ 0:945cf7f506b2
src/cs: chipsetsw import from tcs211-fcmodem
binary blobs and LCD demo files have been excluded,
all line endings are LF only
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 25 Sep 2016 22:50:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:945cf7f506b2 |
---|---|
1 /* Used by refresh task to extract bytes from the | |
2 framebuffer */ | |
3 | |
4 | |
5 #define R2D_MB_PRIM_SIZE 2000 | |
6 | |
7 extern UINT32 r2d_p_refresh_buffer[4*R2D_WIDTH*R2D_MWHEIGHT]; | |
8 | |
9 | |
10 static void r2d_refresh_task_init(void) | |
11 { | |
12 INT16 i; | |
13 UINT32 *p; | |
14 | |
15 uwire_init_lcd(); | |
16 | |
17 lcd_transmit_cmd(0x08); //display blank | |
18 lcd_transmit_cmd(0x25); //power down use extended instructions | |
19 lcd_transmit_cmd(0x04); //set temperature coefficient to zero | |
20 lcd_transmit_cmd(0x14); //set bias voltage level n=3 | |
21 lcd_transmit_cmd(0xc5); //set Vlcd to 7.2 | |
22 lcd_transmit_cmd(0x20); //set PD=0->chip activate ,H=0-> basic instruction set | |
23 | |
24 | |
25 | |
26 | |
27 lcd_transmit_cmd(0x0d); //inverse video mode | |
28 | |
29 lcd_transmit_cmd(0x0c); //normal video mode | |
30 | |
31 p=r2d_p_refresh_buffer; | |
32 for(i=0;i<4*R2D_WIDTH*R2D_MWHEIGHT;i++) | |
33 { | |
34 *p++=0; | |
35 } | |
36 } | |
37 | |
38 static void r2d_refresh_task_kill(void) | |
39 { | |
40 | |
41 } | |
42 | |
43 static void r2d_dithering_init(void) | |
44 { | |
45 R2D_MALLOC(r2d_mb_id,UINT32,sizeof(UINT32)*4,r2d_g_dithering_matrix); | |
46 r2d_g_dithering_matrix[0]=0; | |
47 r2d_g_dithering_matrix[1]=2; | |
48 r2d_g_dithering_matrix[2]=3; | |
49 r2d_g_dithering_matrix[3]=1; | |
50 } |