]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commitdiff
Use per-device USB serial number strings.
authorUwe Hermann <redacted>
Sun, 30 Oct 2016 11:12:31 +0000 (12:12 +0100)
committerUwe Hermann <redacted>
Mon, 31 Oct 2016 13:45:13 +0000 (14:45 +0100)
These are not actual "serial numbers" in the strict sense, i.e. two
devices of the same type (e.g. two USBee ZX devices) would have the
same string.

Using two different actual serial numbers in such a case is not possible
since both devices would get the exact same firmware file (uploaded to
RAM via USB) and thus the exact same hardcoded "serial number". All devices
where fx2lafw is currently used don't have an EEPROM where the firmware
(and thus a different serial number) could be stored persistently; it's
always re-uploaded to the device's RAM upon connecting the device to USB.

However, the USB serial number field is still useful in that we can
store a nice device(-type) indicator string there. The benefit is that
an lsusb of an fx2lafw (after firmware upload) would yield something
specific like "USBee ZX" or "Hantek 6022BE" in addition to the very
generic "fx2lafw".

13 files changed:
hw/braintechnology-usb-lps/dscr.a51
hw/cwav-usbeeax/dscr.a51
hw/cwav-usbeedx/dscr.a51
hw/cwav-usbeesx/dscr.a51
hw/cwav-usbeezx/dscr.a51
hw/cypress-fx2/dscr.a51
hw/hantek-6022be/dscr.a51
hw/sainsmart-dds120/dscr.a51
hw/saleae-logic/dscr.a51
hw/sigrok-fx2-16ch/dscr.a51
hw/sigrok-fx2-8ch/dscr.a51
include/dscr.inc
include/dscr_hantek_6022be.inc

index c82804bbcf545509603fb30934c298437a4ecfc1..e38eafd25e821b3367e9ded5aa55a307a2f12ed9 100644 (file)
@@ -22,3 +22,6 @@ VID = 0xd016  ; Manufacturer ID (0x16d0)
 PID = 0x9804   ; Product ID (0x0498)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"Braintechnology USB-LPS"
+_dev_strings_end:
+       .dw     0x0000
index 335493ffbce2d022c8f2837abcd54b7ebac3c074..7959cba686b7d784eb55f1033a5759dfe5c87436 100644 (file)
@@ -23,3 +23,6 @@ VID = 0xa908  ; Manufacturer ID (0x08a9)
 PID = 0x1400   ; Product ID (0x0014)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"CWAV USBee AX"
+_dev_strings_end:
+       .dw     0x0000
index 8586b1fdd0d39f410b47fd5d7dea6143b592dc3d..c6a04fea02ab78acc82aee7463229d464b0f02c8 100644 (file)
@@ -22,3 +22,6 @@ VID = 0xa908  ; Manufacturer ID (0x08a9)
 PID = 0x1500   ; Product ID (0x0015)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"CWAV USBee DX"
+_dev_strings_end:
+       .dw     0x0000
index 35f93f756cfae701795eb241f0e21e18f9e56c93..cff9eb936f8a9d186b835f66f3910395587d1ad1 100644 (file)
@@ -23,3 +23,6 @@ VID = 0xa908  ; Manufacturer ID (0x08a9)
 PID = 0x0900   ; Product ID (0x0009)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"CWAV USBee SX"
+_dev_strings_end:
+       .dw     0x0000
index 2cfd73b76324ad654367b9ad26b0d2396706884a..f45f9cdbe311c08720b30a09a844a31241591636 100644 (file)
@@ -22,3 +22,6 @@ VID = 0xa908  ; Manufacturer ID (0x08a9)
 PID = 0x0500   ; Product ID (0x0005)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"CWAV USBee ZX"
+_dev_strings_end:
+       .dw     0x0000
index 310e077fae55f972af88047f2d9e3fc2aa903d04..8243ceeeb9a1212aeddc72b1f3958581a0ed9f64 100644 (file)
@@ -23,3 +23,6 @@ VID = 0xb404  ; Manufacturer ID (0x04b4)
 PID = 0x1386   ; Product ID (0x8613)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"Cypress FX2"
+_dev_strings_end:
+       .dw     0x0000
index 0f32a010ddfddc6a4c64871c81abe2f60ad9e596..942d3275d36792c0e18d9cb7509670135a4434f4 100644 (file)
@@ -23,3 +23,6 @@ PID = 0x8e60  ; Product ID (0x608e)
 VER = 0x0100   ; Product "version". 0x0001 == Hantek 6022BE.
 
 .include "dscr_hantek_6022be.inc"
+string_descriptor_a 3,^"Hantek 6022BE"
+_dev_strings_end:
+       .dw     0x0000
index 3e089c55054b4130fc121a84281a1e3e9cc7d592..79f8e026f36c66782963776e3735daa3516b72b5 100644 (file)
@@ -23,3 +23,6 @@ PID = 0x8e60  ; Product ID (0x608e)
 VER = 0x0200   ; Product "version". 0x0002 == SainSmart DDS120.
 
 .include "dscr_hantek_6022be.inc"
+string_descriptor_a 3,^"SainSmart DDS120"
+_dev_strings_end:
+       .dw     0x0000
index 81f37427e07a4aff1ff7b3a384f466a5ec2f1210..aba8cae0d34ff8b233b79e98a40d8b03e41fdfb8 100644 (file)
@@ -23,3 +23,6 @@ VID = 0x2509  ; Manufacturer ID (0x0925)
 PID = 0x8138   ; Product ID (0x3881)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"Saleae Logic"
+_dev_strings_end:
+       .dw     0x0000
index d63d08c0065c5d57ef94f0d68a98621e49de52d1..5657bddc4f3efc5632fd53dc7ed9bfa33ee2da96 100644 (file)
@@ -22,3 +22,6 @@ VID = 0x501D  ; Manufacturer ID (0x1D50)
 PID = 0x8D60   ; Product ID (0x608D)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"sigrok FX2 16ch"
+_dev_strings_end:
+       .dw     0x0000
index 4eecd9fe133a220d3e1b49fdf579672eb1550c87..c9b23ead5ee60e25932a24f4b7451785b285a620 100644 (file)
@@ -22,3 +22,6 @@ VID = 0x501D    ; Manufacturer ID (0x1D50)
 PID = 0x8C60    ; Product ID (0x608C)
 
 .include "dscr.inc"
+string_descriptor_a 3,^"sigrok FX2 8ch"
+_dev_strings_end:
+       .dw     0x0000
index 1d9888a057048f7670ca3d07bfcfb5c41cde4ad2..9f53fa502091ab5e620810f9bf68ee752503274f 100644 (file)
@@ -60,7 +60,7 @@ _dev_dscr:
        .dw     0x0100                  ; Product version (0.01)
        .db     1                       ; Manufacturer string index
        .db     2                       ; Product string index
-       .db     0                       ; Serial number string index (none)
+       .db     3                       ; Serial number string index (none)
        .db     1                       ; Number of configurations
 dev_dscr_end:
 
@@ -170,6 +170,3 @@ string_descriptor_lang 0 0x0409 ; Language code 0x0409 (English, US)
 
 string_descriptor_a 1,^"sigrok"
 string_descriptor_a 2,^"fx2lafw"
-
-_dev_strings_end:
-       .dw     0x0000
index 71cdc44d2b64e33241635f84c3a2a5ace263cf6d..418c2c75a642456e61f706a0ce5fe67d9cb39599 100644 (file)
@@ -59,7 +59,7 @@ _dev_dscr:
        .dw     VER                     ; Product version/type
        .db     1                       ; Manufacturer string index
        .db     2                       ; Product string index
-       .db     0                       ; Serial number string index (none)
+       .db     3                       ; Serial number string index
        .db     1                       ; Number of configurations
 dev_dscr_end:
 
@@ -353,6 +353,3 @@ string_descriptor_lang 0 0x0409 ; Language code 0x0409 (English, US)
 
 string_descriptor_a 1,^"sigrok"
 string_descriptor_a 2,^"fx2lafw"
-
-_dev_strings_end:
-       .dw     0x0000