amiro-blt / Host / Source / SerialBoot / port / xcptransport.h @ 69661903
History | View | Annotate | Download (2.77 KB)
1 |
/************************************************************************************//** |
---|---|
2 |
* \file port\xcptransport.h
|
3 |
* \brief XCP transport layer interface header file.
|
4 |
* \ingroup SerialBoot
|
5 |
* \internal
|
6 |
*----------------------------------------------------------------------------------------
|
7 |
* C O P Y R I G H T
|
8 |
*----------------------------------------------------------------------------------------
|
9 |
* Copyright (c) 2014 by Feaser http://www.feaser.com All rights reserved
|
10 |
*
|
11 |
*----------------------------------------------------------------------------------------
|
12 |
* L I C E N S E
|
13 |
*----------------------------------------------------------------------------------------
|
14 |
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
|
15 |
* modify it under the terms of the GNU General Public License as published by the Free
|
16 |
* Software Foundation, either version 3 of the License, or (at your option) any later
|
17 |
* version.
|
18 |
*
|
19 |
* OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
20 |
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
21 |
* PURPOSE. See the GNU General Public License for more details.
|
22 |
*
|
23 |
* You should have received a copy of the GNU General Public License along with OpenBLT.
|
24 |
* If not, see <http://www.gnu.org/licenses/>.
|
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
|
28 |
* proprietary components. The exception text is included at the bottom of the license
|
29 |
* file <license.html>.
|
30 |
*
|
31 |
* \endinternal
|
32 |
****************************************************************************************/
|
33 |
#ifndef XCPTRANSPORT_H
|
34 |
#define XCPTRANSPORT_H
|
35 |
|
36 |
/****************************************************************************************
|
37 |
* Type definitions
|
38 |
****************************************************************************************/
|
39 |
typedef struct |
40 |
{ |
41 |
sb_uint8 data[XCP_MASTER_RX_MAX_DATA]; |
42 |
sb_uint8 len; |
43 |
} tXcpTransportResponsePacket; |
44 |
|
45 |
|
46 |
/****************************************************************************************
|
47 |
* EFunction prototypes
|
48 |
****************************************************************************************/
|
49 |
sb_uint8 XcpTransportInit(sb_char *device, sb_uint32 baudrate, sb_uint8 comIsUart); |
50 |
sb_uint8 XcpTransportSetRtsDtr(sb_char *device); |
51 |
sb_uint8 XcpTransportSendPacket(sb_uint8 *data, sb_uint8 len, sb_uint16 timeOutMs); |
52 |
tXcpTransportResponsePacket *XcpTransportReadResponsePacket(void);
|
53 |
void XcpTransportClose(void); |
54 |
|
55 |
|
56 |
#endif /* XCPTRANSPORT_H */ |
57 |
/*********************************** end of xcptransport.h *****************************/
|