zmaee_tts_task.c 1.59 KB
#ifdef __ZMAEE_APP_TTS__

#include "zmaee_tts_typedef.h"
#include "zmaee_tts_iv.h"

#include "kal_release.h"
#include "stack_msgs.h"

#include "task_config.h"
#include "syscomp_config.h"

/*******************************************/
/* ±äÁ¿¶¨Òå									*/
/*******************************************/
extern int glb_zmaee_tts_stop;
extern int glb_zmaee_tts_stopping;
extern int glb_zmaee_tts_force_stop;

extern task_info_struct *task_info_g;

static void zmaee_tts_main(task_entry_struct * task_entry_ptr)
{
    kal_uint32      my_index;
    ilm_struct      current_ilm;
    
    kal_get_my_task_index(&my_index);

    while(1) {
            receive_msg_ext_q(task_info_g[task_entry_ptr->task_indx].task_ext_qid, &current_ilm);
            stack_set_active_module_id( my_index, current_ilm.dest_mod_id );
            switch (current_ilm.msg_id)
            {
            	case MSG_ID_ZMAEE_TTS_SYNTEXT_START:
					zmaee_tts_iv_syntext_handle();
					break;
         
                default:
                    break;
            }        
            free_ilm(&current_ilm);
    }
}

kal_bool zmaee_tts_create(comptask_handler_struct **handle)
{
        static const comptask_handler_struct ej_handler_info = {
                zmaee_tts_main,  /* task entry function */
                NULL,  /* task initialization function */
                NULL,  /* task configuration function */
                NULL,  /* task reset handler */
                NULL,  /* task termination handler */
        };

        *handle = (comptask_handler_struct *)&ej_handler_info;
        return KAL_TRUE;
}


#endif	// __ZMAEE_APP_TTS__