static uint16_t ft2232_vid[MAX_USB_IDS + 1] = { 0x0403, 0 };
static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0x6010, 0 };
static uint16_t ft2232_vid[MAX_USB_IDS + 1] = { 0x0403, 0 };
static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0x6010, 0 };
{
{ "usbjtag", usbjtag_init, usbjtag_reset, NULL },
{ "jtagkey", jtagkey_init, jtagkey_reset, NULL },
{
{ "usbjtag", usbjtag_init, usbjtag_reset, NULL },
{ "jtagkey", jtagkey_init, jtagkey_reset, NULL },
static uint8_t nTRST, nTRSTnOE, nSRST, nSRSTnOE;
static uint8_t nTRST, nTRSTnOE, nSRST, nSRSTnOE;
static uint8_t low_output = 0x0;
static uint8_t low_direction = 0x0;
static uint8_t high_output = 0x0;
static uint8_t low_output = 0x0;
static uint8_t low_direction = 0x0;
static uint8_t high_output = 0x0;
ft2232_read_scan(type, buffer, scan_size);
if (jtag_read_buffer(buffer, cmd->cmd.scan) != ERROR_OK)
retval = ERROR_JTAG_QUEUE_FAILED;
ft2232_read_scan(type, buffer, scan_size);
if (jtag_read_buffer(buffer, cmd->cmd.scan) != ERROR_OK)
retval = ERROR_JTAG_QUEUE_FAILED;
-static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t* buffer, int scan_size)
+static int ft2232_large_scan(struct scan_command* cmd, enum scan_type type, uint8_t* buffer, int scan_size)
LOG_DEBUG("trst: %i, srst: %i, high_output: 0x%2.2x, high_direction: 0x%2.2x", trst, srst, high_output, high_direction);
}
LOG_DEBUG("trst: %i, srst: %i, high_output: 0x%2.2x, high_direction: 0x%2.2x", trst, srst, high_output, high_direction);
}
if (ft2232_buffer_size + predicted_size + 1 > FT2232_BUFFER_SIZE)
{
if (ft2232_send_and_recv(first_unsent, cmd) != ERROR_OK)
if (ft2232_buffer_size + predicted_size + 1 > FT2232_BUFFER_SIZE)
{
if (ft2232_send_and_recv(first_unsent, cmd) != ERROR_OK)
if (ft2232_send_and_recv(first_unsent, cmd) != ERROR_OK)
retval = ERROR_JTAG_QUEUE_FAILED;
first_unsent = cmd->next;
jtag_sleep(cmd->cmd.sleep->us);
if (ft2232_send_and_recv(first_unsent, cmd) != ERROR_OK)
retval = ERROR_JTAG_QUEUE_FAILED;
first_unsent = cmd->next;
jtag_sleep(cmd->cmd.sleep->us);
cp = strchr(ft2232_device_desc, 0);
/* under Win32, the FTD2XX driver appends an "A" to the end
* of the description, this examines the given desc
cp = strchr(ft2232_device_desc, 0);
/* under Win32, the FTD2XX driver appends an "A" to the end
* of the description, this examines the given desc
- ft2232_layout = malloc(strlen(args[0]) + 1);
- strcpy(ft2232_layout, args[0]);
+ ft2232_layout = malloc(strlen(CMD_ARGV[0]) + 1);
+ strcpy(ft2232_layout, CMD_ARGV[0]);
{
LOG_WARNING("ignoring extra IDs in ft2232_vid_pid "
"(maximum is %d pairs)", MAX_USB_IDS);
{
LOG_WARNING("ignoring extra IDs in ft2232_vid_pid "
"(maximum is %d pairs)", MAX_USB_IDS);
- COMMAND_PARSE_NUMBER(u16, args[i], ft2232_vid[i >> 1]);
- COMMAND_PARSE_NUMBER(u16, args[i + 1], ft2232_pid[i >> 1]);
+ COMMAND_PARSE_NUMBER(u16, CMD_ARGV[i], ft2232_vid[i >> 1]);
+ COMMAND_PARSE_NUMBER(u16, CMD_ARGV[i + 1], ft2232_pid[i >> 1]);
- register_command(cmd_ctx, NULL, "ft2232_device_desc",
+ COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_device_desc",
ft2232_handle_device_desc_command, COMMAND_CONFIG,
"the USB device description of the FTDI FT2232 device");
ft2232_handle_device_desc_command, COMMAND_CONFIG,
"the USB device description of the FTDI FT2232 device");
- register_command(cmd_ctx, NULL, "ft2232_serial",
+ COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_serial",
ft2232_handle_serial_command, COMMAND_CONFIG,
"the serial number of the FTDI FT2232 device");
ft2232_handle_serial_command, COMMAND_CONFIG,
"the serial number of the FTDI FT2232 device");
- register_command(cmd_ctx, NULL, "ft2232_layout",
+ COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_layout",
ft2232_handle_layout_command, COMMAND_CONFIG,
"the layout of the FT2232 GPIO signals used "
"to control output-enables and reset signals");
ft2232_handle_layout_command, COMMAND_CONFIG,
"the layout of the FT2232 GPIO signals used "
"to control output-enables and reset signals");
- register_command(cmd_ctx, NULL, "ft2232_vid_pid",
+ COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_vid_pid",
ft2232_handle_vid_pid_command, COMMAND_CONFIG,
"the vendor ID and product ID of the FTDI FT2232 device");
ft2232_handle_vid_pid_command, COMMAND_CONFIG,
"the vendor ID and product ID of the FTDI FT2232 device");
- register_command(cmd_ctx, NULL, "ft2232_latency",
+ COMMAND_REGISTER(cmd_ctx, NULL, "ft2232_latency",
ft2232_handle_latency_command, COMMAND_CONFIG,
"set the FT2232 latency timer to a new value");
ft2232_handle_latency_command, COMMAND_CONFIG,
"set the FT2232 latency timer to a new value");