/***************************************************************************
- * Copyright (C) 2007 by Benedikt Sauter sauter@ixbat.de *
- * based on Dominic Rath's amt_jtagaccel.c *
- * *
- * usbprog is a free programming adapter. You can easily install *
- * different firmware versions from an "online pool" over USB. *
- * The adapter can be used for programming and debugging AVR and ARM *
- * processors, as USB to RS232 converter, as JTAG interface or as *
- * simple I/O interface (5 lines). *
- * *
- * http://www.embedded-projects.net/usbprog *
+ * Copyright (C) 2007 by Benedikt Sauter *
+ * sauter@ixbat.de *
* *
* 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 *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+
+/*
+ * This file is based on Dominic Rath's amt_jtagaccel.c.
+ *
+ * usbprog is a free programming adapter. You can easily install
+ * different firmware versions from an "online pool" over USB.
+ * The adapter can be used for programming and debugging AVR and ARM
+ * processors, as USB to RS232 converter, as JTAG interface or as
+ * simple I/O interface (5 lines).
+ *
+ * http://www.embedded-projects.net/usbprog
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
{
if (tap_transitions[cur_state].low == cmd->path[state_count])
{
- //INFO("1");
+ /* INFO("1"); */
usbprog_write(0, 0, 0);
usbprog_write(1, 0, 0);
}
else if (tap_transitions[cur_state].high == cmd->path[state_count])
{
- //INFO("2");
+ /* INFO("2"); */
usbprog_write(0, 1, 0);
usbprog_write(1, 1, 0);
}
else
{
usbprog_jtag_tms_send(usbprog_jtag_handle);
- //INFO("NUM CYCLES %i",num_cycles);
+ /* INFO("NUM CYCLES %i",num_cycles); */
}
for (i = 0; i < num_cycles; i++)
else
usbprog_end_state(TAP_SD);
- //usbprog_jtag_tms_send(usbprog_jtag_handle);
+ /* usbprog_jtag_tms_send(usbprog_jtag_handle); */
usbprog_state_move();
usbprog_end_state(saved_end_state);
return 1;
if (res == msglen)
{
- //INFO("HALLLLOOO %i",(int)msg[0]);
+ /* INFO("HALLLLOOO %i",(int)msg[0]); */
res = usb_bulk_read(usbprog_jtag->usb_handle, 0x82, msg, 2, 100);
if (res > 0)
return (unsigned char)msg[1];
if (usb_bulk_write(usbprog_jtag->usb_handle, 3, tmp, 64, 1000) == 64)
{
- //INFO("HALLLLOOO2 %i",(int)tmp[0]);
+ /* INFO("HALLLLOOO2 %i",(int)tmp[0]); */
usleep(1);
int timeout = 0;
while (usb_bulk_read(usbprog_jtag->usb_handle, 0x82, tmp, 64, 1000) < 1)
usb_bulk_write(usbprog_jtag->usb_handle, 3, tmp, 3, 1000);
- //INFO("HALLLLOOO3 %i",(int)tmp[0]);
+ /* INFO("HALLLLOOO3 %i",(int)tmp[0]); */
int timeout = 0;
usleep(1);
while (usb_bulk_read(usbprog_jtag->usb_handle, 0x82, tmp, 64, 10) < 1)
{
send_bits = size;
loops = size/8;
- //if(loops==0)
+ /* if(loops==0) */
loops++;
size = 0;
}
void usbprog_jtag_tms_send(struct usbprog_jtag *usbprog_jtag)
{
int i;
- //INFO("TMS SEND");
+ /* INFO("TMS SEND"); */
if (tms_chain_index > 0)
{
char tmp[tms_chain_index + 2];