예제 #1
0
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,
                           &current_ilm);
        vuart_main(&current_ilm);
        free_ilm(&current_ilm);

    }

}
예제 #2
0
/*****************************************************************************
* 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, &current_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(&current_ilm);
		break;

	//release semaphore
	kal_give_sem(gGPSLocateNvramSem);

      default:
         break;
      }
      free_ilm(&current_ilm);
   }
}