comparison riviera/rvt/rvt_gen.h @ 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 * tr_gen.h
4 *
5 * This file contain general definitions of Trace Module.
6 * Definitions are exportable
7 *
8 * (C) Texas Instruments, all rights reserved
9 *
10 * Version number : 0.1
11 *
12 * History : 0.1 (7/4/2000) - Created
13 *
14 * Date : 7/4/2000
15 *
16 * Author : Cristian Livadiotti, c-livadiotti@ti.com
17 *
18 ******************************************************************************/
19
20 #ifndef __RVT_GEN_H__
21 #define __RVT_GEN_H__
22
23 #include "../rv/general.h"
24
25 /*
26 ** If TRACE_MODULE is defined, the trace is using the trace task API.
27 ** Otherwise, the trace is using the RVF. NOW OBSOLETE !!!!!!!!
28 */
29 //#define TRACE_MODULE
30
31
32 /*
33 ** If FRAMING_PROTOCOL is defined, the trace mux should be used because of encapsulation and byte stuffing.
34 ** Otherwise, the hyperterminal should be used.
35 */
36 #define FRAMING_PROTOCOL
37
38
39 /*
40 ** If MIXED_TRACE is defined, all traces are mixed on the same UART and the
41 ** trace task handles the RX commands.
42 */
43 //#define MIXED_TRACE
44
45 /*
46 ** Type definitions
47 */
48
49 /* Define return parameters. */
50 typedef enum {
51 RVT_OK = 0,
52 RVT_NOT_SUPPORTED = -2,
53 RVT_NOT_READY = -3,
54 RVT_MEMORY_ERR = -4,
55 RVT_INTERNAL_ERR = -9,
56 RVT_INVALID_PARAMETER = -10
57 } T_RVT_RET;
58
59
60
61 typedef UINT8 T_RVT_USER_ID;
62 typedef UINT32 T_RVT_MSG_LG;
63
64 typedef enum {
65 RVT_ASCII_FORMAT, // 0
66 RVT_BINARY_FORMAT // 1
67 } T_RVT_FORMAT;
68
69
70 typedef UINT8 * T_RVT_BUFFER;
71
72 typedef char T_RVT_NAME;
73 #define RVT_NAME_MAX_LEN (10)
74
75 #define RVT_RV_HEADER 0x11
76 #define RVT_L1_HEADER 0x12
77 #define RVT_L23_HEADER 0x13
78 #define RVT_TM_HEADER 0x14
79 #define RVT_RNET_HEADER 0x15
80 #define RVT_PROF_HEADER 0x16
81 #define RVT_GTTBACK_HEADER 0x17
82 #define RVT_OTHER_HEADER 0x18
83 /* FreeCalypso additions */
84 #define RVT_AT_HEADER 0x1A
85 #define RVT_EXTUI_HEADER 0x1B
86 #define RVT_TCH_HEADER 0x1C
87 #define RVT_KEEPALIVE_HEADER 0x1D
88 /* end of FreeCalypso additions */
89 #define RVT_INVALID_HEADER 0xFF
90
91 typedef void (*RVT_CALLBACK_FUNC)(T_RVT_BUFFER, UINT16);
92
93 /********* Fonction Prototypes ***********/
94 void
95 rvt_set_trace_level(T_RVT_BUFFER p_msg, UINT16 msg_length);
96
97 T_RVT_RET
98 rvt_send_trace_no_cpy(T_RVT_BUFFER p_buffer,
99 T_RVT_USER_ID user_id,
100 T_RVT_MSG_LG msg_lenght,
101 T_RVT_FORMAT msg_format);
102
103 T_RVT_RET
104 rvt_send_trace_cpy(T_RVT_BUFFER msg,
105 T_RVT_USER_ID user_id,
106 T_RVT_MSG_LG msg_length,
107 T_RVT_FORMAT msg_format);
108
109
110 T_RVT_RET
111 rvt_register_id(T_RVT_NAME name[], T_RVT_USER_ID *tr_id, RVT_CALLBACK_FUNC callback);
112
113 T_RVT_RET
114 rvt_mem_alloc(T_RVT_USER_ID user_id, T_RVT_MSG_LG buffer_lenght, T_RVT_BUFFER * buff);
115
116 T_RVT_RET
117 rvt_mem_free(T_RVT_BUFFER msg);
118
119
120 #endif