2007-07-15 11:19:33 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 by Pavel Chromy *
|
|
|
|
* chromy@asix.cz *
|
|
|
|
* *
|
|
|
|
* 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/>. *
|
2007-07-15 11:19:33 +00:00
|
|
|
***************************************************************************/
|
2012-02-02 15:08:51 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#ifndef OPENOCD_JTAG_DRIVERS_BITQ_H
|
|
|
|
#define OPENOCD_JTAG_DRIVERS_BITQ_H
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-12-03 12:14:30 +00:00
|
|
|
#include <jtag/commands.h>
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-11-13 12:08:19 +00:00
|
|
|
struct bitq_interface {
|
2012-02-02 15:08:51 +00:00
|
|
|
/* function to enqueueing low level IO requests */
|
2007-07-15 11:19:33 +00:00
|
|
|
int (*out)(int tms, int tdi, int tdo_req);
|
|
|
|
int (*flush)(void);
|
|
|
|
|
|
|
|
int (*sleep)(unsigned long us);
|
|
|
|
int (*reset)(int trst, int srst);
|
|
|
|
|
|
|
|
/* delayed read of requested TDO data,
|
|
|
|
* the input shall be checked after call to any enqueuing function
|
|
|
|
*/
|
|
|
|
int (*in_rdy)(void);
|
|
|
|
int (*in)(void);
|
2009-11-13 12:08:19 +00:00
|
|
|
};
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-11-13 12:08:19 +00:00
|
|
|
extern struct bitq_interface *bitq_interface;
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-11-09 10:53:22 +00:00
|
|
|
int bitq_execute_queue(void);
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-11-09 10:53:22 +00:00
|
|
|
void bitq_cleanup(void);
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#endif /* OPENOCD_JTAG_DRIVERS_BITQ_H */
|