]> git.sur5r.net Git - openocd/blob - src/jtag/stlink/stlink_interface.h
ST-LINK USB initial release
[openocd] / src / jtag / stlink / stlink_interface.h
1 /***************************************************************************
2  *   Copyright (C) 2011 by Mathias Kuester                                 *
3  *   Mathias Kuester <kesmtp@freenet.de>                                   *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 #ifndef _STLINK_INTERFACE_
21 #define _STLINK_INTERFACE_
22
23 /** */
24 struct target;
25 /** */
26 extern const char *stlink_transports[];
27
28 struct stlink_interface_param_s {
29         /** */
30         char *device_desc;
31         /** */
32         char *serial;
33         /** */
34         uint16_t vid;
35         /** */
36         uint16_t pid;
37 };
38
39 struct stlink_interface_s {
40         /** */
41         struct stlink_interface_param_s param;
42         /** */
43         const struct stlink_layout *layout;
44         /** */
45         void *fd;
46 };
47
48 /** */
49 int stlink_interface_open(void);
50 /** */
51 int stlink_interface_init_target(struct target *t);
52
53 #endif