comparison gsm-fw/g23m-aci/aci/psa_mtst.c @ 775:eedbf248bac0

gsm-fw/g23m-aci subtree: initial import from LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 12 Oct 2014 01:45:14 +0000
parents
children
comparison
equal deleted inserted replaced
774:40a721fd9854 775:eedbf248bac0
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : PSA_MTST
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 : send primitiv to MTST in order to connect him with UART
18 +-----------------------------------------------------------------------------
19 */
20
21
22 #ifndef ATI_MMI_C
23 #define ATI_MMI_C
24 #endif
25
26 #include "aci_all.h"
27 /*===== INCLUDES ===================================================*/
28 #include "aci_cmh.h"
29 #include "ati_cmd.h"
30 #include "aci_io.h"
31 #include "aci_cmd.h"
32 #include "dti.h" /* functionality of the dti library */
33
34 #include "aci_mem.h"
35 #include "aci_cmd.h"
36 #include "aci.h"
37
38 #ifdef FF_TRACE_OVER_MTST
39
40 #define CONFIG_DTI_MTST 0x4711
41 typedef struct {
42 char str[100];
43 } T_CONFIG_DTI_MTST;
44
45 GLOBAL SHORT psaMTST_Switch_Trace (UBYTE dti_id,
46 T_DTI_ENTITY_ID conn_peer_Id,
47 BOOL switch_on)
48 {
49 char primString[100];
50 CHAR *p_ent_name;
51
52 TRACE_FUNCTION("psaMTST_Switch_Trace");
53
54 switch( conn_peer_Id )
55 {
56 case( DTI_ENTITY__UART ):
57 p_ent_name = &UART_NAME[0];
58 break;
59
60 case( DTI_ENTITY_MTST ):
61 p_ent_name = &MTST_NAME[0];
62 break;
63
64 default:
65 return PEI_ERROR;
66 }
67
68 if (switch_on)
69 {
70 /* build config string */
71 sprintf (primString, "CONFIG %s %d %d", p_ent_name, 0/*tui*/, dti_id);
72 }
73 else
74 {
75 sprintf (primString, "CONFIG STOP");
76 }
77
78 {
79 /* send config primitive to MTST */
80 PALLOC (prim, CONFIG_DTI_MTST);
81 D2P(prim)->opc |= SYS_MASK;
82 strcpy (prim->str, primString);
83
84 PSEND (hCommMTST, prim);
85 }
86 /* */
87 return PEI_OK;
88 }
89 #endif /* FF_TRACE_OVER_MTST */