OpenOCD
discovery_usb.c File Reference

Device discovery (USB). More...

Include dependency graph for discovery_usb.c:

Go to the source code of this file.

Functions

static bool compare_devices (const void *a, const void *b)
 
JAYLINK_PRIV int discovery_usb_scan (struct jaylink_context *ctx)
 
static struct jaylink_devicefind_device (const struct jaylink_context *ctx, const struct libusb_device *usb_dev)
 
static bool parse_serial_number (const char *str, uint32_t *serial_number)
 
static struct jaylink_deviceprobe_device (struct jaylink_context *ctx, struct libusb_device *usb_dev)
 

Detailed Description

Device discovery (USB).

Definition in file discovery_usb.c.

Function Documentation

◆ compare_devices()

static bool compare_devices ( const void *  a,
const void *  b 
)
static

Definition at line 104 of file discovery_usb.c.

References jaylink_device::iface, and JAYLINK_HIF_USB.

Referenced by find_device().

◆ discovery_usb_scan()

◆ find_device()

static struct jaylink_device* find_device ( const struct jaylink_context ctx,
const struct libusb_device *  usb_dev 
)
static

Definition at line 121 of file discovery_usb.c.

References compare_devices(), list::data, jaylink_context::devs, list_find_custom(), and NULL.

Referenced by probe_device().

◆ parse_serial_number()

static bool parse_serial_number ( const char *  str,
uint32_t *  serial_number 
)
static

Definition at line 84 of file discovery_usb.c.

References JAYLINK_OK, jaylink_parse_serial_number(), and length.

Referenced by probe_device().

◆ probe_device()