static void __init timer_initialize(void) { pr_debug("%s\n", __func__); timer_source_init(CFG_TIMER_SYS_TICK_CH); timer_event_init(CFG_TIMER_EVT_TICK_CH); return; }
void main(void) { u32 cnt = 0; Init_Device(); //use code generate by silicon tool. TI0 = 1; //make uart0 in send enable status //----------------------------------------- event_init(); //-----------------------------------------add a timer event for printf #if 0 { timer_ev_unit_st xdata unit; timer_event_init(); unit.event = EVENT_ID_TIMER_DEBUG; unit.time = TRIG_TIME; unit.callback = func_for_debug; timer_event_add(&unit); } #endif //----------------------------------------- report_handler_init(); // while(cnt++<65536); // config_sensor(); test_func(); Usb_Init(); Interrupts_Init(); //open relative interrupt. //g_panel_point.ID = 0; //g_panel_point.x = 0; //g_panel_point.y = 0; while (1) { event_process(); if(g_work_style == WORK_STYLE_PREVIEW) { get_frame_data(); //while(EP_STATUS[1] != 0); send_debug_info_to_host(REPORT_ID_IN_DBGINFO); } else if(g_work_style == WORK_STYLE_CAL) { } else if(g_work_style == WORK_STYLE_NOMAL) { /* g_panel_point.x +=200; g_panel_point.y +=100; g_panel_point.x %= 1600; g_panel_point.y %= 900; fill_hid_packet(&g_panel_point,1); send_debug_info_to_host(REPORT_ID_IN_MTOUCH); */ } } }