comparison src/cs/riviera/rvt/rvt_def_i.h @ 0:4e78acac3d88

src/{condat,cs,gpf,nucleus}: import from Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:23:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4e78acac3d88
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 {"AT", RVT_AT_HEADER, NULL}, \
43 {"EXTUI", RVT_EXTUI_HEADER, NULL}, \
44 {"TCH", RVT_TCH_HEADER, NULL}, \
45 {"KEEPALIVE", RVT_KEEPALIVE_HEADER, NULL}, \
46 RVT_END_OF_TABLE \
47 }
48
49
50 /* Trace task mailbox */
51 #define RVT_TRACE_MAILBOX RVF_TASK_MBOX_0
52
53 typedef struct
54 { T_RVT_NAME user_name[RVT_NAME_MAX_LEN];
55 T_RVT_USER_ID user_id;
56 RVT_CALLBACK_FUNC rx_callback_func;
57 } T_RVT_USER_DB;
58
59
60 /* Define the unique message type used in RVT */
61 #define RVT_TRACE_RQST_ID ( (RVT_USE_ID & 0xFFFF0000) | ( 0x1) | 0x001)
62
63 typedef struct
64 { T_RV_HDR header;
65 T_RVT_USER_ID user_id;
66 T_RVT_FORMAT format;
67 T_RVT_MSG_LG msg_length;
68 } T_RVT_TRACE_RQST;
69
70
71 /* Trace message header size */
72 #define RVT_HEADER_SIZE (sizeof(T_RVT_TRACE_RQST) )
73
74 #define TRACE_TASK_STACK_SIZE TRACE_STACK_SIZE
75
76
77 #define TRACE_MB_SIZE (TRACE_MB1_SIZE)
78 #define TRACE_MB_WATERMARK (TRACE_MB_SIZE)
79
80 /* Decimal to hexadecimal conversion table */
81 static const char Num2Char[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
82
83 /*
84 ** Number of messages lost. Causes:
85 **
86 ** __ 'Format' differs from RVT_ASCII_FORMAT and RVT_BINARY_FORMAT.
87 ** | __ 'Message ID' differs from RVT_TRACE_RQST_ID.
88 ** | | __ rvf_read_mbox has returned NULL.
89 ** | | | __ Failed to send the message.
90 ** | | | | __ Insufficient resources.
91 ** | | | | | __ Trace Module not started.
92 ** |_|_|_|_|_|____________________________________________________
93 ** | ¦ ¦ ¦ ¦ ¦ ¦ | | | |
94 ** | ¦ ¦ ¦ ¦ ¦ ¦ | | | |
95 ** |_¦_¦_¦_¦_¦_¦_._|_._._._._._._._|_._._._._._._._|_._._._._._._._|
96 */
97 typedef union
98 {
99 struct
100 {
101 INT32 count : 26;
102 INT32 not_started : 1;
103 INT32 insufficient_resources : 1;
104 INT32 message_not_sent : 1;
105 INT32 message_empty : 1;
106 INT32 unknown_request : 1;
107 INT32 unknown_format : 1;
108 } bit_mask;
109 UINT32 overall_value;
110 } T_RVT_LOST_MSG;
111
112 extern T_RVT_LOST_MSG rvt_lost_msg_cpt;
113
114 /* Prototypes */
115 BOOLEAN rvt_name_cmp( char * str1, char * str2);
116 void rvt_activate_RX_HISR (void);
117 void rvt_RX_process (void);
118
119 #endif /* __RVT_DEF_I_H__ */