#include "config.h"
#endif
-#include "interface.h"
+#include <jtag/interface.h>
#include <jtag/commands.h>
#include "usb_common.h"
static void usbprog_runtest(int num_cycles);
static void usbprog_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size);
-#define UNKOWN_COMMAND 0x00
+#define UNKNOWN_COMMAND 0x00
#define PORT_DIRECTION 0x01
#define PORT_SET 0x02
#define PORT_GET 0x03
usbprog_end_state(cmd->cmd.runtest->end_state);
usbprog_runtest(cmd->cmd.runtest->num_cycles);
break;
- case JTAG_STATEMOVE:
+ case JTAG_TLR_RESET:
#ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
#endif
static void usbprog_state_move(void)
{
- int i = 0, tms = 0;
uint8_t tms_scan = tap_get_tms_path(tap_get_state(), tap_get_end_state());
- int tms_count = tap_get_tms_path_len(tap_get_state(), tap_get_end_state());
usbprog_jtag_write_tms(usbprog_jtag_handle, (char)tms_scan);
- for (i = 0; i < tms_count; i++)
- {
- tms = (tms_scan >> i) & 1;
- }
tap_set_state(tap_get_end_state());
}
usbprog_jtag_tms_send(usbprog_jtag_handle);
- void (*f)(struct usbprog_jtag *usbprog_jtag, char * buffer, int size);
+ void (*f)(struct usbprog_jtag *usbprog_jtag, char * buffer_local, int size);
switch (type) {
case SCAN_OUT: f = &usbprog_jtag_write_tdi; break;
case SCAN_IN: f = &usbprog_jtag_read_tdo; break;
tmp[0] = WRITE_AND_READ;
tmp[1] = (char)(send_bits >> 8); /* high */
tmp[2] = (char)(send_bits); /* low */
- i = 0;
for (i = 0; i < loops; i++)
{
tmp[0] = WRITE_TDI;
tmp[1] = (char)(send_bits >> 8); /* high */
tmp[2] = (char)(send_bits); /* low */
- i = 0;
for (i = 0; i < loops; i++)
{
}
struct jtag_interface usbprog_interface = {
- .name = "usbprog",
- .execute_queue = &usbprog_execute_queue,
- .speed = &usbprog_speed,
- .init = &usbprog_init,
- .quit = &usbprog_quit
- };
+ .name = "usbprog",
+
+ .execute_queue = usbprog_execute_queue,
+ .speed = usbprog_speed,
+ .init = usbprog_init,
+ .quit = usbprog_quit
+};