FreeCalypso > hg > fc-selenite
comparison src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i.c @ 193:6a53de2c4fc2
R2D sync with Magnetite
R2D is never compiled in Selenite, thus the present change has absolutely
no impact on anything - but this sync is being done in order to keep the
overall diff between Magnetite and Selenite to a minimum.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 23 May 2020 07:13:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
192:4f40ae165be4 | 193:6a53de2c4fc2 |
---|---|
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; | |
14 UINT32 v; | |
15 UINT32 *p; | |
16 INT16 x1,x2,y1,y2,de,ds; | |
17 | |
18 p=r2d_g_framebuffer->p_memory_words; | |
19 | |
20 x1=(r2d_update_ul_x>>1)<<1; //0 | |
21 x2=((r2d_update_br_x>>1)<<1)+1; //174; | |
22 | |
23 ds=(x1>>1); | |
24 de=R2D_MWWIDTH-(x2>>1)-1; // WHY -1, is formula right ???? | |
25 | |
26 y1=r2d_update_ul_y; //0 | |
27 y2=r2d_update_br_y; //219 | |
28 | |
29 /* set window area */ | |
30 LCD_REG_WR(0x36, x2); | |
31 LCD_REG_WR(0x37, x1); | |
32 LCD_REG_WR(0x38, y2); | |
33 LCD_REG_WR(0x39, y1); | |
34 /* set current write address */ | |
35 LCD_REG_WR(0x20, x1); | |
36 LCD_REG_WR(0x21, y1); | |
37 /* set up for GRAM write */ | |
38 LCD_IR = 0x22; | |
39 | |
40 p=p+y1*R2D_MWWIDTH; | |
41 | |
42 for(i=y1;i<=y2;i++) | |
43 { | |
44 p+=ds; | |
45 for(j=(x1>>1);j<=(x2>>1);j++) | |
46 { | |
47 v=*p++; | |
48 v=~v; | |
49 | |
50 /*white*/ | |
51 /*v=0xffffffff*/ | |
52 /*black*/ | |
53 /*v=0x00000000*/ | |
54 | |
55 LCD_DR = v&0x0FFFF; | |
56 LCD_DR = v>>16; | |
57 } | |
58 p+=de; | |
59 } | |
60 | |
61 //r2d_check_and_send_event(r2d_g_framebuffer); | |
62 r2d_reinit_update_region(); | |
63 } |