__s32 DRV_lcd_open(__u32 sel) { __u32 i = 0; __lcd_flow_t *flow; if (g_disp_drv.b_lcd_open[sel] == 0) { BSP_disp_lcd_open_before(sel); flow = BSP_disp_lcd_get_open_flow(sel); for (i = 0; i < flow->func_num; i++) { __u32 timeout = flow->func[i].delay * HZ / 1000; flow->func[i].func(sel); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(timeout); } BSP_disp_lcd_open_after(sel); g_disp_drv.b_lcd_open[sel] = 1; } return 0; }
void disp_lcd_open_timer(unsigned long sel) { __lcd_flow_t *flow; __u32 timeout; flow = BSP_disp_lcd_get_open_flow(sel); if((g_disp_drv.b_lcd_open[sel] == 0) && (flow->cur_step < (flow->func_num-1))) { if(flow->cur_step == 0) { BSP_disp_lcd_open_before(sel); } flow->func[flow->cur_step].func(sel); timeout = flow->func[flow->cur_step].delay*HZ/1000; g_disp_drv.disp_timer[sel].function = &disp_lcd_open_timer; g_disp_drv.disp_timer[sel].data = sel;//(unsigned int)&g_fbi; g_disp_drv.disp_timer[sel].expires = jiffies + timeout; add_timer(&g_disp_drv.disp_timer[sel]); flow->cur_step ++; } return; }
__s32 DRV_lcd_open(__u32 sel) { lcd_flow_cnt[sel] = 0; lcd_op_finished[sel] = 0; lcd_timer[sel] = wBoot_timer_request((void*)DRV_lcd_open_callback,(void*)sel); if(!lcd_timer[sel]) { __inf("%s wBoot_timer_request fail!\n",__FUNCTION__); } BSP_disp_lcd_open_before(sel); DRV_lcd_open_callback((void*)sel); return 0; }
__s32 DRV_lcd_open(__u32 sel) { __u32 i = 0; __lcd_flow_t *flow; BSP_disp_lcd_open_before(sel); flow = BSP_disp_lcd_get_open_flow(sel); for(i=0; i<flow->func_num; i++) { flow->func[i].func(sel); esKRNL_TimeDly(flow->func[i].delay / 10); } BSP_disp_lcd_open_after(sel); return EPDK_OK; }