/* system includes */
-#ifndef _WIN32
-#include <sys/io.h>
-#else
+#ifdef _WIN32
#include "errno.h"
#endif /* _WIN32 */
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
+#else /* not PARPORT_USE_PPDEV */
+#ifndef _WIN32
+#include <sys/io.h>
+#endif
#endif
#if PARPORT_USE_GIVEIO == 1
#include "log.h"
/* configuration */
-unsigned long amt_jtagaccel_port;
+u16 amt_jtagaccel_port;
/* interface variables
*/
.execute_queue = amt_jtagaccel_execute_queue,
- .support_pathmove = 0,
-
.speed = amt_jtagaccel_speed,
.register_commands = amt_jtagaccel_register_commands,
.init = amt_jtagaccel_init,
int scan_size;
enum scan_type type;
u8 *buffer;
+ int retval;
+
+ /* return ERROR_OK, unless a jtag_read_buffer returns a failed check
+ * that wasn't handled by a caller-provided error handler
+ */
+ retval = ERROR_OK;
while (cmd)
{
type = jtag_scan_type(cmd->cmd.scan);
amt_jtagaccel_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
if (jtag_read_buffer(buffer, cmd->cmd.scan) != ERROR_OK)
- return ERROR_JTAG_QUEUE_FAILED;
+ retval = ERROR_JTAG_QUEUE_FAILED;
if (buffer)
free(buffer);
break;
cmd = cmd->next;
}
- return ERROR_OK;
+ return retval;
}
#if PARPORT_USE_GIVEIO == 1