comparison src/cs/riviera/rvt/rvt_gen.h @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children 6cea809631d7
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
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 #define RVT_AT_HEADER 0x1A /* FreeCalypso addition */
84 #define RVT_EXTUI_HEADER 0x1B /* ditto */
85 #define RVT_INVALID_HEADER 0xFF
86
87 typedef void (*RVT_CALLBACK_FUNC)(T_RVT_BUFFER, UINT16);
88
89 /********* Fonction Prototypes ***********/
90 void
91 rvt_set_trace_level(T_RVT_BUFFER p_msg, UINT16 msg_length);
92
93 T_RVT_RET
94 rvt_send_trace_no_cpy(T_RVT_BUFFER p_buffer,
95 T_RVT_USER_ID user_id,
96 T_RVT_MSG_LG msg_lenght,
97 T_RVT_FORMAT msg_format);
98
99 T_RVT_RET
100 rvt_send_trace_cpy(T_RVT_BUFFER msg,
101 T_RVT_USER_ID user_id,
102 T_RVT_MSG_LG msg_length,
103 T_RVT_FORMAT msg_format);
104
105
106 T_RVT_RET
107 rvt_register_id(T_RVT_NAME name[], T_RVT_USER_ID *tr_id, RVT_CALLBACK_FUNC callback);
108
109 T_RVT_RET
110 rvt_mem_alloc(T_RVT_USER_ID user_id, T_RVT_MSG_LG buffer_lenght, T_RVT_BUFFER * buff);
111
112 T_RVT_RET
113 rvt_mem_free(T_RVT_BUFFER msg);
114
115
116 #endif