OpenOCD
versaloon_internal.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  versaloon_pending_t
 
struct  versaloon_want_pos_t
 

Macros

#define MP_FAIL   0x01
 
#define MP_ISSP   0x11
 
#define MP_OK   0x00
 
#define VERSALOON_COMMON_CMD_END   0x0F
 
#define VERSALOON_COMMON_CMD_START   0x00
 
#define VERSALOON_ERASE_OFFLINE_DATA   0x09
 
#define VERSALOON_FULL   1
 
#define VERSALOON_FW_UPDATE   0x0F
 
#define VERSALOON_FW_UPDATE_KEY   0xAA
 
#define VERSALOON_GET_HARDWARE   0x02
 
#define VERSALOON_GET_INFO   0x00
 
#define VERSALOON_GET_OFFLINE_CHECKSUM   0x0B
 
#define VERSALOON_GET_OFFLINE_SIZE   0x08
 
#define VERSALOON_GET_TVCC   0x01
 
#define VERSALOON_IFACE   0x00
 
#define VERSALOON_INP   0x82
 
#define VERSALOON_MAX_PENDING_NUMBER   4096
 
#define VERSALOON_MCU_CMD_END   0x1F
 
#define VERSALOON_MCU_CMD_START   0x10
 
#define VERSALOON_MINI   2
 
#define VERSALOON_NANO   3
 
#define VERSALOON_OUTP   0x03
 
#define VERSALOON_PID   0xA038
 
#define VERSALOON_PRODUCTSTRING   "Versaloon"
 
#define VERSALOON_PRODUCTSTRING_INDEX   2
 
#define VERSALOON_SERIALSTRING_INDEX   3
 
#define VERSALOON_TIMEOUT   5000
 
#define VERSALOON_TIMEOUT_LONG   60000
 
#define VERSALOON_USB_TO_XXX_CMD_END   0x7F
 
#define VERSALOON_USB_TO_XXX_CMD_START   0x20
 
#define VERSALOON_VID   0x0483
 
#define VERSALOON_VSLLINK_CMD_END   0xFF
 
#define VERSALOON_VSLLINK_CMD_START   0x80
 
#define VERSALOON_WRITE_OFFLINE_DATA   0x0A
 

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
 

Macro Definition Documentation

◆ MP_FAIL

#define MP_FAIL   0x01

Definition at line 57 of file versaloon_internal.h.

◆ MP_ISSP

#define MP_ISSP   0x11

Definition at line 59 of file versaloon_internal.h.

◆ MP_OK

#define MP_OK   0x00

Definition at line 56 of file versaloon_internal.h.

◆ VERSALOON_COMMON_CMD_END

#define VERSALOON_COMMON_CMD_END   0x0F

Definition at line 31 of file versaloon_internal.h.

◆ VERSALOON_COMMON_CMD_START

#define VERSALOON_COMMON_CMD_START   0x00

Definition at line 30 of file versaloon_internal.h.

◆ VERSALOON_ERASE_OFFLINE_DATA

#define VERSALOON_ERASE_OFFLINE_DATA   0x09

Definition at line 37 of file versaloon_internal.h.

◆ VERSALOON_FULL

#define VERSALOON_FULL   1

Definition at line 21 of file versaloon_internal.h.

◆ VERSALOON_FW_UPDATE

#define VERSALOON_FW_UPDATE   0x0F

Definition at line 40 of file versaloon_internal.h.

◆ VERSALOON_FW_UPDATE_KEY

#define VERSALOON_FW_UPDATE_KEY   0xAA

Definition at line 41 of file versaloon_internal.h.

◆ VERSALOON_GET_HARDWARE

#define VERSALOON_GET_HARDWARE   0x02

Definition at line 35 of file versaloon_internal.h.

◆ VERSALOON_GET_INFO

#define VERSALOON_GET_INFO   0x00

Definition at line 33 of file versaloon_internal.h.

◆ VERSALOON_GET_OFFLINE_CHECKSUM

#define VERSALOON_GET_OFFLINE_CHECKSUM   0x0B

Definition at line 39 of file versaloon_internal.h.

◆ VERSALOON_GET_OFFLINE_SIZE

#define VERSALOON_GET_OFFLINE_SIZE   0x08

Definition at line 36 of file versaloon_internal.h.

◆ VERSALOON_GET_TVCC

#define VERSALOON_GET_TVCC   0x01

Definition at line 34 of file versaloon_internal.h.

◆ VERSALOON_IFACE

#define VERSALOON_IFACE   0x00

Definition at line 19 of file versaloon_internal.h.

◆ VERSALOON_INP

#define VERSALOON_INP   0x82

Definition at line 17 of file versaloon_internal.h.

◆ VERSALOON_MAX_PENDING_NUMBER

#define VERSALOON_MAX_PENDING_NUMBER   4096

Definition at line 62 of file versaloon_internal.h.

◆ VERSALOON_MCU_CMD_END

#define VERSALOON_MCU_CMD_END   0x1F

Definition at line 45 of file versaloon_internal.h.

◆ VERSALOON_MCU_CMD_START

#define VERSALOON_MCU_CMD_START   0x10

Definition at line 44 of file versaloon_internal.h.

◆ VERSALOON_MINI

#define VERSALOON_MINI   2

Definition at line 22 of file versaloon_internal.h.

◆ VERSALOON_NANO

#define VERSALOON_NANO   3

Definition at line 23 of file versaloon_internal.h.

◆ VERSALOON_OUTP

#define VERSALOON_OUTP   0x03

Definition at line 18 of file versaloon_internal.h.

◆ VERSALOON_PID

#define VERSALOON_PID   0xA038

Definition at line 16 of file versaloon_internal.h.

◆ VERSALOON_PRODUCTSTRING

#define VERSALOON_PRODUCTSTRING   "Versaloon"

Definition at line 13 of file versaloon_internal.h.

◆ VERSALOON_PRODUCTSTRING_INDEX

#define VERSALOON_PRODUCTSTRING_INDEX   2

Definition at line 10 of file versaloon_internal.h.

◆ VERSALOON_SERIALSTRING_INDEX

#define VERSALOON_SERIALSTRING_INDEX   3

Definition at line 11 of file versaloon_internal.h.

◆ VERSALOON_TIMEOUT

#define VERSALOON_TIMEOUT   5000

Definition at line 25 of file versaloon_internal.h.

◆ VERSALOON_TIMEOUT_LONG

#define VERSALOON_TIMEOUT_LONG   60000

Definition at line 26 of file versaloon_internal.h.

◆ VERSALOON_USB_TO_XXX_CMD_END

#define VERSALOON_USB_TO_XXX_CMD_END   0x7F

Definition at line 49 of file versaloon_internal.h.

◆ VERSALOON_USB_TO_XXX_CMD_START

#define VERSALOON_USB_TO_XXX_CMD_START   0x20

Definition at line 48 of file versaloon_internal.h.

◆ VERSALOON_VID

#define VERSALOON_VID   0x0483

Definition at line 15 of file versaloon_internal.h.

◆ VERSALOON_VSLLINK_CMD_END

#define VERSALOON_VSLLINK_CMD_END   0xFF

Definition at line 53 of file versaloon_internal.h.

◆ VERSALOON_VSLLINK_CMD_START

#define VERSALOON_VSLLINK_CMD_START   0x80

Definition at line 52 of file versaloon_internal.h.

◆ VERSALOON_WRITE_OFFLINE_DATA

#define VERSALOON_WRITE_OFFLINE_DATA   0x0A

Definition at line 38 of file versaloon_internal.h.

Typedef Documentation

◆ versaloon_callback_t

typedef RESULT(* versaloon_callback_t) (void *, uint8_t *, uint8_t *)

Definition at line 63 of file versaloon_internal.h.

Function Documentation

◆ versaloon_add_pending()

◆ versaloon_add_want_pos()

RESULT versaloon_add_want_pos ( uint16_t  offset,
uint16_t  size,
uint8_t *  buff 
)

◆ versaloon_free_want_pos()

void versaloon_free_want_pos ( void  )

◆ versaloon_send_command()

◆ versaloon_set_callback()

void versaloon_set_callback ( versaloon_callback_t  callback)

Definition at line 93 of file versaloon.c.

References versaloon_callback.

Referenced by usbtoswd_transact().

◆ versaloon_set_extra_data()

void versaloon_set_extra_data ( void *  p)

Definition at line 97 of file versaloon.c.

References versaloon_extra_data.

Referenced by usbtoswd_transact().

◆ versaloon_set_pending_id()

void versaloon_set_pending_id ( uint32_t  id)

Definition at line 89 of file versaloon.c.

References id, and versaloon_pending_id.

Variable Documentation

◆ versaloon_buf

◆ versaloon_buf_size

uint16_t versaloon_buf_size
extern

Definition at line 23 of file versaloon.c.

Referenced by usbtoxxx_ensure_buffer_size(), and versaloon_init().

◆ versaloon_cmd_buf

uint8_t* versaloon_cmd_buf
extern

Definition at line 22 of file versaloon.c.

Referenced by usbtojtagraw_execute(), usbtoswd_seqout(), versaloon_fini(), and versaloon_init().

◆ versaloon_pending

◆ versaloon_pending_idx