stlink: print version info
[openocd.git] / src / jtag / stlink / stlink_interface.h
blob1bb33d5be76f0e1e0df0f18608abcc6414efa39c
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 ***************************************************************************/
21 #ifndef _STLINK_INTERFACE_
22 #define _STLINK_INTERFACE_
24 /** */
25 struct target;
26 /** */
27 enum e_stlink_transports;
28 /** */
29 extern const char *stlink_transports[];
31 struct stlink_interface_param_s {
32 /** */
33 char *device_desc;
34 /** */
35 char *serial;
36 /** */
37 uint16_t vid;
38 /** */
39 uint16_t pid;
40 /** */
41 unsigned api;
42 /** */
43 enum stlink_transports transport;
46 struct stlink_interface_s {
47 /** */
48 struct stlink_interface_param_s param;
49 /** */
50 const struct stlink_layout *layout;
51 /** */
52 void *fd;
55 /** */
56 int stlink_interface_open(enum stlink_transports tr);
57 /** */
58 int stlink_interface_init_target(struct target *t);
59 int stlink_interface_init_reset(void);
61 #endif