// number_position: 0~1st number, 1~2nd number ,2~% void show_animation_number(UINT32 index,UINT32 number_position){ UINT32 logonum; UINT32 logolen; UINT32 inaddr; UINT32 i; void *fb_addr = mt65xx_get_fb_addr(); UINT32 fb_size = mt65xx_get_fb_size(); void *db_addr = mt65xx_get_logo_db_addr(); unsigned int *pinfo = (unsigned int*)db_addr; logonum = pinfo[0]; printf("[ChargingAnimation]show_animation_number :index= %d, logonum = %d\n", index, logonum); //ASSERT(index < logonum); if(index < logonum) logolen = pinfo[3+index] - pinfo[2+index]; else logolen = pinfo[1] - pinfo[2+index]; inaddr = (unsigned int)db_addr+pinfo[2+index]; printf("[ChargingAnimation]show_animation_number, in_addr=0x%08x, dest_addr=0x%08x, logolen=%d, ticks=%d\n", inaddr, logolen, logolen, get_ticks()); //windows draw default 160 180, mt65xx_logo_decompress((void*)inaddr, (void*)number_pic_addr, logolen, number_pic_size); fill_rect_flow(number_location_rect.left+ number_pic_width*number_position, number_location_rect.top, number_location_rect.right+number_pic_width*number_position, number_location_rect.bottom,number_pic_addr); //mt65xx_disp_update(0, 0, CFG_DISPLAY_WIDTH, CFG_DISPLAY_HEIGHT); }
void show_animation_line(UINT32 index,UINT32 capacity_grids){ UINT32 logonum; UINT32 logolen; UINT32 inaddr; UINT32 i; void *fb_addr = mt65xx_get_fb_addr(); UINT32 fb_size = mt65xx_get_fb_size(); void *db_addr = mt65xx_get_logo_db_addr(); unsigned int *pinfo = (unsigned int*)db_addr; logonum = pinfo[0]; printf("[ChargingAnimation]show_animation_line :index= %d, logonum = %d\n", index, logonum); //ASSERT(index < logonum); if(index < logonum) logolen = pinfo[3+index] - pinfo[2+index]; else logolen = pinfo[1] - pinfo[2+index]; inaddr = (unsigned int)db_addr+pinfo[2+index]; printf("[ChargingAnimation]show_animation_line, in_addr=0x%08x, dest_addr=0x%08x, logolen=%d, ticks=%d\n", inaddr, logolen, logolen, get_ticks()); //windows draw default 160 180, mt65xx_logo_decompress((void*)inaddr, (void*)line_pic_addr, logolen, line_pic_size); printf("[ChargingAnimation]show_animation_line :line_pic_size= %d, line_pic_addr size = %d\n", line_pic_size, sizeof(line_pic_addr)); fill_line_flow(battery_rect.left, capacity_grids, battery_rect.right, battery_rect.bottom, line_pic_addr); }
void show_animation(UINT32 index, RECT rect, char* addr){ UINT32 logonum; UINT32 logolen; UINT32 inaddr; UINT32 i; void *fb_addr = mt65xx_get_fb_addr(); UINT32 fb_size = mt65xx_get_fb_size(); void *db_addr = mt65xx_get_logo_db_addr(); unsigned int *pinfo = (unsigned int*)db_addr; logonum = pinfo[0]; printf("[ChargingAnimation]show_animation : index = %d, logonum = %d\n", index, logonum); //ASSERT(index < logonum); printf("[ChargingAnimation]show_animation :pinfo[0] = %d, pinfo[1] = %d, pinfo[2]= %d, pinfo[3] = %d\n",pinfo[0] , pinfo[1],pinfo[2],pinfo[3]); printf("[ChargingAnimation]show_animation :pinfo[2+index] = %d, pinfo[1] = %d\n",pinfo[2+index] , pinfo[3+index]); if(index < logonum) logolen = pinfo[3+index] - pinfo[2+index]; else logolen = pinfo[1] - pinfo[2+index]; inaddr = (unsigned int)db_addr+pinfo[2+index]; printf("[ChargingAnimation]show_animation: in_addr=0x%08x, dest_addr=0x%08x, logolen=%d, ticks=%d\n", inaddr, logolen, logolen, get_ticks()); mt65xx_logo_decompress((void*)inaddr, (void*)addr, logolen, (rect.right-rect.left)*(rect.bottom-rect.top)*2); printf("[ChargingAnimation]show_animation : rect right = %d\n", rect.right); printf("[ChargingAnimation]show_animation : rect top = %d\n", rect.top); printf("[ChargingAnimation]show_animation : rect size = %d\n", (rect.right-rect.left)*(rect.bottom-rect.top)*2); fill_rect_flow(rect.left,rect.top,rect.right,rect.bottom,addr); printf("ticks=%d\n", get_ticks()); }
static void show_logo(UINT32 index) { UINT32 logonum; UINT32 logolen; UINT32 inaddr; void *fb_addr = mt65xx_get_fb_addr(); UINT32 fb_size = mt65xx_get_fb_size(); void *db_addr = mt65xx_get_logo_db_addr(); unsigned int *pinfo = (unsigned int*)db_addr; logonum = pinfo[0]; ASSERT(index < logonum); if(index < logonum) logolen = pinfo[3+index] - pinfo[2+index]; else logolen = pinfo[1] - pinfo[2+index]; inaddr = (unsigned int)db_addr+pinfo[2+index]; printf("show_logo, in_addr=0x%08x, fb_addr=0x%08x, logolen=%d, ticks=%d\n", inaddr, fb_addr, logolen, get_ticks()); // mt65xx_logo_decompress((void*)inaddr, (void*)fb_addr + 2 * fb_size, logolen, fb_size); #if 1 { unsigned short *d; int j,k; if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) { unsigned int l; unsigned short *s; unsigned int width = CFG_DISPLAY_WIDTH; unsigned int height = CFG_DISPLAY_HEIGHT; mt65xx_logo_decompress((void*)inaddr, (void*)fb_addr + 2 * fb_size, logolen, fb_size); s = fb_addr + 2 * fb_size; for (j=0; j<width; j++){ for (k=0, l=height-1; k<height; k++, l--) { d = fb_addr + ((ALIGN_TO(width, 32) * l + j) << 1); *d = *s++; } } } else if(0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "90", 2)) { unsigned int l; unsigned short *s; unsigned int width = CFG_DISPLAY_WIDTH; unsigned int height = CFG_DISPLAY_HEIGHT; mt65xx_logo_decompress((void*)inaddr, (void*)fb_addr + 2 * fb_size, logolen, fb_size); s = fb_addr + 2 * fb_size; for (j=width - 1; j>=0; j--){ for (k=0, l=0; k<height; k++, l++) { d = fb_addr + ((ALIGN_TO(width, 32) * l + j) << 1); *d = *s++; } } } else #endif { if(0 != CFG_DISPLAY_WIDTH % 32){ unsigned short *s; unsigned short *d; unsigned int width = CFG_DISPLAY_WIDTH; unsigned int height = CFG_DISPLAY_HEIGHT; mt65xx_logo_decompress((void*)inaddr, (void*)fb_addr + 2 * fb_size, logolen, fb_size); s = fb_addr + 2 * fb_size; d = fb_addr; for (j=0;j < height; j++){ { memcpy(d, s, width * 2); d += ALIGN_TO(width, 32); s += width; } } } else{ mt65xx_logo_decompress((void*)inaddr, (void*)fb_addr, logolen, fb_size); } } } printf("ticks=%d\n", get_ticks()); }