2011-12-21 16:03:11 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2011 by Mathias Kuester *
|
|
|
|
* Mathias Kuester <kesmtp@freenet.de> *
|
|
|
|
* *
|
2012-10-24 14:07:11 +00:00
|
|
|
* Copyright (C) 2012 by Spencer Oliver *
|
|
|
|
* spen@spen-soft.co.uk *
|
|
|
|
* *
|
2011-12-21 16:03:11 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
2016-05-16 20:41:00 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
2011-12-21 16:03:11 +00:00
|
|
|
***************************************************************************/
|
2012-02-02 15:08:51 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#ifndef OPENOCD_JTAG_HLA_HLA_INTERFACE_H
|
|
|
|
#define OPENOCD_JTAG_HLA_HLA_INTERFACE_H
|
2011-12-21 16:03:11 +00:00
|
|
|
|
|
|
|
/** */
|
|
|
|
struct target;
|
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
enum e_hl_transports;
|
2012-01-25 08:30:45 +00:00
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
extern const char *hl_transports[];
|
2011-12-21 16:03:11 +00:00
|
|
|
|
2017-01-26 20:41:40 +00:00
|
|
|
#define HLA_MAX_USB_IDS 8
|
|
|
|
|
2012-10-24 14:07:11 +00:00
|
|
|
struct hl_interface_param_s {
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
2014-09-11 21:09:36 +00:00
|
|
|
const char *device_desc;
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
2014-09-11 21:09:36 +00:00
|
|
|
const char *serial;
|
2017-01-26 20:41:40 +00:00
|
|
|
/** List of recognised VIDs */
|
|
|
|
uint16_t vid[HLA_MAX_USB_IDS + 1];
|
|
|
|
/** List of recognised PIDs */
|
|
|
|
uint16_t pid[HLA_MAX_USB_IDS + 1];
|
2012-01-25 08:30:45 +00:00
|
|
|
/** */
|
2012-05-04 13:31:25 +00:00
|
|
|
unsigned api;
|
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
enum hl_transports transport;
|
2012-11-01 11:19:29 +00:00
|
|
|
/** */
|
2013-04-11 10:15:32 +00:00
|
|
|
bool connect_under_reset;
|
2014-10-09 18:48:56 +00:00
|
|
|
/** Initial interface clock clock speed */
|
|
|
|
int initial_interface_speed;
|
2011-12-21 16:03:11 +00:00
|
|
|
};
|
|
|
|
|
2012-10-24 14:07:11 +00:00
|
|
|
struct hl_interface_s {
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
struct hl_interface_param_s param;
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
const struct hl_layout *layout;
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
2013-10-24 12:11:33 +00:00
|
|
|
void *handle;
|
2011-12-21 16:03:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/** */
|
2012-10-24 14:07:11 +00:00
|
|
|
int hl_interface_open(enum hl_transports tr);
|
2011-12-21 16:03:11 +00:00
|
|
|
/** */
|
|
|
|
|
2012-10-24 14:07:11 +00:00
|
|
|
int hl_interface_init_target(struct target *t);
|
|
|
|
int hl_interface_init_reset(void);
|
2013-09-28 10:23:15 +00:00
|
|
|
int hl_interface_override_target(const char **targetname);
|
2012-10-24 14:07:11 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#endif /* OPENOCD_JTAG_HLA_HLA_INTERFACE_H */
|