]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: Moved firmware path into fx2lafw_profile
authorJoel Holdsworth <redacted>
Mon, 12 Mar 2012 21:31:43 +0000 (21:31 +0000)
committerJoel Holdsworth <redacted>
Mon, 12 Mar 2012 21:41:28 +0000 (21:41 +0000)
hardware/fx2lafw/fx2lafw.c
hardware/fx2lafw/fx2lafw.h

index 92b1f7b06f6f0b7e4792017cb30b0866bb547bbd..dcc175874ea0577d4a511df3b2ce84d89a1c4420 100644 (file)
@@ -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
index a2e6bcfbbe6d5ac0cb3b31d26d3b48fc46698219..716904f1b9abdf0529ede0de71f4f21933135197 100644 (file)
@@ -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;
 };