OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | opendous_jtag |
struct | opendous_probe |
struct | pending_scan_result |
Macros | |
#define | FUNC_READ_DATA 0x51 |
#define | FUNC_START_BOOTLOADER 30 |
#define | FUNC_WRITE_DATA 0x50 |
#define | JTAG_CMD_READ_CONFIG 0x7 |
#define | JTAG_CMD_READ_INPUT 0x3 |
#define | JTAG_CMD_SET_DELAY 0x5 |
#define | JTAG_CMD_SET_SRST 0x2 |
#define | JTAG_CMD_SET_SRST_TRST 0x6 |
#define | JTAG_CMD_SET_TRST 0x1 |
#define | JTAG_CMD_TAP_OUTPUT 0x0 |
#define | JTAG_CMD_TAP_OUTPUT_EMU 0x4 |
#define | MAX_PENDING_SCAN_RESULTS (OPENDOUS_MAX_INPUT_DATA) |
#define | OPENDOUS_IN_BUFFER_SIZE (OPENDOUS_USB_BUFFER_SIZE) |
#define | OPENDOUS_MAX_INPUT_DATA (OPENDOUS_MAX_TAP_TRANSMIT*4) |
#define | OPENDOUS_MAX_SPEED 66 |
#define | OPENDOUS_MAX_TAP_TRANSMIT ((opendous_probe->BUFFERSIZE)-10) |
#define | OPENDOUS_MAX_VIDS_PIDS 4 |
#define | OPENDOUS_OUT_BUFFER_SIZE (OPENDOUS_USB_BUFFER_SIZE) |
#define | OPENDOUS_READ_ENDPOINT (opendous_probe->READ_EP) |
#define | OPENDOUS_TAP_BUFFER_SIZE 65536 |
#define | OPENDOUS_USB_BUFFER_SIZE (opendous_probe->BUFFERSIZE) |
#define | OPENDOUS_USB_TIMEOUT 1000 |
#define | OPENDOUS_WRITE_ENDPOINT (opendous_probe->WRITE_EP) |
Functions | |
COMMAND_HANDLER (opendous_handle_opendous_hw_jtag_command) | |
COMMAND_HANDLER (opendous_handle_opendous_info_command) | |
COMMAND_HANDLER (opendous_handle_opendous_type_command) | |
static void | opendous_end_state (tap_state_t state) |
static int | opendous_execute_queue (struct jtag_command *cmd_queue) |
static int | opendous_get_status (void) |
static int | opendous_get_version_info (void) |
static int | opendous_init (void) |
static void | opendous_path_move (unsigned int num_states, tap_state_t *path) |
static int | opendous_quit (void) |
static void | opendous_reset (int trst, int srst) |
static void | opendous_runtest (unsigned int num_cycles) |
static void | opendous_scan (int ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, struct scan_command *command) |
static void | opendous_simple_command (uint8_t command, uint8_t _data) |
static void | opendous_state_move (void) |
static void | opendous_tap_append_scan (int length, uint8_t *buffer, struct scan_command *command) |
static void | opendous_tap_append_step (int tms, int tdi) |
static void | opendous_tap_ensure_space (int scans, int bits) |
static int | opendous_tap_execute (void) |
static void | opendous_tap_init (void) |
static void | opendous_usb_close (struct opendous_jtag *opendous_jtag) |
static int | opendous_usb_message (struct opendous_jtag *opendous_jtag, int out_length, int in_length) |
static struct opendous_jtag * | opendous_usb_open (void) |
static int | opendous_usb_read (struct opendous_jtag *opendous_jtag) |
static int | opendous_usb_write (struct opendous_jtag *opendous_jtag, int out_length) |
Variables | |
static int | last_tms |
struct adapter_driver | opendous_adapter_driver |
static const struct command_registration | opendous_command_handlers [] |
static unsigned int | opendous_hw_jtag_version = 1 |
static struct jtag_interface | opendous_interface |
static struct opendous_jtag * | opendous_jtag_handle |
static const struct opendous_probe * | opendous_probe |
static const struct opendous_probe | opendous_probes [] |
static char * | opendous_type |
static struct pending_scan_result * | pending_scan_results_buffer |
static int | pending_scan_results_length |
static int | tap_length |
static uint8_t | tdo_buffer [OPENDOUS_TAP_BUFFER_SIZE] |
static uint8_t | tms_buffer [OPENDOUS_TAP_BUFFER_SIZE] |
static uint8_t * | usb_in_buffer |
static uint8_t * | usb_out_buffer |
#define FUNC_READ_DATA 0x51 |
Definition at line 96 of file opendous.c.
#define FUNC_START_BOOTLOADER 30 |
Definition at line 94 of file opendous.c.
#define FUNC_WRITE_DATA 0x50 |
Definition at line 95 of file opendous.c.
#define JTAG_CMD_READ_CONFIG 0x7 |
Definition at line 91 of file opendous.c.
#define JTAG_CMD_READ_INPUT 0x3 |
Definition at line 87 of file opendous.c.
#define JTAG_CMD_SET_DELAY 0x5 |
Definition at line 89 of file opendous.c.
#define JTAG_CMD_SET_SRST 0x2 |
Definition at line 86 of file opendous.c.
#define JTAG_CMD_SET_SRST_TRST 0x6 |
Definition at line 90 of file opendous.c.
#define JTAG_CMD_SET_TRST 0x1 |
Definition at line 85 of file opendous.c.
#define JTAG_CMD_TAP_OUTPUT 0x0 |
Definition at line 84 of file opendous.c.
#define JTAG_CMD_TAP_OUTPUT_EMU 0x4 |
Definition at line 88 of file opendous.c.
#define MAX_PENDING_SCAN_RESULTS (OPENDOUS_MAX_INPUT_DATA) |
Definition at line 81 of file opendous.c.
#define OPENDOUS_IN_BUFFER_SIZE (OPENDOUS_USB_BUFFER_SIZE) |
Definition at line 55 of file opendous.c.
#define OPENDOUS_MAX_INPUT_DATA (OPENDOUS_MAX_TAP_TRANSMIT*4) |
Definition at line 66 of file opendous.c.
#define OPENDOUS_MAX_SPEED 66 |
Definition at line 64 of file opendous.c.
#define OPENDOUS_MAX_TAP_TRANSMIT ((opendous_probe->BUFFERSIZE)-10) |
Definition at line 65 of file opendous.c.
#define OPENDOUS_MAX_VIDS_PIDS 4 |
Definition at line 28 of file opendous.c.
#define OPENDOUS_OUT_BUFFER_SIZE (OPENDOUS_USB_BUFFER_SIZE) |
Definition at line 56 of file opendous.c.
#define OPENDOUS_READ_ENDPOINT (opendous_probe->READ_EP) |
Definition at line 48 of file opendous.c.
#define OPENDOUS_TAP_BUFFER_SIZE 65536 |
Definition at line 69 of file opendous.c.
#define OPENDOUS_USB_BUFFER_SIZE (opendous_probe->BUFFERSIZE) |
Definition at line 54 of file opendous.c.
#define OPENDOUS_USB_TIMEOUT 1000 |
Definition at line 52 of file opendous.c.
#define OPENDOUS_WRITE_ENDPOINT (opendous_probe->WRITE_EP) |
Definition at line 47 of file opendous.c.
COMMAND_HANDLER | ( | opendous_handle_opendous_hw_jtag_command | ) |
Definition at line 173 of file opendous.c.
References CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and opendous_hw_jtag_version.
COMMAND_HANDLER | ( | opendous_handle_opendous_info_command | ) |
Definition at line 163 of file opendous.c.
References ERROR_OK, opendous_get_status(), and opendous_get_version_info().
COMMAND_HANDLER | ( | opendous_handle_opendous_type_command | ) |
Definition at line 147 of file opendous.c.
References CMD_ARGC, CMD_ARGV, ERROR_OK, and opendous_type.
|
static |
Definition at line 396 of file opendous.c.
References LOG_ERROR, state, tap_is_state_stable(), and tap_set_end_state().
Referenced by opendous_execute_queue(), opendous_runtest(), and opendous_scan().
|
static |
Definition at line 241 of file opendous.c.
References buffer, cmd, jtag_build_buffer(), JTAG_PATHMOVE, JTAG_RESET, JTAG_RUNTEST, JTAG_SCAN, jtag_scan_type(), JTAG_SLEEP, jtag_sleep(), JTAG_TLR_RESET, LOG_DEBUG_IO, LOG_ERROR, opendous_end_state(), opendous_path_move(), opendous_reset(), opendous_runtest(), opendous_scan(), opendous_state_move(), opendous_tap_execute(), TAP_RESET, tap_set_state, and type.
|
static |
Definition at line 527 of file opendous.c.
References ERROR_OK.
Referenced by COMMAND_HANDLER(), and opendous_init().
|
static |
Definition at line 532 of file opendous.c.
References ERROR_OK.
Referenced by COMMAND_HANDLER(), and opendous_init().
|
static |
Definition at line 316 of file opendous.c.
References opendous_probe::BUFFERSIZE, ERROR_JTAG_INIT_FAILED, ERROR_OK, LOG_ERROR, LOG_INFO, LOG_WARNING, MAX_PENDING_SCAN_RESULTS, opendous_probe::name, opendous_get_status(), opendous_get_version_info(), opendous_jtag_handle, opendous_probes, opendous_reset(), opendous_tap_init(), opendous_type, opendous_usb_open(), pending_scan_results_buffer, usb_in_buffer, and usb_out_buffer.
|
static |
Definition at line 422 of file opendous.c.
References LOG_ERROR, opendous_tap_append_step(), tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), and tap_state_transition().
Referenced by opendous_execute_queue().
|
static |
Definition at line 374 of file opendous.c.
References ERROR_OK, NULL, opendous_jtag_handle, opendous_type, opendous_usb_close(), pending_scan_results_buffer, usb_in_buffer, and usb_out_buffer.
|
static |
Definition at line 489 of file opendous.c.
References JTAG_CMD_SET_SRST, JTAG_CMD_SET_SRST_TRST, JTAG_CMD_SET_TRST, LOG_DEBUG, and opendous_simple_command().
Referenced by opendous_execute_queue(), and opendous_init().
|
static |
Definition at line 441 of file opendous.c.
References opendous_end_state(), opendous_state_move(), opendous_tap_append_step(), tap_get_end_state(), tap_get_state(), and TAP_IDLE.
Referenced by opendous_execute_queue().
|
static |
Definition at line 461 of file opendous.c.
References buffer, opendous_end_state(), opendous_state_move(), opendous_tap_append_scan(), opendous_tap_append_step(), opendous_tap_ensure_space(), TAP_DRPAUSE, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRPAUSE, TAP_IRSHIFT, and tap_set_state.
Referenced by opendous_execute_queue().
|
static |
Definition at line 511 of file opendous.c.
References LOG_DEBUG_IO, LOG_ERROR, opendous_jtag_handle, opendous_usb_message(), and usb_out_buffer.
Referenced by opendous_reset().
|
static |
Definition at line 407 of file opendous.c.
References opendous_tap_append_step(), tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), and tap_set_state.
Referenced by opendous_execute_queue(), opendous_runtest(), and opendous_scan().
|
static |
Definition at line 582 of file opendous.c.
References pending_scan_result::buffer, buffer, pending_scan_result::command, pending_scan_result::first, pending_scan_result::length, length, LOG_DEBUG_IO, opendous_tap_append_step(), pending_scan_results_buffer, pending_scan_results_length, and tap_length.
Referenced by opendous_scan().
|
static |
Definition at line 561 of file opendous.c.
References bits, last_tms, LOG_ERROR, OPENDOUS_TAP_BUFFER_SIZE, opendous_tap_ensure_space(), tap_length, and tms_buffer.
Referenced by opendous_path_move(), opendous_runtest(), opendous_scan(), opendous_state_move(), and opendous_tap_append_scan().
|
static |
Definition at line 552 of file opendous.c.
References bits, MAX_PENDING_SCAN_RESULTS, OPENDOUS_TAP_BUFFER_SIZE, opendous_tap_execute(), pending_scan_results_length, and tap_length.
Referenced by opendous_scan(), and opendous_tap_append_step().
|
static |
Definition at line 601 of file opendous.c.
References buf_set_buf(), pending_scan_result::buffer, buffer, pending_scan_result::command, ERROR_JTAG_QUEUE_FAILED, ERROR_OK, pending_scan_result::first, JTAG_CMD_TAP_OUTPUT, jtag_read_buffer(), pending_scan_result::length, length, LOG_DEBUG, LOG_DEBUG_IO, LOG_ERROR, opendous_jtag_handle, OPENDOUS_MAX_TAP_TRANSMIT, opendous_tap_init(), opendous_usb_message(), pending_scan_results_buffer, pending_scan_results_length, tap_length, tdo_buffer, tms_buffer, usb_in_buffer, and usb_out_buffer.
Referenced by opendous_execute_queue(), and opendous_tap_ensure_space().
|
static |
Definition at line 546 of file opendous.c.
References pending_scan_results_length, and tap_length.
Referenced by opendous_init(), and opendous_tap_execute().
|
static |
Definition at line 705 of file opendous.c.
References jtag_libusb_close(), and opendous_jtag::usb_handle.
Referenced by opendous_quit().
|
static |
Definition at line 712 of file opendous.c.
References LOG_ERROR, opendous_usb_read(), and opendous_usb_write().
Referenced by opendous_simple_command(), and opendous_tap_execute().
|
static |
Definition at line 689 of file opendous.c.
References devh, ERROR_OK, jtag_libusb_open(), jtag_libusb_set_configuration(), NULL, opendous_probe::PID, opendous_jtag::usb_handle, and opendous_probe::VID.
Referenced by opendous_init().
|
static |
Definition at line 769 of file opendous.c.
References opendous_probe::CONTROL_TRANSFER, ERROR_OK, FUNC_READ_DATA, jtag_libusb_bulk_read(), jtag_libusb_control_transfer(), LOG_DEBUG, LOG_DEBUG_IO, OPENDOUS_IN_BUFFER_SIZE, OPENDOUS_READ_ENDPOINT, OPENDOUS_USB_TIMEOUT, opendous_jtag::usb_handle, and usb_in_buffer.
Referenced by opendous_usb_message().
|
static |
Definition at line 732 of file opendous.c.
References opendous_probe::CONTROL_TRANSFER, ERROR_OK, FUNC_WRITE_DATA, jtag_libusb_bulk_write(), jtag_libusb_control_transfer(), LOG_DEBUG, LOG_DEBUG_IO, LOG_ERROR, OPENDOUS_OUT_BUFFER_SIZE, OPENDOUS_USB_TIMEOUT, OPENDOUS_WRITE_ENDPOINT, opendous_jtag::usb_handle, and usb_out_buffer.
Referenced by opendous_usb_message().
|
static |
Definition at line 544 of file opendous.c.
Referenced by opendous_tap_append_step().
struct adapter_driver opendous_adapter_driver |
Definition at line 173 of file opendous.c.
|
static |
Definition at line 173 of file opendous.c.
|
static |
Definition at line 50 of file opendous.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 173 of file opendous.c.
|
static |
Definition at line 142 of file opendous.c.
Referenced by opendous_init(), opendous_quit(), opendous_simple_command(), and opendous_tap_execute().
|
static |
Definition at line 99 of file opendous.c.
|
static |
Definition at line 1 of file opendous.c.
Referenced by opendous_init().
|
static |
Definition at line 98 of file opendous.c.
Referenced by COMMAND_HANDLER(), opendous_init(), and opendous_quit().
|
static |
Definition at line 79 of file opendous.c.
Referenced by opendous_init(), opendous_quit(), opendous_tap_append_scan(), and opendous_tap_execute().
|
static |
Definition at line 78 of file opendous.c.
Referenced by opendous_tap_append_scan(), opendous_tap_ensure_space(), opendous_tap_execute(), and opendous_tap_init().
|
static |
Definition at line 540 of file opendous.c.
Referenced by opendous_tap_append_scan(), opendous_tap_append_step(), opendous_tap_ensure_space(), opendous_tap_execute(), and opendous_tap_init().
|
static |
Definition at line 542 of file opendous.c.
Referenced by opendous_tap_execute().
|
static |
Definition at line 541 of file opendous.c.
Referenced by opendous_tap_append_step(), and opendous_tap_execute().
|
static |
Definition at line 59 of file opendous.c.
Referenced by opendous_init(), opendous_quit(), opendous_tap_execute(), and opendous_usb_read().
|
static |
Definition at line 60 of file opendous.c.
Referenced by opendous_init(), opendous_quit(), opendous_simple_command(), opendous_tap_execute(), and opendous_usb_write().