amiro-blt / Host / Source / SerialBoot / xcpmaster.h @ f7d2c786
History | View | Annotate | Download (3.557 KB)
1 | 69661903 | Thomas Schöpping | /************************************************************************************//** |
---|---|---|---|
2 | * \file xcpmaster.h
|
||
3 | * \brief XCP Master 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 | d54d2f07 | Thomas Schöpping | * 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 | 69661903 | Thomas Schöpping | * proprietary components. The exception text is included at the bottom of the license
|
29 | * file <license.html>.
|
||
30 | d54d2f07 | Thomas Schöpping | *
|
31 | 69661903 | Thomas Schöpping | * \endinternal
|
32 | ****************************************************************************************/
|
||
33 | #ifndef XCPMASTER_H
|
||
34 | #define XCPMASTER_H
|
||
35 | |||
36 | /****************************************************************************************
|
||
37 | * Macro definitions
|
||
38 | ****************************************************************************************/
|
||
39 | /** \brief Configure number of bytes in the master->slave data packet. Should be at least
|
||
40 | * equal or larger than that configured on the slave.
|
||
41 | */
|
||
42 | #define XCP_MASTER_TX_MAX_DATA (255) |
||
43 | |||
44 | /** \brief Configure number of bytes in the slave->master data packet. Should be at least
|
||
45 | * equal or larger than that configured on the slave.
|
||
46 | */
|
||
47 | #define XCP_MASTER_RX_MAX_DATA (255) |
||
48 | |||
49 | |||
50 | /****************************************************************************************
|
||
51 | * Include files
|
||
52 | ****************************************************************************************/
|
||
53 | #include "xcptransport.h" /* XCP transport layer */ |
||
54 | |||
55 | |||
56 | /****************************************************************************************
|
||
57 | * Function prototypes
|
||
58 | ****************************************************************************************/
|
||
59 | sb_uint8 XcpMasterInit(sb_char *device, sb_uint32 baudrate, sb_uint8 comIsUart); |
||
60 | void XcpMasterDeinit(void); |
||
61 | d54d2f07 | Thomas Schöpping | sb_uint8 XcpMasterConnect(sb_uint32 flashingTargetID); |
62 | 69661903 | Thomas Schöpping | sb_uint8 XcpMasterDisconnect(void);
|
63 | sb_uint8 XcpMasterProgramReset(void);
|
||
64 | sb_uint8 XcpMasterStartProgrammingSession(void);
|
||
65 | sb_uint8 XcpMasterStopProgrammingSession(void);
|
||
66 | sb_uint8 XcpMasterClearMemory(sb_uint32 addr, sb_uint32 len); |
||
67 | sb_uint8 XcpMasterReadData(sb_uint32 addr, sb_uint32 len, sb_uint8 data[]); |
||
68 | sb_uint8 XcpMasterProgramData(sb_uint32 addr, sb_uint32 len, sb_uint8 data[]); |
||
69 | |||
70 | |||
71 | #endif /* XCPMASTER_H */ |
||
72 | /*********************************** end of xcpmaster.h ********************************/
|