FreeCalypso > hg > freecalypso-sw
comparison nuc-fw/riviera/rvt/rvt_api.c @ 122:28f967578233
RVT compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 31 Oct 2013 04:37:17 +0000 |
parents | 21de8d8e6ea7 |
children |
comparison
equal
deleted
inserted
replaced
121:15e972110527 | 122:28f967578233 |
---|---|
15 * Author : Guido Pagana g-pagana@ti.com * | 15 * Author : Guido Pagana g-pagana@ti.com * |
16 ***************************************************************************/ | 16 ***************************************************************************/ |
17 | 17 |
18 | 18 |
19 | 19 |
20 #include "rv/general.h" | 20 #include "../rv/general.h" |
21 #include "rv/rv_general.h" | 21 #include "../rv/rv_general.h" |
22 #include "rvf/rvf_api.h" | 22 #include "../rvf/rvf_api.h" |
23 #include "rvm/rvm_use_id_list.h" | 23 #include "../rvm/rvm_use_id_list.h" |
24 | 24 |
25 #include "rvt/rvt_gen.h" | 25 #include "rvt_gen.h" |
26 #include "rvt/rvt_def_i.h" | 26 #include "rvt_def_i.h" |
27 #include "rvt/rvt_env.h" | 27 #include "rvt_env.h" |
28 #include "rvt/rvt_env_i.h" | 28 #include "rvt_env_i.h" |
29 | 29 |
30 #include <string.h> | 30 #include <string.h> |
31 | 31 |
32 | 32 |
33 /* | 33 /* |
94 /* */ | 94 /* */ |
95 /********************************************************************************/ | 95 /********************************************************************************/ |
96 | 96 |
97 T_RVT_RET | 97 T_RVT_RET |
98 rvt_send_trace_no_cpy( T_RVT_BUFFER msg, | 98 rvt_send_trace_no_cpy( T_RVT_BUFFER msg, |
99 T_RVT_USER_ID user_id, | 99 T_RVT_USER_ID user_id, |
100 T_RVT_MSG_LG msg_length, | 100 T_RVT_MSG_LG msg_length, |
101 T_RVT_FORMAT msg_format) | 101 T_RVT_FORMAT msg_format) |
102 { | 102 { |
103 /* Shift the pointer back to write control values */ | 103 /* Shift the pointer back to write control values */ |
104 T_RVT_TRACE_RQST * req_msg = (T_RVT_TRACE_RQST * )((UINT8*)msg - RVT_HEADER_SIZE); | 104 T_RVT_TRACE_RQST * req_msg = (T_RVT_TRACE_RQST * )((UINT8*)msg - RVT_HEADER_SIZE); |
105 | 105 |
106 /* Check is Trace Module is running */ | 106 /* Check is Trace Module is running */ |
113 | 113 |
114 | 114 |
115 /* Add the id, size and format of the msg at the beginning */ | 115 /* Add the id, size and format of the msg at the beginning */ |
116 | 116 |
117 req_msg->header.msg_id = RVT_TRACE_RQST_ID; | 117 req_msg->header.msg_id = RVT_TRACE_RQST_ID; |
118 req_msg->format = msg_format; | 118 req_msg->format = msg_format; |
119 req_msg->user_id = user_id; | 119 req_msg->user_id = user_id; |
120 req_msg->msg_length = msg_length; | 120 req_msg->msg_length = msg_length; |
121 | 121 |
122 if (rvf_send_msg(rvt_addr_id, (void *) req_msg) != RVF_OK) | 122 if (rvf_send_msg(rvt_addr_id, (void *) req_msg) != RVF_OK) |
123 { | 123 { |
124 (rvt_lost_msg_cpt.bit_mask).count++; | 124 (rvt_lost_msg_cpt.bit_mask).count++; |
125 (rvt_lost_msg_cpt.bit_mask).message_not_sent = 1; | 125 (rvt_lost_msg_cpt.bit_mask).message_not_sent = 1; |
126 return RVT_INTERNAL_ERR; | 126 return RVT_INTERNAL_ERR; |
138 /* Note: */ | 138 /* Note: */ |
139 /* No check on id parameter !!!! Must be done in PC. */ | 139 /* No check on id parameter !!!! Must be done in PC. */ |
140 /* */ | 140 /* */ |
141 /********************************************************************************/ | 141 /********************************************************************************/ |
142 T_RVT_RET rvt_send_trace_cpy (T_RVT_BUFFER msg, | 142 T_RVT_RET rvt_send_trace_cpy (T_RVT_BUFFER msg, |
143 T_RVT_USER_ID user_id, | 143 T_RVT_USER_ID user_id, |
144 T_RVT_MSG_LG msg_length, | 144 T_RVT_MSG_LG msg_length, |
145 T_RVT_FORMAT msg_format) | 145 T_RVT_FORMAT msg_format) |
146 | |
147 | |
148 | |
149 { | 146 { |
150 T_RVT_TRACE_RQST * req ; | 147 T_RVT_TRACE_RQST * req ; |
151 | 148 |
152 /* Check is Trace Module is running */ | 149 /* Check is Trace Module is running */ |
153 if (rvt_module_state != RVT_STARTED) | 150 if (rvt_module_state != RVT_STARTED) |
165 return RVT_MEMORY_ERR; | 162 return RVT_MEMORY_ERR; |
166 } | 163 } |
167 | 164 |
168 /* Add the id, size and format of the msg at the beginning */ | 165 /* Add the id, size and format of the msg at the beginning */ |
169 req->header.msg_id = RVT_TRACE_RQST_ID; | 166 req->header.msg_id = RVT_TRACE_RQST_ID; |
170 req->format = msg_format; | 167 req->format = msg_format; |
171 req->user_id = user_id; | 168 req->user_id = user_id; |
172 req->msg_length = msg_length; | 169 req->msg_length = msg_length; |
173 | 170 |
174 /* Copy the message */ | 171 /* Copy the message */ |
175 memcpy( (UINT8*)req + RVT_HEADER_SIZE, msg, msg_length); | 172 memcpy( (UINT8*)req + RVT_HEADER_SIZE, msg, msg_length); |