3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 /*****************************************************************************
26 * Description: This header file contains the function prototype to the
27 * primary interface function for the XSVF player.
28 * Usage: FIRST - PORTS.C
29 * Customize the ports.c function implementations to establish
30 * the correct protocol for communicating with your JTAG ports
31 * (setPort() and readTDOBit()) and tune the waitTime() delay
32 * function. Also, establish access to the XSVF data source
33 * in the readByte() function.
34 * FINALLY - Call xsvfExecute().
35 *****************************************************************************/
39 /* Legacy error codes for xsvfExecute from original XSVF player v2.0 */
40 #define XSVF_LEGACY_SUCCESS 1
41 #define XSVF_LEGACY_ERROR 0
43 /* 4.04 [NEW] Error codes for xsvfExecute. */
44 /* Must #define XSVF_SUPPORT_ERRORCODES in micro.c to get these codes */
45 #define XSVF_ERROR_NONE 0
46 #define XSVF_ERROR_UNKNOWN 1
47 #define XSVF_ERROR_TDOMISMATCH 2
48 #define XSVF_ERROR_MAXRETRIES 3 /* TDO mismatch after max retries */
49 #define XSVF_ERROR_ILLEGALCMD 4
50 #define XSVF_ERROR_ILLEGALSTATE 5
51 #define XSVF_ERROR_DATAOVERFLOW 6 /* Data > lenVal MAX_LEN buffer size*/
52 /* Insert new errors here */
53 #define XSVF_ERROR_LAST 7
55 /*****************************************************************************
56 * Function: xsvfExecute
57 * Description: Process, interpret, and apply the XSVF commands.
58 * See port.c:readByte for source of XSVF data.
60 * Returns: int - For error codes see above.
61 *****************************************************************************/
62 int xsvfExecute(void);
64 #endif /* XSVF_MICRO_H */