]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/esd/common/xilinx_jtag/micro.h
* Patches by Xianghua Xiao, 15 Oct 2003:
[people/ms/u-boot.git] / board / esd / common / xilinx_jtag / micro.h
CommitLineData
42d1f039
WD
1/*
2 * (C) Copyright 2003
3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
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.
12 *
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.
17 *
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,
21 * MA 02111-1307 USA
22 */
23
24/*****************************************************************************
25 * File: micro.h
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 *****************************************************************************/
36#ifndef XSVF_MICRO_H
37#define XSVF_MICRO_H
38
39/* Legacy error codes for xsvfExecute from original XSVF player v2.0 */
40#define XSVF_LEGACY_SUCCESS 1
41#define XSVF_LEGACY_ERROR 0
42
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
54
55/*****************************************************************************
56 * Function: xsvfExecute
57 * Description: Process, interpret, and apply the XSVF commands.
58 * See port.c:readByte for source of XSVF data.
59 * Parameters: none.
60 * Returns: int - For error codes see above.
61 *****************************************************************************/
62int xsvfExecute(void);
63
64#endif /* XSVF_MICRO_H */