OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | versaloon_pending_t |
struct | versaloon_want_pos_t |
Typedefs | |
typedef RESULT(* | versaloon_callback_t) (void *, uint8_t *, uint8_t *) |
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) |
void | versaloon_free_want_pos (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) |
Variables | |
uint8_t * | versaloon_buf |
uint16_t | versaloon_buf_size |
uint8_t * | versaloon_cmd_buf |
struct versaloon_pending_t | versaloon_pending [VERSALOON_MAX_PENDING_NUMBER] |
uint16_t | versaloon_pending_idx |
#define MP_FAIL 0x01 |
Definition at line 57 of file versaloon_internal.h.
#define MP_ISSP 0x11 |
Definition at line 59 of file versaloon_internal.h.
#define MP_OK 0x00 |
Definition at line 56 of file versaloon_internal.h.
#define VERSALOON_COMMON_CMD_END 0x0F |
Definition at line 31 of file versaloon_internal.h.
#define VERSALOON_COMMON_CMD_START 0x00 |
Definition at line 30 of file versaloon_internal.h.
#define VERSALOON_ERASE_OFFLINE_DATA 0x09 |
Definition at line 37 of file versaloon_internal.h.
#define VERSALOON_FULL 1 |
Definition at line 21 of file versaloon_internal.h.
#define VERSALOON_FW_UPDATE 0x0F |
Definition at line 40 of file versaloon_internal.h.
#define VERSALOON_FW_UPDATE_KEY 0xAA |
Definition at line 41 of file versaloon_internal.h.
#define VERSALOON_GET_HARDWARE 0x02 |
Definition at line 35 of file versaloon_internal.h.
#define VERSALOON_GET_INFO 0x00 |
Definition at line 33 of file versaloon_internal.h.
#define VERSALOON_GET_OFFLINE_CHECKSUM 0x0B |
Definition at line 39 of file versaloon_internal.h.
#define VERSALOON_GET_OFFLINE_SIZE 0x08 |
Definition at line 36 of file versaloon_internal.h.
#define VERSALOON_GET_TVCC 0x01 |
Definition at line 34 of file versaloon_internal.h.
#define VERSALOON_IFACE 0x00 |
Definition at line 19 of file versaloon_internal.h.
#define VERSALOON_INP 0x82 |
Definition at line 17 of file versaloon_internal.h.
#define VERSALOON_MAX_PENDING_NUMBER 4096 |
Definition at line 62 of file versaloon_internal.h.
#define VERSALOON_MCU_CMD_END 0x1F |
Definition at line 45 of file versaloon_internal.h.
#define VERSALOON_MCU_CMD_START 0x10 |
Definition at line 44 of file versaloon_internal.h.
#define VERSALOON_MINI 2 |
Definition at line 22 of file versaloon_internal.h.
#define VERSALOON_NANO 3 |
Definition at line 23 of file versaloon_internal.h.
#define VERSALOON_OUTP 0x03 |
Definition at line 18 of file versaloon_internal.h.
#define VERSALOON_PID 0xA038 |
Definition at line 16 of file versaloon_internal.h.
#define VERSALOON_PRODUCTSTRING "Versaloon" |
Definition at line 13 of file versaloon_internal.h.
#define VERSALOON_PRODUCTSTRING_INDEX 2 |
Definition at line 10 of file versaloon_internal.h.
#define VERSALOON_SERIALSTRING_INDEX 3 |
Definition at line 11 of file versaloon_internal.h.
#define VERSALOON_TIMEOUT 5000 |
Definition at line 25 of file versaloon_internal.h.
#define VERSALOON_TIMEOUT_LONG 60000 |
Definition at line 26 of file versaloon_internal.h.
#define VERSALOON_USB_TO_XXX_CMD_END 0x7F |
Definition at line 49 of file versaloon_internal.h.
#define VERSALOON_USB_TO_XXX_CMD_START 0x20 |
Definition at line 48 of file versaloon_internal.h.
#define VERSALOON_VID 0x0483 |
Definition at line 15 of file versaloon_internal.h.
#define VERSALOON_VSLLINK_CMD_END 0xFF |
Definition at line 53 of file versaloon_internal.h.
#define VERSALOON_VSLLINK_CMD_START 0x80 |
Definition at line 52 of file versaloon_internal.h.
#define VERSALOON_WRITE_OFFLINE_DATA 0x0A |
Definition at line 38 of file versaloon_internal.h.
typedef RESULT(* versaloon_callback_t) (void *, uint8_t *, uint8_t *) |
Definition at line 63 of file versaloon_internal.h.
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.
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().
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.
|
extern |
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().
|
extern |
Definition at line 23 of file versaloon.c.
Referenced by usbtoxxx_ensure_buffer_size(), and versaloon_init().
|
extern |
Definition at line 22 of file versaloon.c.
Referenced by usbtojtagraw_execute(), usbtoswd_seqout(), versaloon_fini(), and versaloon_init().
|
extern |
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().
|
extern |
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().