FreeCalypso > hg > tcs211-pirelli
changeset 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 | a0c4fd5c7430 |
children | c6c83ac3c1fb |
files | chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c |
diffstat | 2 files changed, 52 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c Sun Sep 06 03:05:37 2015 +0000 +++ b/chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c Sun Sep 06 06:52:39 2015 +0000 @@ -1,6 +1,12 @@ #include "r2d/lcds/d_sample/r2d_tfd_lcd.h" #include "rvm/rvm_use_id_list.h" +/* FreeCalypso EXTUI mechanism */ +#include "rvt/rvt_gen.h" +#include <string.h> + +extern T_RVT_USER_ID extui_rvtmux_id; + #define RGB(R, G, B) ( (((unsigned char)(R) & 0xf8) << 8) | (((unsigned char)(G) & 0xfc) << 3) | (((unsigned char)(B) & 0xf8) >> 3) ) void r2d_lcd_power_on(void) @@ -21,10 +27,11 @@ UINT32 *p; INT16 x1,x2,y1,y2,de,ds; UINT32 a,b,c,d,e,f; - + T_RVT_BUFFER buf; + p=r2d_g_framebuffer->p_memory_words; -#if (R2D_REFRESH == R2D_HORIZONTAL) +#if 0 //(R2D_REFRESH == R2D_HORIZONTAL) LCD_activate; @@ -104,9 +111,42 @@ LCD_deactivate; #endif + +#if 1 + x1=(r2d_update_ul_x>>1)<<1; //0 + x2=((r2d_update_br_x>>1)<<1)+1; //174; + + ds=(x1>>1); + de=R2D_MWWIDTH-(x2>>1)-1; // WHY -1, is formula right ???? + + y1=r2d_update_ul_y; //0 + y2=r2d_update_br_y; //219 + + //sprintf(debug,"%d,%d,%d,%d",x1,y1,x2,y2); + //rvf_send_trace(debug,strlen(debug), NULL_PARAM, + // RV_TRACE_LEVEL_DEBUG_HIGH, R2D_USE_ID ); + + p=p+y1*R2D_MWWIDTH; + + for(i=y1;i<=y2;i++) { + p += ds; + j = (x2 - x1 + 1) * 2; + rvt_mem_alloc(extui_rvtmux_id, j + 2, &buf); + if (buf) { + buf[0] = i; + buf[1] = x1; + memcpy(buf + 2, p, j); + rvt_send_trace_no_cpy(buf, extui_rvtmux_id, j + 2, + RVT_BINARY_FORMAT); + } + p += j >> 2; + p += de; + } +#endif + #endif r2d_check_and_send_event(r2d_g_framebuffer); r2d_reinit_update_region(); -} \ No newline at end of file +}
--- a/chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c Sun Sep 06 03:05:37 2015 +0000 +++ b/chipsetsw/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c Sun Sep 06 06:52:39 2015 +0000 @@ -7,6 +7,10 @@ #include "l1_types.h" #include "memif/mem.h" +/* FreeCalypso EXTUI mechanism */ +#include "rvt/rvt_gen.h" + +T_RVT_USER_ID extui_rvtmux_id; #define R2D_MB_PRIM_SIZE (4000) @@ -62,10 +66,11 @@ while (ms-- > 0) for (a=0;a<1000;a++) asm(" nop"); } - void r2d_refresh_task_init(void) +void r2d_refresh_task_init(void) { + rvt_register_id ("EXTUI", &extui_rvtmux_id, 0); -#ifndef _WINDOWS +#if 0 //#ifndef _WINDOWS UINT32 i; @@ -172,11 +177,12 @@ void r2d_lcd_off(void) { - +#if 0 LCD_cmd(LCD_DISOFF); //wait 70ms r2d_nop_delay(70); LCD_cmd(LCD_SLPIN); //wait 110ms r2d_nop_delay(110); +#endif }