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

Go to the source code of this file.

Data Structures

struct  cmsis_dap_backend_data
 
struct  cmsis_dap_report_size
 

Functions

static int cmsis_dap_hid_alloc (struct cmsis_dap *dap, unsigned int pkt_sz)
 
static void cmsis_dap_hid_cancel_all (struct cmsis_dap *dap)
 
static void cmsis_dap_hid_close (struct cmsis_dap *dap)
 
static void cmsis_dap_hid_free (struct cmsis_dap *dap)
 
static int cmsis_dap_hid_open (struct cmsis_dap *dap, uint16_t vids[], uint16_t pids[], const char *serial)
 
static int cmsis_dap_hid_read (struct cmsis_dap *dap, int transfer_timeout_ms, struct timeval *wait_timeout)
 
static int cmsis_dap_hid_write (struct cmsis_dap *dap, int txlen, int timeout_ms)
 

Variables

const struct cmsis_dap_backend cmsis_dap_hid_backend
 
static const struct cmsis_dap_report_size report_size_quirks []
 

Function Documentation

◆ cmsis_dap_hid_alloc()

static int cmsis_dap_hid_alloc ( struct cmsis_dap dap,
unsigned int  pkt_sz 
)
static

◆ cmsis_dap_hid_cancel_all()

static void cmsis_dap_hid_cancel_all ( struct cmsis_dap dap)
static

Definition at line 275 of file cmsis_dap_usb_hid.c.

◆ cmsis_dap_hid_close()

static void cmsis_dap_hid_close ( struct cmsis_dap dap)
static

◆ cmsis_dap_hid_free()

static void cmsis_dap_hid_free ( struct cmsis_dap dap)
static

Definition at line 269 of file cmsis_dap_usb_hid.c.

References NULL, and cmsis_dap::packet_buffer.

Referenced by cmsis_dap_hid_close().

◆ cmsis_dap_hid_open()

◆ cmsis_dap_hid_read()

static int cmsis_dap_hid_read ( struct cmsis_dap dap,
int  transfer_timeout_ms,
struct timeval wait_timeout 
)
static

◆ cmsis_dap_hid_write()

static int cmsis_dap_hid_write ( struct cmsis_dap dap,
int  txlen,
int  timeout_ms 
)
static

Variable Documentation

◆ cmsis_dap_hid_backend

const struct cmsis_dap_backend cmsis_dap_hid_backend
Initial value:
= {
.name = "hid",
.packet_buffer_alloc = cmsis_dap_hid_alloc,
.packet_buffer_free = cmsis_dap_hid_free,
.cancel_all = cmsis_dap_hid_cancel_all,
}
static int cmsis_dap_hid_alloc(struct cmsis_dap *dap, unsigned int pkt_sz)
static int cmsis_dap_hid_open(struct cmsis_dap *dap, uint16_t vids[], uint16_t pids[], const char *serial)
static int cmsis_dap_hid_read(struct cmsis_dap *dap, int transfer_timeout_ms, struct timeval *wait_timeout)
static void cmsis_dap_hid_close(struct cmsis_dap *dap)
static void cmsis_dap_hid_cancel_all(struct cmsis_dap *dap)
static void cmsis_dap_hid_free(struct cmsis_dap *dap)
static int cmsis_dap_hid_write(struct cmsis_dap *dap, int txlen, int timeout_ms)

Definition at line 275 of file cmsis_dap_usb_hid.c.

◆ report_size_quirks

const struct cmsis_dap_report_size report_size_quirks[]
static
Initial value:
= {
{ .vid = 0x03eb, .pid = 0x2140, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2141, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2144, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2111, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2157, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2169, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x216a, .report_size = 512 },
{ .vid = 0x03eb, .pid = 0x2170, .report_size = 512 },
{ .vid = 0, .pid = 0, .report_size = 0 }
}

Definition at line 1 of file cmsis_dap_usb_hid.c.

Referenced by cmsis_dap_hid_open().