comparison src/g23m-aci/uart/uart_rtf.c @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
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 #define ENTITY_UART
28
29 /*==== INCLUDES =============================================================*/
30
31 #ifdef WIN32
32 #include "nucleus.h"
33 #endif /* WIN32 */
34 #include "typedefs.h" /* to get Condat data types */
35 #include "vsi.h" /* to get a lot of macros */
36 #include "macdef.h" /* to get a lot of macros */
37 #include "custom.h"
38 #include "gsm.h" /* to get a lot of macros */
39 #include "cnf_uart.h" /* to get cnf-definitions */
40 #include "mon_uart.h" /* to get mon-definitions */
41 #include "prim.h" /* to get the definitions of used SAP and directions */
42 #ifdef DTILIB
43 #include "dti.h" /* to get dti lib */
44 #endif /* DTILIB */
45 #include "pei.h" /* to get PEI interface */
46 #ifdef FF_MULTI_PORT
47 #include "gsi.h" /* to get definitions of serial driver */
48 #else /* FF_MULTI_PORT */
49 #ifdef _TARGET_
50 #include "uart/serialswitch.h"
51 #include "uart/traceswitch.h"
52 #else /* _TARGET_ */
53 #include "serial_dat.h" /* to get definitions of serial driver */
54 #endif /* _TARGET_ */
55 #endif /* FF_MULTI_PORT */
56 #include "uart.h" /* to get the global entity definitions */
57
58 /*==== CONST ================================================================*/
59
60 /*==== LOCAL VARS ===========================================================*/
61
62 /*==== PRIVATE FUNCTIONS ====================================================*/
63
64 /*==== PUBLIC FUNCTIONS =====================================================*/
65
66
67
68 /*
69 +------------------------------------------------------------------------------
70 | Function : rt_init
71 +------------------------------------------------------------------------------
72 | Description : The function rt_init() initializes the service RT which is
73 | responsible for timer handling.
74 |
75 | Parameters : none
76 |
77 +------------------------------------------------------------------------------
78 */
79 GLOBAL void rt_init ()
80 {
81 TRACE_FUNCTION( "rt_init" );
82
83 /*
84 * initially all timers are stopped
85 */
86
87 uart_data->rt.state_t1 = UART_RT_STOPPED;
88 uart_data->rt.state_t2 = UART_RT_STOPPED;
89 uart_data->rt.state_t3 = UART_RT_STOPPED;
90 uart_data->rt.state_tesd = UART_RT_STOPPED;
91
92 /*
93 * set default values of timers
94 */
95 uart_data->rt.t1 = UART_MUX_T1_DEFAULT;
96 uart_data->rt.t2 = UART_MUX_T2_DEFAULT;
97 uart_data->rt.t3 = UART_MUX_T3_DEFAULT;
98 uart_data->rt.tesd = (T_TIME)-1;
99
100 INIT_STATE( UART_SERVICE_RT , RT_STATE );
101 } /* rt_init() */