OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | osbdm |
struct | queue |
struct | sequence |
Macros | |
#define | OSBDM_CMD_INIT 0x11 |
#define | OSBDM_CMD_SPECIAL 0x27 |
#define | OSBDM_CMD_SPECIAL_SRST 0x01 |
#define | OSBDM_CMD_SPECIAL_SWAP 0x05 |
#define | OSBDM_SWAP_MAX (((OSBDM_USB_BUFSIZE - 6) / 5) * 16) |
#define | OSBDM_USB_BUFSIZE 64 |
#define | OSBDM_USB_EP_READ 0x82 |
#define | OSBDM_USB_EP_WRITE 0x01 |
#define | OSBDM_USB_TIMEOUT 1000 |
Functions | |
static int | osbdm_add_pathmove (struct queue *queue, tap_state_t *path, int num_states) |
static int | osbdm_add_runtest (struct queue *queue, int num_cycles, tap_state_t end_state) |
static int | osbdm_add_scan (struct queue *queue, struct scan_field *fields, int num_fields, tap_state_t end_state, bool ir_scan) |
static int | osbdm_add_stableclocks (struct queue *queue, int count) |
static int | osbdm_add_statemove (struct queue *queue, tap_state_t new_state, int skip_first) |
static int | osbdm_add_tms (struct queue *queue, const uint8_t *tms, int num_bits) |
static int | osbdm_execute_command (struct osbdm *osbdm, struct queue *queue, struct jtag_command *cmd) |
static int | osbdm_execute_queue (void) |
static int | osbdm_flush (struct osbdm *osbdm, struct queue *queue) |
static int | osbdm_init (void) |
static int | osbdm_open (struct osbdm *osbdm) |
static int | osbdm_quit (void) |
static int | osbdm_send_and_recv (struct osbdm *osbdm) |
static int | osbdm_srst (struct osbdm *osbdm, int srst) |
static int | osbdm_swap (struct osbdm *osbdm, void *tms, void *tdi, void *tdo, int length) |
static struct sequence * | queue_add_tail (struct queue *queue, int len) |
static struct queue * | queue_alloc (void) |
static void | queue_drop_head (struct queue *queue) |
static void | queue_free (struct queue *queue) |
Variables | |
struct adapter_driver | osbdm_adapter_driver |
static struct osbdm | osbdm_context |
static struct jtag_interface | osbdm_interface |
static const uint16_t | osbdm_pid [] = { 0x0042, 0x0058, 0x005e, 0 } |
static const uint16_t | osbdm_vid [] = { 0x15a2, 0x15a2, 0x15a2, 0 } |
#define OSBDM_SWAP_MAX (((OSBDM_USB_BUFSIZE - 6) / 5) * 16) |
|
static |
Definition at line 381 of file osbdm.c.
References buf_set_u32(), ERROR_FAIL, ERROR_OK, LOG_ERROR, sequence::next, queue_add_tail(), tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), tap_state_transition(), and sequence::tms.
Referenced by osbdm_execute_command().
|
static |
Definition at line 537 of file osbdm.c.
References ERROR_FAIL, ERROR_OK, osbdm_add_stableclocks(), osbdm_add_statemove(), and TAP_IDLE.
Referenced by osbdm_execute_command().
|
static |
Definition at line 489 of file osbdm.c.
References buf_set_u32(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, scan_field::in_value, sequence::len, LOG_ERROR, sequence::next, osbdm_add_statemove(), scan_field::out_value, queue_add_tail(), queue::tail, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRSHIFT, tap_set_end_state(), sequence::tdi, sequence::tdo, and sequence::tms.
Referenced by osbdm_execute_command().
|
static |
Definition at line 452 of file osbdm.c.
References count, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, LOG_ERROR, sequence::next, queue_add_tail(), tap_get_state(), tap_is_state_stable(), TAP_RESET, tap_state_name(), and sequence::tms.
Referenced by osbdm_add_runtest(), and osbdm_execute_command().
|
static |
Definition at line 416 of file osbdm.c.
References buf_set_u32(), ERROR_FAIL, ERROR_OK, sequence::len, LOG_ERROR, sequence::next, queue_add_tail(), tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), TAP_RESET, tap_set_end_state(), tap_set_state, and sequence::tms.
Referenced by osbdm_add_runtest(), osbdm_add_scan(), and osbdm_execute_command().
|
static |
Definition at line 474 of file osbdm.c.
References buf_set_buf(), ERROR_FAIL, ERROR_OK, LOG_ERROR, sequence::next, queue_add_tail(), and sequence::tms.
Referenced by osbdm_execute_command().
|
static |
Definition at line 554 of file osbdm.c.
References cmd, ERROR_FAIL, ERROR_OK, JTAG_PATHMOVE, JTAG_RESET, JTAG_RUNTEST, JTAG_SCAN, JTAG_SLEEP, jtag_sleep(), JTAG_STABLECLOCKS, JTAG_TLR_RESET, JTAG_TMS, LOG_ERROR, osbdm_add_pathmove(), osbdm_add_runtest(), osbdm_add_scan(), osbdm_add_stableclocks(), osbdm_add_statemove(), osbdm_add_tms(), osbdm_flush(), and osbdm_srst().
Referenced by osbdm_execute_queue().
|
static |
Definition at line 631 of file osbdm.c.
References cmd, ERROR_FAIL, ERROR_OK, jtag_command_queue, LOG_ERROR, osbdm_context, osbdm_execute_command(), osbdm_flush(), queue_alloc(), and queue_free().
Definition at line 289 of file osbdm.c.
References buf_set_buf(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, queue::head, sequence::len, sequence::next, osbdm_swap(), OSBDM_SWAP_MAX, queue_drop_head(), sequence::tdi, sequence::tdo, and sequence::tms.
Referenced by osbdm_execute_command(), and osbdm_execute_queue().
|
static |
Definition at line 363 of file osbdm.c.
References osbdm::devh, ERROR_FAIL, ERROR_OK, jtag_libusb_open(), NULL, osbdm_pid, and osbdm_vid.
|
static |
Definition at line 375 of file osbdm.c.
References osbdm::devh, ERROR_OK, jtag_libusb_close(), and osbdm_context.
|
static |
Definition at line 133 of file osbdm.c.
References osbdm::buffer, osbdm::count, count, osbdm::devh, ERROR_FAIL, ERROR_OK, jtag_libusb_bulk_read(), jtag_libusb_bulk_write(), LOG_ERROR, OSBDM_USB_BUFSIZE, OSBDM_USB_EP_READ, OSBDM_USB_EP_WRITE, and OSBDM_USB_TIMEOUT.
Referenced by osbdm_srst(), and osbdm_swap().
|
static |
Definition at line 178 of file osbdm.c.
References osbdm::buffer, osbdm::count, ERROR_FAIL, ERROR_OK, OSBDM_CMD_SPECIAL, OSBDM_CMD_SPECIAL_SRST, osbdm_send_and_recv(), and OSBDM_USB_BUFSIZE.
Referenced by osbdm_execute_command().
|
static |
Definition at line 201 of file osbdm.c.
References buf_get_u32(), buf_set_u32(), osbdm::buffer, buffer, osbdm::count, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, length, LOG_ERROR, OSBDM_CMD_SPECIAL, OSBDM_CMD_SPECIAL_SWAP, osbdm_send_and_recv(), OSBDM_SWAP_MAX, and OSBDM_USB_BUFSIZE.
Referenced by osbdm_flush().
Definition at line 30 of file osbdm.c.
References DIV_ROUND_UP, queue::head, sequence::len, LOG_ERROR, sequence::next, NULL, queue::tail, sequence::tdi, sequence::tdo, and sequence::tms.
Referenced by osbdm_add_pathmove(), osbdm_add_scan(), osbdm_add_stableclocks(), osbdm_add_statemove(), and osbdm_add_tms().
|
static |
Definition at line 86 of file osbdm.c.
References queue::head, LOG_ERROR, and NULL.
Referenced by osbdm_execute_queue().
|
static |
Definition at line 68 of file osbdm.c.
References queue::head, sequence::next, and sequence::tms.
Referenced by osbdm_flush(), and queue_free().
|
static |
Definition at line 76 of file osbdm.c.
References queue::head, and queue_drop_head().
Referenced by osbdm_execute_queue().
struct adapter_driver osbdm_adapter_driver |
|
static |
Definition at line 121 of file osbdm.c.
Referenced by osbdm_execute_queue(), and osbdm_quit().
|
static |
|
static |
Definition at line 121 of file osbdm.c.
Referenced by osbdm_open().
|
static |
Definition at line 120 of file osbdm.c.
Referenced by osbdm_open().