OpenOCD
versaloon.c File Reference
Include dependency graph for versaloon.c:

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_tversaloon_want_pos
 

Macro Definition Documentation

◆ VERSALOON_RETRY_CNT

#define VERSALOON_RETRY_CNT   10

Definition at line 224 of file versaloon.c.

Function Documentation

◆ versaloon_add_pending()

◆ versaloon_add_want_pos()

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

◆ versaloon_delay_ms()

static RESULT versaloon_delay_ms ( uint16_t  ms)
static

Definition at line 337 of file versaloon.c.

References usbtodelay_delay().

◆ versaloon_delay_us()

static RESULT versaloon_delay_us ( uint16_t  us)
static

Definition at line 342 of file versaloon.c.

References usbtodelay_delay().

◆ versaloon_fini()

static RESULT versaloon_fini ( void  )
static

◆ versaloon_free_want_pos()

void versaloon_free_want_pos ( void  )

◆ versaloon_get_target_voltage()

◆ versaloon_init()

◆ 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.

◆ versaloon_set_target_voltage()

static RESULT versaloon_set_target_voltage ( uint16_t  voltage)
static

Variable Documentation

◆ versaloon_buf

◆ versaloon_buf_size

uint16_t versaloon_buf_size

Definition at line 23 of file versaloon.c.

Referenced by usbtoxxx_ensure_buffer_size(), and versaloon_init().

◆ versaloon_callback

versaloon_callback_t versaloon_callback
static

Definition at line 85 of file versaloon.c.

Referenced by versaloon_add_pending(), and versaloon_set_callback().

◆ versaloon_cmd_buf

uint8_t* versaloon_cmd_buf

Definition at line 22 of file versaloon.c.

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

◆ versaloon_extra_data

void* versaloon_extra_data
static

Definition at line 86 of file versaloon.c.

Referenced by versaloon_add_pending(), and versaloon_set_extra_data().

◆ versaloon_interface

◆ versaloon_pending

◆ versaloon_pending_id

uint32_t versaloon_pending_id
static

Definition at line 84 of file versaloon.c.

Referenced by versaloon_add_pending(), and versaloon_set_pending_id().

◆ versaloon_pending_idx

◆ versaloon_usb_device_handle

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().

◆ versaloon_usb_to

uint32_t versaloon_usb_to = VERSALOON_TIMEOUT
static

Definition at line 29 of file versaloon.c.

Referenced by versaloon_init(), and versaloon_send_command().

◆ versaloon_want_pos

struct versaloon_want_pos_t* versaloon_want_pos
static