zmaee_tts_task.c
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#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, ¤t_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(¤t_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__