Merge branch 'Branch_S550_Fast' of gitlab.sifar.tech:linux-em-group/s530-ntk into branch_s550_fast
This commit is contained in:
commit
befc2d0c0d
|
@ -20,6 +20,7 @@
|
||||||
#define DISP_DRAW_UPDATEFW_FAILED 6
|
#define DISP_DRAW_UPDATEFW_FAILED 6
|
||||||
#define DISP_DRAW_UPDATEFW_FAILED_AND_RETRY 7
|
#define DISP_DRAW_UPDATEFW_FAILED_AND_RETRY 7
|
||||||
#define DISP_DRAW_UPDATEFW_AGAIN 8
|
#define DISP_DRAW_UPDATEFW_AGAIN 8
|
||||||
|
#define DISP_DRAW_UPDATEFW_PROMPT 9
|
||||||
|
|
||||||
#define DISP_UPDATEFW_OK (0)
|
#define DISP_UPDATEFW_OK (0)
|
||||||
#define DISP_UPDATEFW_FAILED (-1)
|
#define DISP_UPDATEFW_FAILED (-1)
|
||||||
|
|
|
@ -2052,7 +2052,7 @@ int nvt_process_all_in_one(ulong addr, unsigned int size, int firm_upd_firm)
|
||||||
printf("nvt_process_all_in_one: TotalRes = %d\r\n", TotalRes);
|
printf("nvt_process_all_in_one: TotalRes = %d\r\n", TotalRes);
|
||||||
#ifdef CONFIG_NVT_DISPLAY_BAR_FWUPDATE
|
#ifdef CONFIG_NVT_DISPLAY_BAR_FWUPDATE
|
||||||
nvt_display_config(DISP_CFG_TOTAL_DRAWING_BAR, TotalRes);
|
nvt_display_config(DISP_CFG_TOTAL_DRAWING_BAR, TotalRes);
|
||||||
nvt_display_draw(DISP_DRAW_EXTERNAL_FRAME);
|
//nvt_display_draw(DISP_DRAW_EXTERNAL_FRAME);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2399,8 +2399,8 @@ int nvt_fw_update(bool firm_upd_firm)
|
||||||
retry++;
|
retry++;
|
||||||
#ifdef CONFIG_NVT_DISPLAY_BAR_FWUPDATE //uboot config
|
#ifdef CONFIG_NVT_DISPLAY_BAR_FWUPDATE //uboot config
|
||||||
if (retry < UPDATE_ALL_IN_ONE_RETRY_TIMES) {
|
if (retry < UPDATE_ALL_IN_ONE_RETRY_TIMES) {
|
||||||
nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED_AND_RETRY);
|
//nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED_AND_RETRY);
|
||||||
mdelay(1500);
|
//mdelay(1500);
|
||||||
nvt_display_draw(DISP_DRAW_UPDATEFW_AGAIN);
|
nvt_display_draw(DISP_DRAW_UPDATEFW_AGAIN);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#define Y_COLOR 0x4C
|
#define Y_COLOR 0x4C
|
||||||
#define UV_COLOR 0x4C // UV is packed together.
|
#define UV_COLOR 0x4C // UV is packed together.
|
||||||
#define Y_COLOR_1 0xFF
|
#define Y_COLOR_1 0x00
|
||||||
#define UV_COLOR_1 0x80 // UV is packed together.
|
#define UV_COLOR_1 0x80 // UV is packed together.
|
||||||
|
|
||||||
#define UPFRAME_ROTATE0 3
|
#define UPFRAME_ROTATE0 3
|
||||||
|
@ -77,22 +77,22 @@
|
||||||
#define DOWNFRAME_ROTATE270 3
|
#define DOWNFRAME_ROTATE270 3
|
||||||
#define LEFTFRAME_ROTATE270 3
|
#define LEFTFRAME_ROTATE270 3
|
||||||
#define RIGHTFRAME_ROTATE270 3
|
#define RIGHTFRAME_ROTATE270 3
|
||||||
#define BAR_X_ROTATE270 20
|
#define BAR_X_ROTATE270 36
|
||||||
#define BAR_Y_ROTATE270 60
|
#define BAR_Y_ROTATE270 46
|
||||||
#define BAR_W_ROTATE270 20 //Progressive bar and drawing by CPU. The x-offset is movable
|
#define BAR_W_ROTATE270 10 //Progressive bar and drawing by CPU. The x-offset is movable
|
||||||
#define BAR_H_ROTATE270 22
|
#define BAR_H_ROTATE270 8
|
||||||
#define STRING1_X_ROTATE270 10
|
#define STRING1_X_ROTATE270 36
|
||||||
#define STRING1_Y_ROTATE270 20
|
#define STRING1_Y_ROTATE270 20
|
||||||
#define STRING2_X_ROTATE270 10
|
#define STRING2_X_ROTATE270 36
|
||||||
#define STRING2_Y_ROTATE270 252
|
#define STRING2_Y_ROTATE270 267
|
||||||
#define STRING3_X_ROTATE270 102
|
#define STRING3_X_ROTATE270 186
|
||||||
#define STRING3_Y_ROTATE270 72
|
#define STRING3_Y_ROTATE270 107
|
||||||
#define STRING4_X_ROTATE270 102
|
#define STRING4_X_ROTATE270 102
|
||||||
#define STRING4_Y_ROTATE270 72
|
#define STRING4_Y_ROTATE270 24
|
||||||
#define STRING5_X_ROTATE270 102
|
#define STRING5_X_ROTATE270 102
|
||||||
#define STRING5_Y_ROTATE270 72
|
#define STRING5_Y_ROTATE270 72
|
||||||
#define STRING6_X_ROTATE270 102
|
#define STRING6_X_ROTATE270 36
|
||||||
#define STRING6_Y_ROTATE270 72
|
#define STRING6_Y_ROTATE270 46
|
||||||
|
|
||||||
static UINT32 g_uiUpFrame = UPFRAME_ROTATE0;
|
static UINT32 g_uiUpFrame = UPFRAME_ROTATE0;
|
||||||
static UINT32 g_uiDownFrame = DOWNFRAME_ROTATE0;
|
static UINT32 g_uiDownFrame = DOWNFRAME_ROTATE0;
|
||||||
|
@ -102,17 +102,17 @@ static UINT32 g_uiBarX = BAR_X_ROTATE0;
|
||||||
static UINT32 g_uiBarY = BAR_Y_ROTATE0;
|
static UINT32 g_uiBarY = BAR_Y_ROTATE0;
|
||||||
static UINT32 g_uiBarW = BAR_W_ROTATE0;
|
static UINT32 g_uiBarW = BAR_W_ROTATE0;
|
||||||
static UINT32 g_uiBarH = BAR_H_ROTATE0;
|
static UINT32 g_uiBarH = BAR_H_ROTATE0;
|
||||||
static UINT32 g_uiStr_1_X = STRING1_X_ROTATE0;
|
static UINT32 g_uiStr_1_X = STRING1_X_ROTATE0;/*0%*/
|
||||||
static UINT32 g_uiStr_1_Y = STRING1_Y_ROTATE0;
|
static UINT32 g_uiStr_1_Y = STRING1_Y_ROTATE0;
|
||||||
static UINT32 g_uiStr_2_X = STRING2_X_ROTATE0;
|
static UINT32 g_uiStr_2_X = STRING2_X_ROTATE0;/*100%*/
|
||||||
static UINT32 g_uiStr_2_Y = STRING2_Y_ROTATE0;
|
static UINT32 g_uiStr_2_Y = STRING2_Y_ROTATE0;
|
||||||
static UINT32 g_uiStr_3_X = STRING3_X_ROTATE0;
|
static UINT32 g_uiStr_3_X = STRING3_X_ROTATE0;/*Updating FW...*/
|
||||||
static UINT32 g_uiStr_3_Y = STRING3_Y_ROTATE0;
|
static UINT32 g_uiStr_3_Y = STRING3_Y_ROTATE0;
|
||||||
static UINT32 g_uiStr_4_X = STRING4_X_ROTATE0;
|
static UINT32 g_uiStr_4_X = STRING4_X_ROTATE0;//"Updating FW OK!" string
|
||||||
static UINT32 g_uiStr_4_Y = STRING4_Y_ROTATE0;
|
static UINT32 g_uiStr_4_Y = STRING4_Y_ROTATE0;
|
||||||
static UINT32 g_uiStr_5_X = STRING5_X_ROTATE0;
|
static UINT32 g_uiStr_5_X = STRING5_X_ROTATE0;//"Updating FW failed" string
|
||||||
static UINT32 g_uiStr_5_Y = STRING5_Y_ROTATE0;
|
static UINT32 g_uiStr_5_Y = STRING5_Y_ROTATE0;
|
||||||
static UINT32 g_uiStr_6_X = STRING6_X_ROTATE0;
|
static UINT32 g_uiStr_6_X = STRING6_X_ROTATE0;//"Updating again" string
|
||||||
static UINT32 g_uiStr_6_Y = STRING6_Y_ROTATE0;
|
static UINT32 g_uiStr_6_Y = STRING6_Y_ROTATE0;
|
||||||
static UINT32 g_uiRotateDir = DISP_ROTATE_0;
|
static UINT32 g_uiRotateDir = DISP_ROTATE_0;
|
||||||
static UINT32 g_bNvtDispInit = FALSE;
|
static UINT32 g_bNvtDispInit = FALSE;
|
||||||
|
@ -129,6 +129,7 @@ static UINT32 g_uiLogoAddr = 0;
|
||||||
static UINT32 g_uiLogoSize = 0;
|
static UINT32 g_uiLogoSize = 0;
|
||||||
static UINT32 g_uiTotalBarNum = 0; //(write partition + read back partition) for the bumber of progressive bar
|
static UINT32 g_uiTotalBarNum = 0; //(write partition + read back partition) for the bumber of progressive bar
|
||||||
static UINT32 g_uiXBarStep = 0;
|
static UINT32 g_uiXBarStep = 0;
|
||||||
|
static UINT32 g_uiBarWtmp = 0;
|
||||||
static UINT32 g_uiPixelOffset = 0;
|
static UINT32 g_uiPixelOffset = 0;
|
||||||
static UINT32 g_uiStrYBufSize = 64*1024;
|
static UINT32 g_uiStrYBufSize = 64*1024;
|
||||||
static UINT32 g_uiStr1_w = 0;
|
static UINT32 g_uiStr1_w = 0;
|
||||||
|
@ -467,8 +468,8 @@ int nvt_display_init(void)
|
||||||
g_uiRightFrame = RIGHTFRAME_ROTATE270;
|
g_uiRightFrame = RIGHTFRAME_ROTATE270;
|
||||||
g_uiBarX = BAR_X_ROTATE270;
|
g_uiBarX = BAR_X_ROTATE270;
|
||||||
g_uiBarY = BAR_Y_ROTATE270;
|
g_uiBarY = BAR_Y_ROTATE270;
|
||||||
g_uiBarW = BAR_W_ROTATE270;
|
// g_uiBarW = BAR_W_ROTATE270;
|
||||||
g_uiBarH = BAR_H_ROTATE270;
|
// g_uiBarH = BAR_H_ROTATE270;
|
||||||
g_uiStr_1_X = STRING1_X_ROTATE270;
|
g_uiStr_1_X = STRING1_X_ROTATE270;
|
||||||
g_uiStr_1_Y = STRING1_Y_ROTATE270;
|
g_uiStr_1_Y = STRING1_Y_ROTATE270;
|
||||||
g_uiStr_2_X = STRING2_X_ROTATE270;
|
g_uiStr_2_X = STRING2_X_ROTATE270;
|
||||||
|
@ -518,6 +519,7 @@ int nvt_display_init(void)
|
||||||
nvt_display_set_background();
|
nvt_display_set_background();
|
||||||
|
|
||||||
nvt_display_draw_init_string();
|
nvt_display_draw_init_string();
|
||||||
|
// nvt_display_draw(DISP_DRAW_UPDATEFW_PROMPT);
|
||||||
|
|
||||||
nvt_display_copy_pingpong_buffer();
|
nvt_display_copy_pingpong_buffer();
|
||||||
|
|
||||||
|
@ -669,6 +671,7 @@ int nvt_display_decode_string(void)
|
||||||
}
|
}
|
||||||
jpeg_getdim(&img_width, &img_height);
|
jpeg_getdim(&img_width, &img_height);
|
||||||
_Y_LOG("str6: image size: %d x %d\n", img_width, img_height);
|
_Y_LOG("str6: image size: %d x %d\n", img_width, img_height);
|
||||||
|
printf("str6: image size: %d x %d\n", img_width, img_height);
|
||||||
if(g_uiStrYBufSize*2 < img_width*img_height*2) {
|
if(g_uiStrYBufSize*2 < img_width*img_height*2) {
|
||||||
printf("(%d,%d) size small 0x%x\r\n",img_width,img_height,g_uiStrYBufSize*2);
|
printf("(%d,%d) size small 0x%x\r\n",img_width,img_height,g_uiStrYBufSize*2);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -714,6 +717,7 @@ void nvt_display_copy_pingpong_buffer(void)
|
||||||
void nvt_display_draw_init_string(void)
|
void nvt_display_draw_init_string(void)
|
||||||
{
|
{
|
||||||
UINT32 i,j;
|
UINT32 i,j;
|
||||||
|
printf("g_uiPinPongIdx:%lu\r\n", g_uiPinPongIdx);
|
||||||
|
|
||||||
switch (g_uiPinPongIdx){
|
switch (g_uiPinPongIdx){
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -752,7 +756,9 @@ void nvt_display_draw_init_string(void)
|
||||||
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_1_Y + g_uiStr_1_X + i*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_1_Y + g_uiStr_1_X + i*g_uiImgLineoffset;
|
||||||
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr1_YAddr + i*g_uiStr1_w), g_uiStr1_w);
|
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr1_YAddr + i*g_uiStr1_w), g_uiStr1_w);
|
||||||
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr1_UVAddr + i*g_uiStr1_w), g_uiStr1_w);
|
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr1_UVAddr + i*g_uiStr1_w), g_uiStr1_w);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i<g_uiStr2_h; i++) {
|
||||||
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_2_Y + g_uiStr_2_X + i*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_2_Y + g_uiStr_2_X + i*g_uiImgLineoffset;
|
||||||
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr2_YAddr + i*g_uiStr2_w), g_uiStr2_w);
|
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr2_YAddr + i*g_uiStr2_w), g_uiStr2_w);
|
||||||
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr2_UVAddr + i*g_uiStr2_w), g_uiStr2_w);
|
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr2_UVAddr + i*g_uiStr2_w), g_uiStr2_w);
|
||||||
|
@ -763,6 +769,18 @@ void nvt_display_draw_init_string(void)
|
||||||
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr3_YAddr + i*g_uiStr3_w), g_uiStr3_w);
|
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr3_YAddr + i*g_uiStr3_w), g_uiStr3_w);
|
||||||
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr3_UVAddr + i*g_uiStr3_w), g_uiStr3_w);
|
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr3_UVAddr + i*g_uiStr3_w), g_uiStr3_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i=0 ;i < g_uiStr4_h; i++) {
|
||||||
|
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_4_Y + g_uiStr_4_X + i*g_uiImgLineoffset;
|
||||||
|
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr4_YAddr + i*g_uiStr4_w), g_uiStr4_w);
|
||||||
|
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr4_UVAddr + i*g_uiStr4_w),g_uiStr4_w);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0 ;i < g_uiStr6_h; i++) {
|
||||||
|
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_6_Y + g_uiStr_6_X + i*g_uiImgLineoffset;
|
||||||
|
memcpy((void *)(g_uiVDO_YAddr + g_uiPixelOffset), (void *)(g_uiStr6_YAddr + i*g_uiStr6_w), g_uiStr6_w);
|
||||||
|
memcpy((void *)(g_uiVDO_UVAddr + g_uiPixelOffset), (void *)(g_uiStr6_UVAddr + i*g_uiStr6_w),g_uiStr6_w);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -813,6 +831,12 @@ void nvt_display_draw_init_string(void)
|
||||||
memcpy((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), (void *)(g_uiStr3_YAddr + i*g_uiStr3_w), g_uiStr3_w);
|
memcpy((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), (void *)(g_uiStr3_YAddr + i*g_uiStr3_w), g_uiStr3_w);
|
||||||
memcpy((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset), (void *)(g_uiStr3_UVAddr + i*g_uiStr3_w), g_uiStr3_w);
|
memcpy((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset), (void *)(g_uiStr3_UVAddr + i*g_uiStr3_w), g_uiStr3_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i=0 ;i < g_uiStr4_h; i++) {
|
||||||
|
g_uiPixelOffset = g_uiImgLineoffset*g_uiStr_4_Y + g_uiStr_4_X + i*g_uiImgLineoffset;
|
||||||
|
memcpy((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), (void *)(g_uiStr4_YAddr + i*g_uiStr4_w), g_uiStr4_w);
|
||||||
|
memcpy((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset), (void *)(g_uiStr4_UVAddr + i*g_uiStr4_w),g_uiStr4_w);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -841,6 +865,7 @@ void nvt_display_draw(UINT32 u32Id)
|
||||||
if (!g_uiVDO2_YAddr) {
|
if (!g_uiVDO2_YAddr) {
|
||||||
g_uiPinPongIdx = 0;
|
g_uiPinPongIdx = 0;
|
||||||
}
|
}
|
||||||
|
printf("u32Id:%lu\r\n", u32Id);
|
||||||
|
|
||||||
switch (u32Id) {
|
switch (u32Id) {
|
||||||
case DISP_DRAW_INIT:
|
case DISP_DRAW_INIT:
|
||||||
|
@ -922,25 +947,29 @@ void nvt_display_draw(UINT32 u32Id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISP_DRAW_UPDATING_BAR:
|
case DISP_DRAW_UPDATING_BAR:
|
||||||
|
// j = g_uiXBarStep*g_uiBarW + g_uiBarW;
|
||||||
|
g_uiBarWtmp = g_uiXBarStep*g_uiBarW + g_uiBarW;
|
||||||
g_uiXBarStep++;
|
g_uiXBarStep++;
|
||||||
|
printf("g_uiPinPongIdx:%lu g_uiXBarStep:%lu j:%lu\r\n", g_uiPinPongIdx,g_uiXBarStep,g_uiBarWtmp);
|
||||||
|
|
||||||
for (i=1; i <= g_uiXBarStep; i++) {
|
for (i=1; i <= g_uiXBarStep; i++) {
|
||||||
for (j = 0; j < g_uiBarH; j++) {
|
for (j = 0; j < g_uiBarWtmp; j++) {
|
||||||
if (g_uiRotateDir == DISP_ROTATE_0) {
|
if (g_uiRotateDir == DISP_ROTATE_0) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarW /*offset for next bar*/ + j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarH /*offset for next bar*/ + j*g_uiImgLineoffset;
|
||||||
} else if (g_uiRotateDir == DISP_ROTATE_90) {
|
} else if (g_uiRotateDir == DISP_ROTATE_90) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX - (i-1)*g_uiBarW*g_uiImgLineoffset - j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX - (i-1)*g_uiBarH*g_uiImgLineoffset - j*g_uiImgLineoffset;
|
||||||
} else if (g_uiRotateDir == DISP_ROTATE_270) {
|
} else if (g_uiRotateDir == DISP_ROTATE_270) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarW*g_uiImgLineoffset + j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarH*g_uiImgLineoffset + j*g_uiImgLineoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (g_uiPinPongIdx){
|
switch (g_uiPinPongIdx){
|
||||||
case 0:
|
case 0:
|
||||||
memset((void *)(g_uiVDO_YAddr + g_uiPixelOffset), 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO_YAddr + g_uiPixelOffset), 0x4C, g_uiBarH);
|
||||||
memset((void *)(g_uiVDO_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarH);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
memset((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), 0x4C, g_uiBarH);
|
||||||
memset((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarH);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -948,28 +977,33 @@ void nvt_display_draw(UINT32 u32Id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISP_DRAW_UPDATEFW_OK:
|
case DISP_DRAW_UPDATEFW_OK:
|
||||||
|
printf("g_uiPinPongIdx:%lu g_uiXBarStep:%lu j:%lu\r\n", g_uiPinPongIdx,g_uiXBarStep,g_uiBarWtmp);
|
||||||
for (i=1; i <= g_uiXBarStep; i++) {
|
for (i=1; i <= g_uiXBarStep; i++) {
|
||||||
for (j = 0; j < g_uiBarH; j++) {
|
for (j = 0; j < g_uiBarWtmp; j++) {
|
||||||
if (g_uiRotateDir == DISP_ROTATE_0) {
|
if (g_uiRotateDir == DISP_ROTATE_0) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarW + j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarH + j*g_uiImgLineoffset;
|
||||||
} else if (g_uiRotateDir == DISP_ROTATE_90) {
|
} else if (g_uiRotateDir == DISP_ROTATE_90) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX - (i-1)*g_uiBarW*g_uiImgLineoffset - j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX - (i-1)*g_uiBarH*g_uiImgLineoffset - j*g_uiImgLineoffset;
|
||||||
} else if (g_uiRotateDir == DISP_ROTATE_270) {
|
} else if (g_uiRotateDir == DISP_ROTATE_270) {
|
||||||
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarW*g_uiImgLineoffset + j*g_uiImgLineoffset;
|
g_uiPixelOffset = g_uiBarY*g_uiImgLineoffset + g_uiBarX + (i-1)*g_uiBarH*g_uiImgLineoffset + j*g_uiImgLineoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (g_uiPinPongIdx){
|
switch (g_uiPinPongIdx){
|
||||||
case 0:
|
case 0:
|
||||||
memset((void *)(g_uiVDO_YAddr + g_uiPixelOffset), 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO_YAddr + g_uiPixelOffset), 0x4C, g_uiBarH);
|
||||||
memset((void *)(g_uiVDO_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarH);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
memset((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO2_YAddr + g_uiPixelOffset), 0x4C, g_uiBarH);
|
||||||
memset((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarW);
|
memset((void *)(g_uiVDO2_UVAddr + g_uiPixelOffset) , 0x4C, g_uiBarH);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DISP_DRAW_UPDATEFW_PROMPT:
|
||||||
|
printf("g_uiPinPongIdx:%lu\r\n", g_uiPinPongIdx);
|
||||||
|
|
||||||
for (i=0 ;i < g_uiStr4_h; i++) {
|
for (i=0 ;i < g_uiStr4_h; i++) {
|
||||||
if (g_uiRotateDir == DISP_ROTATE_0) {
|
if (g_uiRotateDir == DISP_ROTATE_0) {
|
||||||
|
@ -1262,7 +1296,7 @@ void nvt_display_set_status(INT32 vlaue)
|
||||||
} else if (vlaue == DISP_UPDATEFW_FAILED) {
|
} else if (vlaue == DISP_UPDATEFW_FAILED) {
|
||||||
nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED);
|
nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED);
|
||||||
} else if (vlaue == DISP_DRAW_UPDATEFW_FAILED_AND_RETRY) {
|
} else if (vlaue == DISP_DRAW_UPDATEFW_FAILED_AND_RETRY) {
|
||||||
nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED_AND_RETRY);
|
//nvt_display_draw(DISP_DRAW_UPDATEFW_FAILED_AND_RETRY);
|
||||||
} else {
|
} else {
|
||||||
printf("%s No display status is selected %s\r\n", ANSI_COLOR_RED, ANSI_COLOR_RESET);
|
printf("%s No display status is selected %s\r\n", ANSI_COLOR_RED, ANSI_COLOR_RESET);
|
||||||
}
|
}
|
||||||
|
@ -1277,6 +1311,9 @@ void nvt_display_config(UINT32 config_id, UINT32 vlaue)
|
||||||
switch (config_id) {
|
switch (config_id) {
|
||||||
case DISP_CFG_TOTAL_DRAWING_BAR:
|
case DISP_CFG_TOTAL_DRAWING_BAR:
|
||||||
g_uiTotalBarNum = vlaue*2; //wrtie partition + read back partition
|
g_uiTotalBarNum = vlaue*2; //wrtie partition + read back partition
|
||||||
|
g_uiBarW = g_uiStr6_h/(vlaue*2);
|
||||||
|
g_uiBarH = g_uiStr6_w;
|
||||||
|
printf("g_uiBarW:%lu\r\n", g_uiBarW);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4728,8 +4728,9 @@ SINT32 sf_get_utc(VOID)
|
||||||
strcpy((char *)gsmPara, "AT+QLTS=2\r");
|
strcpy((char *)gsmPara, "AT+QLTS=2\r");
|
||||||
ttyRet = sf_hal_ttyusb2_write(gsmPara, strlen(gsmPara));
|
ttyRet = sf_hal_ttyusb2_write(gsmPara, strlen(gsmPara));
|
||||||
SF_CHECK_RETURN(ttyRet, SF_GPRS_MODULE_ERROR_WRITE);
|
SF_CHECK_RETURN(ttyRet, SF_GPRS_MODULE_ERROR_WRITE);
|
||||||
ttyData.cmp = "OK";
|
ttyData.cmp = "+QLTS:";
|
||||||
ttyData.len = 48;
|
ttyData.len = 48;
|
||||||
|
sf_sleep_ms(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4800,6 +4801,8 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
||||||
SF_TTY_DATA_TYPE_S ttyData = { .waitMs = 1000, .len = 3, .lenMax = (GPRS_INFO_LINE_MAX-1), .cmp = "OK", .cmperr = "ERROR", .data = gsmPara};
|
SF_TTY_DATA_TYPE_S ttyData = { .waitMs = 1000, .len = 3, .lenMax = (GPRS_INFO_LINE_MAX-1), .cmp = "OK", .cmperr = "ERROR", .data = gsmPara};
|
||||||
|
|
||||||
SF_DEBUG("Sim4gApn=%s", pPara->Sim4gApn);
|
SF_DEBUG("Sim4gApn=%s", pPara->Sim4gApn);
|
||||||
|
|
||||||
|
sf_hal_ttyusb2_read(gsmPara, 200);//clean uart read buff
|
||||||
sf_gsm_para_buff_clear();
|
sf_gsm_para_buff_clear();
|
||||||
|
|
||||||
pdpIndex = sf_get_pdp_index();
|
pdpIndex = sf_get_pdp_index();
|
||||||
|
@ -4937,7 +4940,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(calltime > 350)
|
if(calltime > 50)
|
||||||
{
|
{
|
||||||
ret = SF_SIM_ERROR_NTP;
|
ret = SF_SIM_ERROR_NTP;
|
||||||
sprintf((char *)logStr, "[%s:%d]Error Code:0x%08X;gsmPara:%s", __FUNCTION__, __LINE__, ret, strstr((const char *)gsmPara, "ERROR"));
|
sprintf((char *)logStr, "[%s:%d]Error Code:0x%08X;gsmPara:%s", __FUNCTION__, __LINE__, ret, strstr((const char *)gsmPara, "ERROR"));
|
||||||
|
@ -4971,7 +4974,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
||||||
|
|
||||||
case SMS_SIM_INIT_EXIT:
|
case SMS_SIM_INIT_EXIT:
|
||||||
|
|
||||||
if(strstr((const char *)gsmPara, "OK") || (calltime > 300))
|
if(strstr((const char *)gsmPara, "OK") || (calltime > 100))
|
||||||
{
|
{
|
||||||
goto SF_GEN_NTP_END;
|
goto SF_GEN_NTP_END;
|
||||||
}
|
}
|
||||||
|
@ -4993,7 +4996,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
||||||
|
|
||||||
time++;
|
time++;
|
||||||
|
|
||||||
if(time > 800)
|
if(time > 200)
|
||||||
{
|
{
|
||||||
SLOGE(gsmPara);
|
SLOGE(gsmPara);
|
||||||
sprintf((char *)logStr, "[%s:%d]Wait Init Timeout.", __FUNCTION__, __LINE__);
|
sprintf((char *)logStr, "[%s:%d]Wait Init Timeout.", __FUNCTION__, __LINE__);
|
||||||
|
|
|
@ -236,7 +236,7 @@ SINT32 sf_sys_rtc_time_reset(void)
|
||||||
|
|
||||||
struct rtc_time rtctm;
|
struct rtc_time rtctm;
|
||||||
rtctm.tm_year = 2023 - 1900;
|
rtctm.tm_year = 2023 - 1900;
|
||||||
rtctm.tm_mon = 1;
|
rtctm.tm_mon = 0;
|
||||||
rtctm.tm_mday = 1;
|
rtctm.tm_mday = 1;
|
||||||
rtctm.tm_hour = 8;
|
rtctm.tm_hour = 8;
|
||||||
rtctm.tm_min = 0;
|
rtctm.tm_min = 0;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#define FLGPHOTOFAST_MASK FLGPTN_BIT_ALL
|
#define FLGPHOTOFAST_MASK FLGPTN_BIT_ALL
|
||||||
#define PHOTOFAST_AE_PRESET_FRAME_CNT 11 /* lock AE */
|
#define PHOTOFAST_AE_PRESET_FRAME_CNT 11 /* lock AE */
|
||||||
#define PHOTOFAST_START_CAP_FRAME_CNT (PHOTOFAST_AE_PRESET_FRAME_CNT + 3*2) /* capture frame, it should be larger than PHOTOFAST_AE_PRESET_FRAME_CNT by 3 */
|
#define PHOTOFAST_START_CAP_FRAME_CNT (PHOTOFAST_AE_PRESET_FRAME_CNT + 3*2) /* capture frame, it should be larger than PHOTOFAST_AE_PRESET_FRAME_CNT by 3 */
|
||||||
#define PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS 3000
|
#define PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS 6000
|
||||||
|
|
||||||
// Naming rule & FileDB
|
// Naming rule & FileDB
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user