FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/uart/uart_rtf.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This modul is part of the entity UART and implements all | |
18 | procedures and functions as described in the | |
19 | SDL-documentation (RT-statemachine) | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #ifndef UART_RTF_C | |
24 #define UART_RTF_C | |
25 #endif /* !UART_RTF_C */ | |
26 | |
27 #include "config.h" | |
28 #include "fixedconf.h" | |
29 #include "condat-features.h" | |
30 | |
31 #define ENTITY_UART | |
32 | |
33 /*==== INCLUDES =============================================================*/ | |
34 | |
35 #ifdef WIN32 | |
36 #include "nucleus.h" | |
37 #endif /* WIN32 */ | |
38 #include "typedefs.h" /* to get Condat data types */ | |
39 #include "vsi.h" /* to get a lot of macros */ | |
40 #include "macdef.h" /* to get a lot of macros */ | |
41 #include "custom.h" | |
42 #include "gsm.h" /* to get a lot of macros */ | |
43 #include "cnf_uart.h" /* to get cnf-definitions */ | |
44 #include "mon_uart.h" /* to get mon-definitions */ | |
45 #include "prim.h" /* to get the definitions of used SAP and directions */ | |
46 #ifdef DTILIB | |
47 #include "dti.h" /* to get dti lib */ | |
48 #endif /* DTILIB */ | |
49 #include "pei.h" /* to get PEI interface */ | |
50 #ifdef FF_MULTI_PORT | |
51 #include "gsi.h" /* to get definitions of serial driver */ | |
52 #else /* FF_MULTI_PORT */ | |
53 #ifdef _TARGET_ | |
54 #include "../../serial/serialswitch.h" | |
55 #include "../../serial/traceswitch.h" | |
56 #else /* _TARGET_ */ | |
57 #include "serial_dat.h" /* to get definitions of serial driver */ | |
58 #endif /* _TARGET_ */ | |
59 #endif /* FF_MULTI_PORT */ | |
60 #include "uart.h" /* to get the global entity definitions */ | |
61 | |
62 /*==== CONST ================================================================*/ | |
63 | |
64 /*==== LOCAL VARS ===========================================================*/ | |
65 | |
66 /*==== PRIVATE FUNCTIONS ====================================================*/ | |
67 | |
68 /*==== PUBLIC FUNCTIONS =====================================================*/ | |
69 | |
70 | |
71 | |
72 /* | |
73 +------------------------------------------------------------------------------ | |
74 | Function : rt_init | |
75 +------------------------------------------------------------------------------ | |
76 | Description : The function rt_init() initializes the service RT which is | |
77 | responsible for timer handling. | |
78 | | |
79 | Parameters : none | |
80 | | |
81 +------------------------------------------------------------------------------ | |
82 */ | |
83 GLOBAL void rt_init () | |
84 { | |
85 TRACE_FUNCTION( "rt_init" ); | |
86 | |
87 /* | |
88 * initially all timers are stopped | |
89 */ | |
90 | |
91 uart_data->rt.state_t1 = UART_RT_STOPPED; | |
92 uart_data->rt.state_t2 = UART_RT_STOPPED; | |
93 uart_data->rt.state_t3 = UART_RT_STOPPED; | |
94 uart_data->rt.state_tesd = UART_RT_STOPPED; | |
95 | |
96 /* | |
97 * set default values of timers | |
98 */ | |
99 uart_data->rt.t1 = UART_MUX_T1_DEFAULT; | |
100 uart_data->rt.t2 = UART_MUX_T2_DEFAULT; | |
101 uart_data->rt.t3 = UART_MUX_T3_DEFAULT; | |
102 uart_data->rt.tesd = (T_TIME)-1; | |
103 | |
104 INIT_STATE( UART_SERVICE_RT , RT_STATE ); | |
105 } /* rt_init() */ |