From: Joel Holdsworth Date: Mon, 12 Mar 2012 21:31:43 +0000 (+0000) Subject: fx2lafw: Moved firmware path into fx2lafw_profile X-Git-Tag: libsigrok-0.1.0~49 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f8b07fc6c37cc40dbcc3c6bc607d6e3137b532e4;p=libsigrok.git fx2lafw: Moved firmware path into fx2lafw_profile --- diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 92b1f7b0..dcc17587 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -32,8 +32,9 @@ static const struct fx2lafw_profile supported_fx2[] = { /* CWAV USBee AX * EE Electronics ESLA201A */ - { 0x08a9, 0x0014, "CWAV", "USBee AX", NULL, 8 }, - { 0, 0, 0, 0, 0, 0 } + { 0x08a9, 0x0014, "CWAV", "USBee AX", NULL, + FIRMWARE_DIR "/fx2lafw-cwav-usbeeax.fw", 8 }, + { 0, 0, 0, 0, 0, 0, 0 } }; static int fx2lafw_capabilities[] = { @@ -305,7 +306,8 @@ static int hw_init(const char *deviceinfo) (libusb_get_bus_number(devlist[i]), libusb_get_device_address(devlist[i]), NULL); } else { - if (ezusb_upload_firmware(devlist[i], USB_CONFIGURATION, FIRMWARE) == SR_OK) + if (ezusb_upload_firmware(devlist[i], USB_CONFIGURATION, + fx2lafw_prof->firmware) == SR_OK) /* Remember when the firmware on this device was updated */ g_get_current_time(&ctx->fw_updated); else diff --git a/hardware/fx2lafw/fx2lafw.h b/hardware/fx2lafw/fx2lafw.h index a2e6bcfb..716904f1 100644 --- a/hardware/fx2lafw/fx2lafw.h +++ b/hardware/fx2lafw/fx2lafw.h @@ -23,7 +23,6 @@ #define USB_INTERFACE 0 #define USB_CONFIGURATION 1 #define TRIGGER_TYPES "01rf" -#define FIRMWARE FIRMWARE_DIR "/fx2lafw-cwav-usbeeax.fw" #define MAX_RENUM_DELAY 3000 /* ms */ #define NUM_SIMUL_TRANSFERS 10 @@ -37,6 +36,8 @@ struct fx2lafw_profile { const char *model; const char *model_version; + const char *firmware; + int num_probes; };