FreeCalypso > hg > leo2moko-debug
comparison chipsetsw/services/tty/tty_task.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /** | |
2 * @file tty_task.c | |
3 * | |
4 * Coding of the main TTY function : tty_core | |
5 * This function loop in the process message function for waiting messages. | |
6 * | |
7 * @author Frederic Turgis (f-turgis@ti.com) & Gerard Cauvy (g-cauvy@ti.com) | |
8 * @version 0.1 | |
9 */ | |
10 | |
11 /* | |
12 * History: | |
13 * | |
14 * Date Modification | |
15 * ------------------------------------ | |
16 * 01/27/2003 Create | |
17 * | |
18 * (C) Copyright 2003 by Texas Instruments Incorporated, All Rights Reserved | |
19 */ | |
20 | |
21 #ifndef _WINDOWS | |
22 #include "config/l1sw.cfg" | |
23 #endif | |
24 | |
25 #include "tty/tty_env.h" | |
26 #include "tty/tty_i.h" | |
27 | |
28 #include "rv/rv_general.h" | |
29 #include "rvf/rvf_api.h" | |
30 #include "rvm/rvm_use_id_list.h" | |
31 | |
32 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) | |
33 #ifndef _WINDOWS | |
34 #include "config/sys.cfg" | |
35 #include "config/chipset.cfg" | |
36 #endif | |
37 #include "l1_types.h" | |
38 #include "l1_confg.h" | |
39 #include "l1_trace.h" | |
40 #endif | |
41 | |
42 #if (L1_GTT == 1) | |
43 /* External prototype. */ | |
44 extern void l1gtt_initialize(void); | |
45 extern void l1gtt_exit(void); | |
46 extern void l1gtt_main_processing(void); | |
47 extern void l1gtt_init_trace(void); | |
48 #else | |
49 /* Dummy functions */ | |
50 void l1gtt_initialize(void) {} | |
51 void l1gtt_exit(void) {} | |
52 void l1gtt_main_processing(void) {} | |
53 void l1gtt_init_trace(void) {} | |
54 #endif | |
55 | |
56 | |
57 /** | |
58 * @name Functions implementation | |
59 * | |
60 */ | |
61 /*@{*/ | |
62 | |
63 /** | |
64 * function: tty_core | |
65 */ | |
66 T_RV_RET tty_core(void) | |
67 { | |
68 BOOLEAN error_occured = FALSE; | |
69 T_RV_HDR* msg_p; | |
70 UINT16 received_event; | |
71 | |
72 TTY_SEND_TRACE("TTY TASK Started", RV_TRACE_LEVEL_DEBUG_HIGH ); | |
73 | |
74 l1gtt_init_trace(); | |
75 | |
76 /* loop to process messages */ | |
77 while (error_occured == FALSE) | |
78 { | |
79 /* Wait for the necessary events. */ | |
80 received_event = rvf_wait ( 0xffff,0); | |
81 | |
82 if (received_event & TTY_INIT_EVENT_MASK) | |
83 { | |
84 l1gtt_initialize(); | |
85 } | |
86 else if (received_event & TTY_EXIT_EVENT_MASK) | |
87 { | |
88 l1gtt_exit(); | |
89 } | |
90 else if (received_event & TTY_DATA_EVENT_MASK) | |
91 { | |
92 l1gtt_main_processing(); | |
93 } | |
94 } | |
95 | |
96 return RV_OK; | |
97 } |