Revision d54d2f07 Target/Source/gateway.c
Target/Source/gateway.c | ||
---|---|---|
23 | 23 |
* You should have received a copy of the GNU General Public License along with OpenBLT. |
24 | 24 |
* If not, see <http://www.gnu.org/licenses/>. |
25 | 25 |
* |
26 |
* A special exception to the GPL is included to allow you to distribute a combined work
|
|
27 |
* that includes OpenBLT without being obliged to provide the source code for any
|
|
26 |
* A special exception to the GPL is included to allow you to distribute a combined work |
|
27 |
* that includes OpenBLT without being obliged to provide the source code for any |
|
28 | 28 |
* proprietary components. The exception text is included at the bottom of the license |
29 | 29 |
* file <license.html>. |
30 |
*
|
|
30 |
* |
|
31 | 31 |
* \endinternal |
32 | 32 |
****************************************************************************************/ |
33 | 33 |
|
... | ... | |
135 | 135 |
|
136 | 136 |
|
137 | 137 |
/************************************************************************************//** |
138 |
** \brief Updates the gateway module by checking if new data was received
|
|
138 |
** \brief Updates the gateway module by checking if new data was received |
|
139 | 139 |
** and submitting the request to process newly received data. |
140 | 140 |
** \return none |
141 | 141 |
** |
... | ... | |
145 | 145 |
blt_int16s messageLength; |
146 | 146 |
/* make xcpCtoReqPacket static for runtime efficiency */ |
147 | 147 |
static unsigned char xcpCtoReqPacket[BOOT_COM_RX_MAX_DATA]; |
148 |
|
|
148 |
|
|
149 | 149 |
#if (BOOT_GATE_CAN_ENABLE > 0) |
150 | 150 |
messageLength = (blt_int16s)CanReceivePacket(&xcpCtoReqPacket[0]); |
151 | 151 |
if (messageLength > 0) |
... | ... | |
265 | 265 |
blt_int16u GateGetActiveInterfaceMaxRxLen(void) |
266 | 266 |
{ |
267 | 267 |
blt_int16u result; |
268 |
|
|
268 |
|
|
269 | 269 |
/* filter on gateway interface identifier */ |
270 | 270 |
switch (gateActiveInterface) |
271 | 271 |
{ |
... | ... | |
284 | 284 |
case GATE_IF_NET: |
285 | 285 |
result = BOOT_COM_NET_RX_MAX_DATA; |
286 | 286 |
break; |
287 |
|
|
287 |
|
|
288 | 288 |
default: |
289 | 289 |
result = BOOT_COM_RX_MAX_DATA; |
290 | 290 |
break; |
291 | 291 |
} |
292 |
|
|
292 |
|
|
293 | 293 |
return result; |
294 | 294 |
} /*** end of GateGetActiveInterfaceMaxRxLen ***/ |
295 | 295 |
|
296 | 296 |
|
297 | 297 |
/************************************************************************************//** |
298 |
** \brief Obtains the maximum number of bytes that can be transmitted on the
|
|
298 |
** \brief Obtains the maximum number of bytes that can be transmitted on the |
|
299 | 299 |
** specified gateway interface. |
300 | 300 |
** \return Maximum number of bytes that can be received. |
301 | 301 |
** |
... | ... | |
303 | 303 |
blt_int16u GateGetActiveInterfaceMaxTxLen(void) |
304 | 304 |
{ |
305 | 305 |
blt_int16u result; |
306 |
|
|
306 |
|
|
307 | 307 |
/* filter on gateway interface identifier */ |
308 | 308 |
switch (gateActiveInterface) |
309 | 309 |
{ |
... | ... | |
322 | 322 |
case GATE_IF_NET: |
323 | 323 |
result = BOOT_COM_NET_TX_MAX_DATA; |
324 | 324 |
break; |
325 |
|
|
325 |
|
|
326 | 326 |
default: |
327 | 327 |
result = BOOT_COM_TX_MAX_DATA; |
328 | 328 |
break; |
329 | 329 |
} |
330 |
|
|
330 |
|
|
331 | 331 |
return result; |
332 | 332 |
} /*** end of GateGetActiveInterfaceMaxTxLen ***/ |
333 | 333 |
|
... | ... | |
358 | 358 |
** \return none. |
359 | 359 |
** |
360 | 360 |
****************************************************************************************/ |
361 |
void GateTransmitPacketDirect(blt_int8u *data, blt_int8u len, blt_int8u deviceID) {
|
|
361 |
void GateTransmitPacketDirect(blt_int8u *data, blt_int8u len, blt_int32u deviceID) {
|
|
362 | 362 |
forwarded = BLT_TRUE; |
363 | 363 |
CanTransmitPacket(data, len, deviceID); |
364 | 364 |
XcpPacketTransmitted(); |
Also available in: Unified diff