stlink: add stlink_api cmd
[fw/openocd] / src / jtag / stlink / stlink_interface.h
index 9b3f791ecce76fe00611463c5c632698739b4125..ee2fefff199e0aa435380d3379a596c781a89774 100644 (file)
  *   Free Software Foundation, Inc.,                                       *
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
+
 #ifndef _STLINK_INTERFACE_
 #define _STLINK_INTERFACE_
 
 /** */
 struct target;
 /** */
+enum e_stlink_transports;
+/** */
 extern const char *stlink_transports[];
 
 struct stlink_interface_param_s {
@@ -34,6 +37,10 @@ struct stlink_interface_param_s {
        uint16_t vid;
        /** */
        uint16_t pid;
+       /** */
+       unsigned api;
+       /** */
+       enum stlink_transports transport;
 };
 
 struct stlink_interface_s {
@@ -46,7 +53,7 @@ struct stlink_interface_s {
 };
 
 /** */
-int stlink_interface_open(void);
+int stlink_interface_open(enum stlink_transports tr);
 /** */
 int stlink_interface_init_target(struct target *t);