OpenOCD
|
Go to the source code of this file.
Macros | |
#define | VERSALOON_RETRY_CNT 10 |
Functions | |
RESULT | versaloon_add_pending (uint8_t type, uint8_t cmd, uint16_t actual_szie, uint16_t want_pos, uint16_t want_size, uint8_t *buffer, uint8_t collect) |
RESULT | versaloon_add_want_pos (uint16_t offset, uint16_t size, uint8_t *buff) |
static RESULT | versaloon_delay_ms (uint16_t ms) |
static RESULT | versaloon_delay_us (uint16_t us) |
static RESULT | versaloon_fini (void) |
void | versaloon_free_want_pos (void) |
static RESULT | versaloon_get_target_voltage (uint16_t *voltage) |
static RESULT | versaloon_init (void) |
RESULT | versaloon_send_command (uint16_t out_len, uint16_t *inlen) |
void | versaloon_set_callback (versaloon_callback_t callback) |
void | versaloon_set_extra_data (void *p) |
void | versaloon_set_pending_id (uint32_t id) |
static RESULT | versaloon_set_target_voltage (uint16_t voltage) |
Variables | |
uint8_t * | versaloon_buf |
uint16_t | versaloon_buf_size |
static versaloon_callback_t | versaloon_callback |
uint8_t * | versaloon_cmd_buf |
static void * | versaloon_extra_data |
struct versaloon_interface_t | versaloon_interface |
struct versaloon_pending_t | versaloon_pending [VERSALOON_MAX_PENDING_NUMBER] |
static uint32_t | versaloon_pending_id |
uint16_t | versaloon_pending_idx |
struct libusb_device_handle * | versaloon_usb_device_handle |
static uint32_t | versaloon_usb_to = VERSALOON_TIMEOUT |
static struct versaloon_want_pos_t * | versaloon_want_pos |
#define VERSALOON_RETRY_CNT 10 |
Definition at line 224 of file versaloon.c.
RESULT versaloon_add_pending | ( | uint8_t | type, |
uint8_t | cmd, | ||
uint16_t | actual_szie, | ||
uint16_t | want_pos, | ||
uint16_t | want_size, | ||
uint8_t * | buffer, | ||
uint8_t | collect | ||
) |
Definition at line 153 of file versaloon.c.
References versaloon_pending_t::actual_data_size, buffer, versaloon_pending_t::callback, cmd, versaloon_pending_t::cmd, versaloon_pending_t::collect, versaloon_pending_t::data_buffer, ERRMSG_INVALID_INDEX, ERROR_FAIL, ERROR_OK, versaloon_pending_t::extra_data, versaloon_pending_t::id, LOG_BUG, NULL, versaloon_pending_t::pos, type, versaloon_pending_t::type, versaloon_callback, versaloon_extra_data, VERSALOON_MAX_PENDING_NUMBER, versaloon_pending, versaloon_pending_id, versaloon_pending_idx, versaloon_want_pos, versaloon_pending_t::want_data_pos, and versaloon_pending_t::want_data_size.
Referenced by usbtodelay_delay(), usbtoinfo_get_abilities(), usbtopoll_end(), usbtopoll_start(), and usbtoxxx_add_command().
RESULT versaloon_add_want_pos | ( | uint16_t | offset, |
uint16_t | size, | ||
uint8_t * | buff | ||
) |
Definition at line 126 of file versaloon.c.
References versaloon_want_pos_t::buff, ERRCODE_NOT_ENOUGH_MEMORY, ERRMSG_NOT_ENOUGH_MEMORY, ERROR_OK, LOG_ERROR, versaloon_want_pos_t::next, NULL, offset, versaloon_want_pos_t::offset, versaloon_want_pos_t::size, size, and versaloon_want_pos.
|
static |
Definition at line 337 of file versaloon.c.
References usbtodelay_delay().
|
static |
Definition at line 342 of file versaloon.c.
References usbtodelay_delay().
|
static |
Definition at line 283 of file versaloon.c.
References ERROR_OK, NULL, usbtoxxx_fini(), versaloon_buf, versaloon_cmd_buf, versaloon_free_want_pos(), and versaloon_usb_device_handle.
Referenced by versaloon_init().
void versaloon_free_want_pos | ( | void | ) |
Definition at line 102 of file versaloon.c.
References ARRAY_SIZE, versaloon_want_pos_t::next, NULL, versaloon_pending_t::pos, versaloon_pending, and versaloon_want_pos.
Referenced by usbtoxxx_execute_command(), and versaloon_fini().
|
static |
Definition at line 311 of file versaloon.c.
References ERRCODE_FAILURE_OPERATION, ERRCODE_INVALID_BUFFER, ERRCODE_INVALID_PARAMETER, ERRMSG_FAILURE_OPERATION, ERRMSG_INVALID_BUFFER, ERRMSG_INVALID_PARAMETER, ERROR_OK, LOG_BUG, LOG_ERROR, TO_STR, versaloon_buf, VERSALOON_GET_TVCC, and versaloon_send_command().
Referenced by versaloon_init().
|
static |
Definition at line 225 of file versaloon.c.
References versaloon_usb_setting_t::buf_size, ERRCODE_FAILURE_OPERATION, ERRCODE_NOT_ENOUGH_MEMORY, ERRMSG_FAILURE_OPERATION, ERRMSG_NOT_ENOUGH_MEMORY, ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, NULL, versaloon_interface_t::usb_setting, usbtoxxx_init(), versaloon_buf, versaloon_buf_size, versaloon_cmd_buf, versaloon_fini(), VERSALOON_GET_INFO, versaloon_get_target_voltage(), versaloon_interface, VERSALOON_RETRY_CNT, versaloon_send_command(), and versaloon_usb_to.
RESULT versaloon_send_command | ( | uint16_t | out_len, |
uint16_t * | inlen | ||
) |
Definition at line 184 of file versaloon.c.
References versaloon_usb_setting_t::buf_size, versaloon_usb_setting_t::ep_in, versaloon_usb_setting_t::ep_out, ERRCODE_FAILURE_OPERATION, ERRCODE_INVALID_BUFFER, ERRCODE_INVALID_PARAMETER, ERRMSG_FAILURE_OPERATION, ERRMSG_INVALID_BUFFER, ERRMSG_INVALID_PARAMETER, ERROR_FAIL, ERROR_OK, LOG_BUG, LOG_ERROR, TO_STR, versaloon_interface_t::usb_setting, versaloon_buf, versaloon_interface, versaloon_usb_device_handle, and versaloon_usb_to.
Referenced by usbtoxxx_execute_command(), versaloon_get_target_voltage(), and versaloon_init().
void versaloon_set_callback | ( | versaloon_callback_t | callback | ) |
Definition at line 93 of file versaloon.c.
References versaloon_callback.
Referenced by usbtoswd_transact().
void versaloon_set_extra_data | ( | void * | p | ) |
Definition at line 97 of file versaloon.c.
References versaloon_extra_data.
Referenced by usbtoswd_transact().
void versaloon_set_pending_id | ( | uint32_t | id | ) |
Definition at line 89 of file versaloon.c.
References id, and versaloon_pending_id.
|
static |
Definition at line 301 of file versaloon.c.
References usbtopwr_config(), usbtopwr_fini(), usbtopwr_init(), usbtopwr_output(), and usbtoxxx_execute_command().
uint8_t* versaloon_buf |
Definition at line 21 of file versaloon.c.
Referenced by usbtoxxx_ensure_buffer_size(), usbtoxxx_execute_command(), usbtoxxx_validate_current_command_type(), versaloon_fini(), versaloon_get_target_voltage(), versaloon_init(), and versaloon_send_command().
uint16_t versaloon_buf_size |
Definition at line 23 of file versaloon.c.
Referenced by usbtoxxx_ensure_buffer_size(), and versaloon_init().
|
static |
Definition at line 85 of file versaloon.c.
Referenced by versaloon_add_pending(), and versaloon_set_callback().
uint8_t* versaloon_cmd_buf |
Definition at line 22 of file versaloon.c.
Referenced by usbtojtagraw_execute(), usbtoswd_seqout(), versaloon_fini(), and versaloon_init().
|
static |
Definition at line 86 of file versaloon.c.
Referenced by versaloon_add_pending(), and versaloon_set_extra_data().
struct versaloon_interface_t versaloon_interface |
Definition at line 36 of file versaloon.c.
Referenced by COMMAND_HANDLER(), versaloon_init(), versaloon_send_command(), vsllink_init(), vsllink_interface_init(), vsllink_jtag_execute(), vsllink_quit(), vsllink_reset(), vsllink_speed(), vsllink_swd_frequency(), vsllink_swd_read_reg(), vsllink_swd_run_queue(), vsllink_swd_switch_seq(), vsllink_swd_write_reg(), vsllink_usb_close(), and vsllink_usb_open().
struct versaloon_pending_t versaloon_pending[VERSALOON_MAX_PENDING_NUMBER] |
Definition at line 23 of file versaloon.c.
Referenced by usbtoxxx_ensure_buffer_size(), usbtoxxx_execute_command(), versaloon_add_pending(), and versaloon_free_want_pos().
|
static |
Definition at line 84 of file versaloon.c.
Referenced by versaloon_add_pending(), and versaloon_set_pending_id().
uint16_t versaloon_pending_idx |
Definition at line 26 of file versaloon.c.
Referenced by usbtoxxx_ensure_buffer_size(), usbtoxxx_execute_command(), usbtoxxx_init(), usbtoxxx_pop_context(), usbtoxxx_save_context(), and versaloon_add_pending().
struct libusb_device_handle* versaloon_usb_device_handle |
Definition at line 28 of file versaloon.c.
Referenced by versaloon_fini(), versaloon_send_command(), and vsllink_interface_init().
|
static |
Definition at line 29 of file versaloon.c.
Referenced by versaloon_init(), and versaloon_send_command().
|
static |
Definition at line 87 of file versaloon.c.
Referenced by versaloon_add_pending(), versaloon_add_want_pos(), and versaloon_free_want_pos().