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

Go to the source code of this file.

Data Structures

struct  cmsis_dap_backend_data
 
struct  cmsis_dap_bulk_transfer
 

Enumerations

enum  { CMSIS_DAP_TRANSFER_PENDING = 0 , CMSIS_DAP_TRANSFER_IDLE , CMSIS_DAP_TRANSFER_COMPLETED }
 

Functions

static int cmsis_dap_usb_alloc (struct cmsis_dap *dap, unsigned int pkt_sz)
 
static void LIBUSB_CALL cmsis_dap_usb_callback (struct libusb_transfer *transfer)
 
static void cmsis_dap_usb_cancel_all (struct cmsis_dap *dap)
 
static void cmsis_dap_usb_close (struct cmsis_dap *dap)
 
static void cmsis_dap_usb_free (struct cmsis_dap *dap)
 
static int cmsis_dap_usb_open (struct cmsis_dap *dap, uint16_t vids[], uint16_t pids[], const char *serial)
 
static int cmsis_dap_usb_read (struct cmsis_dap *dap, int transfer_timeout_ms, struct timeval *wait_timeout)
 
static int cmsis_dap_usb_write (struct cmsis_dap *dap, int txlen, int timeout_ms)
 
 COMMAND_HANDLER (cmsis_dap_handle_usb_interface_command)
 

Variables

const struct cmsis_dap_backend cmsis_dap_usb_backend
 
static int cmsis_dap_usb_interface = -1
 
const struct command_registration cmsis_dap_usb_subcommand_handlers []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CMSIS_DAP_TRANSFER_PENDING 
CMSIS_DAP_TRANSFER_IDLE 
CMSIS_DAP_TRANSFER_COMPLETED 

Definition at line 36 of file cmsis_dap_usb_bulk.c.

Function Documentation

◆ cmsis_dap_usb_alloc()

◆ cmsis_dap_usb_callback()

◆ cmsis_dap_usb_cancel_all()

◆ cmsis_dap_usb_close()

◆ cmsis_dap_usb_free()

◆ cmsis_dap_usb_open()

◆ cmsis_dap_usb_read()

◆ cmsis_dap_usb_write()

◆ COMMAND_HANDLER()

COMMAND_HANDLER ( cmsis_dap_handle_usb_interface_command  )

Definition at line 645 of file cmsis_dap_usb_bulk.c.

Variable Documentation

◆ cmsis_dap_usb_backend

const struct cmsis_dap_backend cmsis_dap_usb_backend
Initial value:
= {
.name = "usb_bulk",
.packet_buffer_alloc = cmsis_dap_usb_alloc,
.packet_buffer_free = cmsis_dap_usb_free,
.cancel_all = cmsis_dap_usb_cancel_all,
}
static int cmsis_dap_usb_write(struct cmsis_dap *dap, int txlen, int timeout_ms)
static int cmsis_dap_usb_alloc(struct cmsis_dap *dap, unsigned int pkt_sz)
static void cmsis_dap_usb_cancel_all(struct cmsis_dap *dap)
static void cmsis_dap_usb_free(struct cmsis_dap *dap)
static int cmsis_dap_usb_open(struct cmsis_dap *dap, uint16_t vids[], uint16_t pids[], const char *serial)
static void cmsis_dap_usb_close(struct cmsis_dap *dap)
static int cmsis_dap_usb_read(struct cmsis_dap *dap, int transfer_timeout_ms, struct timeval *wait_timeout)

Definition at line 645 of file cmsis_dap_usb_bulk.c.

◆ cmsis_dap_usb_interface

int cmsis_dap_usb_interface = -1
static

Definition at line 60 of file cmsis_dap_usb_bulk.c.

Referenced by cmsis_dap_usb_open().

◆ cmsis_dap_usb_subcommand_handlers

const struct command_registration cmsis_dap_usb_subcommand_handlers[]
Initial value:
= {
{
.name = "interface",
.handler = &cmsis_dap_handle_usb_interface_command,
.mode = COMMAND_CONFIG,
.help = "set the USB interface number to use (for USB bulk backend only)",
.usage = "<interface_number>",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_CONFIG
Definition: command.h:41

Definition at line 645 of file cmsis_dap_usb_bulk.c.