FreeCalypso > hg > tcs211-c139
comparison chipsetsw/riviera/rvt/rvt_gen.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children | 7ee1a8f57933 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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_INVALID_HEADER 0xFF | |
84 | |
85 typedef void (*RVT_CALLBACK_FUNC)(T_RVT_BUFFER, UINT16); | |
86 | |
87 /********* Fonction Prototypes ***********/ | |
88 void | |
89 rvt_set_trace_level(T_RVT_BUFFER p_msg, UINT16 msg_length); | |
90 | |
91 T_RVT_RET | |
92 rvt_send_trace_no_cpy(T_RVT_BUFFER p_buffer, | |
93 T_RVT_USER_ID user_id, | |
94 T_RVT_MSG_LG msg_lenght, | |
95 T_RVT_FORMAT msg_format); | |
96 | |
97 T_RVT_RET | |
98 rvt_send_trace_cpy(T_RVT_BUFFER msg, | |
99 T_RVT_USER_ID user_id, | |
100 T_RVT_MSG_LG msg_length, | |
101 T_RVT_FORMAT msg_format); | |
102 | |
103 | |
104 T_RVT_RET | |
105 rvt_register_id(T_RVT_NAME name[], T_RVT_USER_ID *tr_id, RVT_CALLBACK_FUNC callback); | |
106 | |
107 T_RVT_RET | |
108 rvt_mem_alloc(T_RVT_USER_ID user_id, T_RVT_MSG_LG buffer_lenght, T_RVT_BUFFER * buff); | |
109 | |
110 T_RVT_RET | |
111 rvt_mem_free(T_RVT_BUFFER msg); | |
112 | |
113 | |
114 #endif |