/******************************************************************************* * FUNCTION * FT_Task * * DESCRIPTION * Entry point for the factory testing task. The function performs initialisation, * then sits in an infinite loop reading messages or reports and dispatching * them. * * CALLS * * PARAMETERS * None * * RETURNS * None * * GLOBALS AFFECTED * None *******************************************************************************/ void FTC_Task(task_entry_struct * task_entry_ptr) { ilm_struct current_ilm; while ( 1 ) { receive_msg_ext_q_for_stack(task_info_g[task_entry_ptr->task_indx].task_ext_qid, ¤t_ilm ); FTC_DispatchMessage(¤t_ilm ); free_ilm(¤t_ilm); } }
static void vuart_task_main(task_entry_struct *task_entry_ptr) { ilm_struct current_ilm; kal_uint32 my_index; kal_get_my_task_index(&my_index); stack_set_active_module_id (my_index, MOD_VUART); while (1) { receive_msg_ext_q( task_info_g[task_entry_ptr->task_indx].task_ext_qid, ¤t_ilm); vuart_main(¤t_ilm); free_ilm(¤t_ilm); } }
/***************************************************************************** * FUNCTION * gps_nvram_main * DESCRIPTION * This function is the main function of GPS NVRAM task * PARAMETERS * task_entry_ptr IN taks entry of GPS NVRAM * RETURNS * None. * GLOBALS AFFECTED * external_global *****************************************************************************/ static void gps_nvram_main(task_entry_struct * task_entry_ptr) { ilm_struct current_ilm; while ( 1 ) { receive_msg_ext_q(task_info_g[task_entry_ptr->task_indx].task_ext_qid, ¤t_ilm); switch (current_ilm.msg_id) { case MSG_ID_GPSLOCATE_NVRAMSTORE_IND: gps_nvram_log("GPS NVRAM receive msg: MSG_ID_GPSLOCATE_NVRAMSTORE_IND"); gps_nvram_wr2fs_ind_hdlr(¤t_ilm); break; //release semaphore kal_give_sem(gGPSLocateNvramSem); default: break; } free_ilm(¤t_ilm); } }
/***************************************************************************** * FUNCTION * CalHighTaskMain * DESCRIPTION * This function is main function of CAL HIGH task. * PARAMETERS * task_entry_ptr [?] * RETURNS * void *****************************************************************************/ void CalHighTaskMain(task_entry_struct *pTaskEntry) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct CurrentIlm; kal_uint32 CalHighTaskIndex; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ kal_get_my_task_index(&CalHighTaskIndex); while (1) { receive_msg_ext_q_for_stack(task_info_g[CalHighTaskIndex].task_ext_qid, &CurrentIlm); stack_set_active_module_id(CalHighTaskIndex, CurrentIlm.dest_mod_id); CalHighMsgHandle(&CurrentIlm); free_ilm(&CurrentIlm); } } /* CalHighTaskMain() */
/***************************************************************************** * FUNCTION * vcodec_v2_task_main * DESCRIPTION * Vcodec task main * PARAMETERS * task_entry_ptr [IN] task struct pointer * RETURNS * void *****************************************************************************/ static void vcodec_v2_task_main(task_entry_struct *task_entry_ptr) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct current_ilm; kal_uint32 my_index; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ kal_get_my_task_index(&my_index); while (1) { receive_msg_ext_q_for_stack(task_info_g[task_entry_ptr->task_indx].task_ext_qid, ¤t_ilm); stack_set_active_module_id(my_index, current_ilm.dest_mod_id); vcodec_v2_main((void*)¤t_ilm); free_ilm(¤t_ilm); } }