comparison src/g23m-aci/aci/psa_raf.c @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : PSA_RAF
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 module defines the functions for the protocol
18 | stack adapter for Rate Adaptation.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef PSA_RAF_C
23 #define PSA_RAF_C
24 #endif
25
26 #include "aci_all.h"
27
28 #undef TRACING
29
30 /*==== INCLUDES ===================================================*/
31 #include "aci_cmh.h"
32 #include "ati_cmd.h"
33 #include "aci_cmd.h"
34
35 #ifdef FAX_AND_DATA
36 #include "aci_fd.h"
37 #endif
38
39 #include "aci.h"
40 #include "psa.h"
41 #include "aci_io.h"
42 #include "psa_ra.h"
43 #include "cmh.h"
44 #include "cmh_ra.h"
45 #include "psa_util.h"
46
47 /*==== CONSTANTS ==================================================*/
48 #define ITM_WDT (14) /* item width in chars */
49 #define HDR_WDT (10) /* header width in chars */
50
51 /*==== TYPES ======================================================*/
52
53
54 /*==== EXPORT =====================================================*/
55
56 /*==== VARIABLES ==================================================*/
57
58 /*==== FUNCTIONS ==================================================*/
59
60 /*
61 +-------------------------------------------------------------------+
62 | PROJECT : GSM-PS (6147) MODULE : PSA_RA |
63 | ROUTINE : psaRA_Init |
64 +-------------------------------------------------------------------+
65
66 PURPOSE : initialize the protocol stack adapter for RA.
67
68 */
69
70 GLOBAL void psaRA_Init ( void )
71 {
72 extern void dll_init(void);
73
74 memset (&raShrdPrm, 0, sizeof (T_RA_SHRD_PRM));
75
76 dll_init ();
77 }
78
79 /*
80 +-------------------------------------------------------------------+
81 | PROJECT : GSM-PS (6147) MODULE : PSA_RAF |
82 | ROUTINE : psaRA_shrPrmDump |
83 +-------------------------------------------------------------------+
84
85 PURPOSE : this function dumps the shared parameter to the debug
86 output.
87 */
88
89 #ifdef TRACING
90 GLOBAL void psaRA_shrPrmDump ( void )
91 {
92 char lnBuf[80]; /* holds buffer for output line */
93 SHORT chrNr; /* holds number of processed chars */
94 SHORT itmIdx;
95
96 /* --- mode --------------------------------------------------*/
97 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " model" );
98 for( itmIdx = 0; (itmIdx<2); itmIdx++ )
99 {
100 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT,
101 raShrdPrm.set_prm[itmIdx].model );
102 }
103 TRACE_EVENT( lnBuf );
104
105 /* --- transmission rate -------------------------------------*/
106 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, "trans rate" );
107 for( itmIdx = 0; (itmIdx<2); itmIdx++ )
108 {
109 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT,
110 raShrdPrm.set_prm[itmIdx].tra_rate );
111 }
112 TRACE_EVENT( lnBuf );
113
114 /* --- user rate ---------------------------------------------*/
115 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " user rate" );
116 for( itmIdx = 0; (itmIdx<2); itmIdx++ )
117 {
118 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT,
119 raShrdPrm.set_prm[itmIdx].user_rate );
120 }
121 TRACE_EVENT( lnBuf );
122
123 /* --- no. data bits -----------------------------------------*/
124 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " data bits" );
125 for( itmIdx = 0; (itmIdx<2); itmIdx++ )
126 {
127 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT,
128 raShrdPrm.set_prm[itmIdx].ndb );
129 }
130 TRACE_EVENT( lnBuf );
131
132 /* --- no. stop bits -----------------------------------------*/
133 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " stop bits" );
134 for( itmIdx = 0; (itmIdx<2); itmIdx++ )
135 {
136 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT,
137 raShrdPrm.set_prm[itmIdx].nsb );
138 }
139 TRACE_EVENT( lnBuf );
140
141 /* --- owner -------------------------------------------------*/
142 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " owner" );
143
144 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, raShrdPrm.owner );
145 TRACE_EVENT( lnBuf );
146
147 /* --- call id -----------------------------------------------*/
148 chrNr = sprintf( lnBuf, "%*.*s", HDR_WDT, HDR_WDT, " call id" );
149
150 chrNr += sprintf( lnBuf+chrNr, "%*d", ITM_WDT, raShrdPrm.cId );
151 TRACE_EVENT( lnBuf );
152 }
153 #endif /* of #ifdef TRACING */
154
155 /*==== EOF ========================================================*/
156