FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c @ 453:96c047b4325e
R2D D-Sample drivers: only do the actual hw pokes when CONFIG_TARGET_DSAMPLE
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 15 Mar 2018 05:48:03 +0000 |
parents | 945cf7f506b2 |
children |
comparison
equal
deleted
inserted
replaced
452:4d7c2ccb5814 | 453:96c047b4325e |
---|---|
9 | 9 |
10 | 10 |
11 #define R2D_MB_PRIM_SIZE (4000) | 11 #define R2D_MB_PRIM_SIZE (4000) |
12 | 12 |
13 | 13 |
14 #ifdef CONFIG_TARGET_DSAMPLE | |
14 const unsigned char INIT_DISCTL[11] = { 0xDE,0x01,0x64,0x00,0x1B,0xF4,0x00,0xDC,0x00,0x02,0x00}; | 15 const unsigned char INIT_DISCTL[11] = { 0xDE,0x01,0x64,0x00,0x1B,0xF4,0x00,0xDC,0x00,0x02,0x00}; |
15 | 16 |
16 | 17 |
17 const unsigned char INIT_GCP64[126] = { | 18 const unsigned char INIT_GCP64[126] = { |
18 0x3B, 0x0, 0x42, 0x0, 0x4A, 0x0, 0x51, | 19 0x3B, 0x0, 0x42, 0x0, 0x4A, 0x0, 0x51, |
59 static void r2d_nop_delay(UINT32 ms) | 60 static void r2d_nop_delay(UINT32 ms) |
60 { | 61 { |
61 unsigned short a; | 62 unsigned short a; |
62 while (ms-- > 0) for (a=0;a<1000;a++) asm(" nop"); | 63 while (ms-- > 0) for (a=0;a<1000;a++) asm(" nop"); |
63 } | 64 } |
65 #endif | |
64 | 66 |
65 void r2d_refresh_task_init(void) | 67 void r2d_refresh_task_init(void) |
66 { | 68 { |
67 | 69 |
68 #ifndef _WINDOWS | 70 #ifdef CONFIG_TARGET_DSAMPLE |
69 | 71 |
70 UINT32 i; | 72 UINT32 i; |
71 | 73 |
72 LCD_activate; | 74 LCD_activate; |
73 | 75 |
170 } | 172 } |
171 } | 173 } |
172 | 174 |
173 void r2d_lcd_off(void) | 175 void r2d_lcd_off(void) |
174 { | 176 { |
175 | 177 #ifdef CONFIG_TARGET_DSAMPLE |
176 LCD_cmd(LCD_DISOFF); | 178 LCD_cmd(LCD_DISOFF); |
177 //wait 70ms | 179 //wait 70ms |
178 r2d_nop_delay(70); | 180 r2d_nop_delay(70); |
179 LCD_cmd(LCD_SLPIN); | 181 LCD_cmd(LCD_SLPIN); |
180 //wait 110ms | 182 //wait 110ms |
181 r2d_nop_delay(110); | 183 r2d_nop_delay(110); |
184 #endif | |
182 } | 185 } |