FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_bw.c @ 0:4e78acac3d88
src/{condat,cs,gpf,nucleus}: import from Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:23:26 +0000 |
parents | |
children | c905daaff834 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4e78acac3d88 |
---|---|
1 #include "r2d/lcds/luna/r2d_luna_lcd.h" | |
2 | |
3 void r2d_lcd_power_on(void) | |
4 { | |
5 } | |
6 | |
7 void r2d_lcd_power_off(void) | |
8 { | |
9 } | |
10 | |
11 void r2d_refresh(void) | |
12 { | |
13 UINT16 i, j, k; | |
14 UINT32 v; | |
15 UINT32 *p; | |
16 INT16 y1, y2; | |
17 | |
18 p=r2d_g_framebuffer->p_memory_words; | |
19 | |
20 y1=r2d_update_ul_y; //0 | |
21 y2=r2d_update_br_y; //219 | |
22 | |
23 /* set window area */ | |
24 LCD_REG_WR(0x36, 175); | |
25 LCD_REG_WR(0x37, 0); | |
26 LCD_REG_WR(0x38, y2); | |
27 LCD_REG_WR(0x39, y1); | |
28 /* set current write address */ | |
29 LCD_REG_WR(0x20, 0); | |
30 LCD_REG_WR(0x21, y1); | |
31 /* set up for GRAM write */ | |
32 LCD_IR = 0x22; | |
33 | |
34 p=p+y1*R2D_MWWIDTH; | |
35 | |
36 for (i=y1;i<=y2;i++) | |
37 { | |
38 for (j = 0; j < R2D_MWWIDTH-1; j++) | |
39 { | |
40 v=*p++; | |
41 for (k=0;k<32;k++) | |
42 { | |
43 if (v&1) | |
44 LCD_DR = 0x0000; | |
45 else | |
46 LCD_DR = 0xFFFF; | |
47 v=v>>1; | |
48 } | |
49 } | |
50 v=*p++; | |
51 for (k=0;k<16;k++) | |
52 { | |
53 if (v&1) | |
54 LCD_DR = 0x0000; | |
55 else | |
56 LCD_DR = 0xFFFF; | |
57 v=v>>1; | |
58 } | |
59 } | |
60 | |
61 r2d_reinit_update_region(); | |
62 } |