comparison nuc-fw/riviera/rvt/rvt_def_i.h @ 118:21de8d8e6ea7

checking in Riviera code from the Sotomodem version
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 29 Oct 2013 07:03:45 +0000
parents
children 28f967578233
comparison
equal deleted inserted replaced
117:e40d8661ecab 118:21de8d8e6ea7
1 /*******************************************************************************
2 *
3 * rvt_def_i.h
4 *
5 * (C) Texas Instruments, all rights reserved
6 *
7 * Version number : 0.1
8 *
9 * History : 0.1 (7/5/2000) - Created
10 *
11 * Date : 7/5/2000
12 *
13 * Author : Guido Pagana g-pagana@ti.com
14 *
15 ******************************************************************************/
16
17 #ifndef __RVT_DEF_I_H__
18 #define __RVT_DEF_I_H__
19
20 #include "rvt/rvt_gen.h"
21
22 #include "rvt/rvt_pool_size.h" /* Stack & Memory Bank sizes definitions */
23
24 /************************* Internal definitions **************************/
25
26
27 /* Define the maximum number of msg lost before sending an alert */
28 #define RVT_MAX_LOST_TRACE_MSG (1)
29
30 /* Trace user database (must end using RVT_END_OF_TABLE) */
31 #define RVT_END_OF_TABLE {"", RVT_INVALID_HEADER, NULL}
32
33 #define RVT_USER_ID_MAPPING { \
34 {"RV", RVT_RV_HEADER, NULL}, \
35 {"L1", RVT_L1_HEADER, NULL}, \
36 {"L23", RVT_L23_HEADER, NULL}, \
37 {"TM", RVT_TM_HEADER, NULL}, \
38 {"RNET", RVT_RNET_HEADER, NULL}, \
39 {"PROF", RVT_PROF_HEADER, NULL}, \
40 {"GTTBACK", RVT_GTTBACK_HEADER, NULL}, \
41 {"OTHER", RVT_OTHER_HEADER, NULL}, \
42 RVT_END_OF_TABLE \
43 }
44
45
46 /* Trace task mailbox */
47 #define RVT_TRACE_MAILBOX RVF_TASK_MBOX_0
48
49 typedef struct
50 { T_RVT_NAME user_name[RVT_NAME_MAX_LEN];
51 T_RVT_USER_ID user_id;
52 RVT_CALLBACK_FUNC rx_callback_func;
53 } T_RVT_USER_DB;
54
55
56 /* Define the unique message type used in RVT */
57 #define RVT_TRACE_RQST_ID ( (RVT_USE_ID & 0xFFFF0000) | ( 0x1) | 0x001)
58
59 typedef struct
60 { T_RV_HDR header;
61 T_RVT_USER_ID user_id;
62 T_RVT_FORMAT format;
63 T_RVT_MSG_LG msg_length;
64 } T_RVT_TRACE_RQST;
65
66
67 /* Trace message header size */
68 #define RVT_HEADER_SIZE (sizeof(T_RVT_TRACE_RQST) )
69
70 #define TRACE_TASK_STACK_SIZE TRACE_STACK_SIZE
71
72
73 #define TRACE_MB_SIZE (TRACE_MB1_SIZE)
74 #define TRACE_MB_WATERMARK (TRACE_MB_SIZE)
75
76 /* Decimal to hexadecimal conversion table */
77 static const char Num2Char[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
78
79 /*
80 ** Number of messages lost. Causes:
81 **
82 ** __ 'Format' differs from RVT_ASCII_FORMAT and RVT_BINARY_FORMAT.
83 ** | __ 'Message ID' differs from RVT_TRACE_RQST_ID.
84 ** | | __ rvf_read_mbox has returned NULL.
85 ** | | | __ Failed to send the message.
86 ** | | | | __ Insufficient resources.
87 ** | | | | | __ Trace Module not started.
88 ** |_|_|_|_|_|____________________________________________________
89 ** | ¦ ¦ ¦ ¦ ¦ ¦ | | | |
90 ** | ¦ ¦ ¦ ¦ ¦ ¦ | | | |
91 ** |_¦_¦_¦_¦_¦_¦_._|_._._._._._._._|_._._._._._._._|_._._._._._._._|
92 */
93 typedef union
94 {
95 struct
96 {
97 INT32 count : 26;
98 INT32 not_started : 1;
99 INT32 insufficient_resources : 1;
100 INT32 message_not_sent : 1;
101 INT32 message_empty : 1;
102 INT32 unknown_request : 1;
103 INT32 unknown_format : 1;
104 } bit_mask;
105 UINT32 overall_value;
106 } T_RVT_LOST_MSG;
107
108 extern T_RVT_LOST_MSG rvt_lost_msg_cpt;
109
110 /* Prototypes */
111 BOOLEAN rvt_name_cmp( char * str1, char * str2);
112 void rvt_activate_RX_HISR (void);
113 void rvt_RX_process (void);
114
115 #endif /* __RVT_DEF_I_H__ */