* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#undef DEBUG_SERIAL
/*#define DEBUG_SERIAL */
static int buspirate_execute_queue(void);
-static int buspirate_speed(int speed);
-static int buspirate_khz(int khz, int *jtag_speed);
static int buspirate_init(void);
static int buspirate_quit(void);
static void buspirate_serial_close(int fd);
static void buspirate_print_buffer(char *buf, int size);
-static int buspirate_speed(int speed)
-{
- /* TODO */
- LOG_INFO("Want to set speed to %dkHz, but not implemented yet", speed);
- return ERROR_OK;
-}
-
-static int buspirate_khz(int khz, int *jtag_speed)
-{
- *jtag_speed = khz;
- return ERROR_OK;
-}
-
static int buspirate_execute_queue(void)
{
/* currently processed command */
struct jtag_interface buspirate_interface = {
.name = "buspirate",
.execute_queue = buspirate_execute_queue,
- .speed = buspirate_speed,
- .khz = buspirate_khz,
.commands = buspirate_command_handlers,
.init = buspirate_init,
.quit = buspirate_quit
saved_end_state = tap_get_end_state();
buspirate_end_state(ir_scan ? TAP_IRSHIFT : TAP_DRSHIFT);
- buspirate_state_move();
+
+ /* Only move if we're not already there */
+ if (tap_get_state() != tap_get_end_state())
+ buspirate_state_move();
buspirate_tap_append_scan(scan_size, buffer, command);