comparison chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c @ 19:8e7d4b264c73

pdt_2092: LCD output to RVTMUX implemented, hits RVT memory limits
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sun, 06 Sep 2015 06:52:39 +0000
parents 509db1a7b7b8
children
comparison
equal deleted inserted replaced
18:a0c4fd5c7430 19:8e7d4b264c73
1 #include "r2d/lcds/d_sample/r2d_tfd_lcd.h" 1 #include "r2d/lcds/d_sample/r2d_tfd_lcd.h"
2 #include "rvm/rvm_use_id_list.h" 2 #include "rvm/rvm_use_id_list.h"
3
4 /* FreeCalypso EXTUI mechanism */
5 #include "rvt/rvt_gen.h"
6 #include <string.h>
7
8 extern T_RVT_USER_ID extui_rvtmux_id;
3 9
4 #define RGB(R, G, B) ( (((unsigned char)(R) & 0xf8) << 8) | (((unsigned char)(G) & 0xfc) << 3) | (((unsigned char)(B) & 0xf8) >> 3) ) 10 #define RGB(R, G, B) ( (((unsigned char)(R) & 0xf8) << 8) | (((unsigned char)(G) & 0xfc) << 3) | (((unsigned char)(B) & 0xf8) >> 3) )
5 11
6 void r2d_lcd_power_on(void) 12 void r2d_lcd_power_on(void)
7 { 13 {
19 25
20 UINT32 v; 26 UINT32 v;
21 UINT32 *p; 27 UINT32 *p;
22 INT16 x1,x2,y1,y2,de,ds; 28 INT16 x1,x2,y1,y2,de,ds;
23 UINT32 a,b,c,d,e,f; 29 UINT32 a,b,c,d,e,f;
24 30 T_RVT_BUFFER buf;
31
25 p=r2d_g_framebuffer->p_memory_words; 32 p=r2d_g_framebuffer->p_memory_words;
26 33
27 #if (R2D_REFRESH == R2D_HORIZONTAL) 34 #if 0 //(R2D_REFRESH == R2D_HORIZONTAL)
28 35
29 LCD_activate; 36 LCD_activate;
30 37
31 x1=(r2d_update_ul_x>>1)<<1; //0 38 x1=(r2d_update_ul_x>>1)<<1; //0
32 x2=((r2d_update_br_x>>1)<<1)+1; //174; 39 x2=((r2d_update_br_x>>1)<<1)+1; //174;
102 109
103 } 110 }
104 111
105 LCD_deactivate; 112 LCD_deactivate;
106 #endif 113 #endif
114
115 #if 1
116 x1=(r2d_update_ul_x>>1)<<1; //0
117 x2=((r2d_update_br_x>>1)<<1)+1; //174;
118
119 ds=(x1>>1);
120 de=R2D_MWWIDTH-(x2>>1)-1; // WHY -1, is formula right ????
121
122 y1=r2d_update_ul_y; //0
123 y2=r2d_update_br_y; //219
124
125 //sprintf(debug,"%d,%d,%d,%d",x1,y1,x2,y2);
126 //rvf_send_trace(debug,strlen(debug), NULL_PARAM,
127 // RV_TRACE_LEVEL_DEBUG_HIGH, R2D_USE_ID );
128
129 p=p+y1*R2D_MWWIDTH;
130
131 for(i=y1;i<=y2;i++) {
132 p += ds;
133 j = (x2 - x1 + 1) * 2;
134 rvt_mem_alloc(extui_rvtmux_id, j + 2, &buf);
135 if (buf) {
136 buf[0] = i;
137 buf[1] = x1;
138 memcpy(buf + 2, p, j);
139 rvt_send_trace_no_cpy(buf, extui_rvtmux_id, j + 2,
140 RVT_BINARY_FORMAT);
141 }
142 p += j >> 2;
143 p += de;
144 }
145 #endif
146
107 #endif 147 #endif
108 148
109 r2d_check_and_send_event(r2d_g_framebuffer); 149 r2d_check_and_send_event(r2d_g_framebuffer);
110 r2d_reinit_update_region(); 150 r2d_reinit_update_region();
111 151