#include "command.h"
static const struct fx2lafw_profile supported_fx2[] = {
- /*
- * CWAV USBee DX
- * XZL Studio DX
- */
- { 0x08a9, 0x0015, "CWAV", "USBee DX", NULL,
- FIRMWARE_DIR "/fx2lafw-cwav-usbeedx.fw",
- 0 },
/*
* CWAV USBee AX
* EE Electronics ESLA201A
{ 0x08a9, 0x0014, "CWAV", "USBee AX", NULL,
FIRMWARE_DIR "/fx2lafw-cwav-usbeeax.fw",
0 },
+ /*
+ * CWAV USBee DX
+ * XZL-Studio DX
+ */
+ { 0x08a9, 0x0015, "CWAV", "USBee DX", NULL,
+ FIRMWARE_DIR "/fx2lafw-cwav-usbeedx.fw",
+ DEV_CAPS_16BIT },
/*
* CWAV USBee SX
* API callbacks
*/
-static int hw_init(const char *devinfo)
+static int hw_init(void)
+{
+
+ if (libusb_init(&usb_context) != 0) {
+ sr_warn("fx2lafw: Failed to initialize libusb.");
+ return SR_ERR;
+ }
+
+ return SR_OK;
+}
+
+static int hw_scan(void)
{
struct sr_dev_inst *sdi;
struct libusb_device_descriptor des;
const struct fx2lafw_profile *prof;
struct context *ctx;
libusb_device **devlist;
- int ret;
- int devcnt = 0;
- int i, j;
-
- /* Avoid compiler warnings. */
- (void)devinfo;
-
- if (libusb_init(&usb_context) != 0) {
- sr_warn("fx2lafw: Failed to initialize libusb.");
- return 0;
- }
+ int devcnt, ret, i, j;
/* Find all fx2lafw compatible devices and upload firmware to them. */
+ devcnt = 0;
libusb_get_device_list(usb_context, &devlist);
for (i = 0; devlist[i]; i++) {
.api_version = 1,
.init = hw_init,
.cleanup = hw_cleanup,
+ .scan = hw_scan,
.dev_open = hw_dev_open,
.dev_close = hw_dev_close,
.dev_info_get = hw_dev_info_get,