]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - include/dscr_hantek_6022be.inc
Use per-device USB serial number strings.
[sigrok-firmware-fx2lafw.git] / include / dscr_hantek_6022be.inc
index 2e61b14eac0c161943ed178efda1016c78ef470f..418c2c75a642456e61f706a0ce5fe67d9cb39599 100644 (file)
@@ -18,6 +18,8 @@
 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 ;;
 
+.include "common.inc"
+
 .module DEV_DSCR
 
 ; Descriptor types
@@ -54,10 +56,10 @@ _dev_dscr:
        .db     64                      ; Max. EP0 packet size
        .dw     VID                     ; Manufacturer ID
        .dw     PID                     ; Product ID
-       .dw     0x0000                  ; Product version (0.00)
+       .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:
 
@@ -110,7 +112,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_BULK      ; Endpoint type (bulk)
        .db     0x00                    ; Max. packet size, LSB (512 bytes)
        .db     0x02                    ; Max. packet size, MSB (512 bytes)
-       .db     0x00                    ; Polling interval
+       .db     0x00                    ; Polling interval (ignored for bulk)
 
        ; Isochronous interface 0, alt 1
        .db     DSCR_INTERFACE_LEN
@@ -130,7 +132,9 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (3*1024 bytes)
        .db     0x14                    ; Max. packet size, MSB (3*1024 bytes)
-       .db     0x01                    ; Polling interval
+                                       ; 12:11 = 0b10 (3 tr. per microframe)
+                                       ; 10:00 = 1024
+       .db     0x01                    ; Polling interval (1 microframe)
 
        ; Isochronous interface 0, alt 2, 16MB/s
        .db     DSCR_INTERFACE_LEN
@@ -150,7 +154,9 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (2*1024 bytes)
        .db     0x0c                    ; Max. packet size, MSB (2*1024 bytes)
-       .db     0x01                    ; Polling interval
+                                       ; 12:11 = 0b01 (2 tr. per microframe)
+                                       ; 10:00 = 1024
+       .db     0x01                    ; Polling interval (1 microframe)
 
        ; Isochronous interface 0, alt 3, 8MB/s
        .db     DSCR_INTERFACE_LEN
@@ -170,7 +176,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (1024 bytes)
        .db     0x04                    ; Max. packet size, MSB (1024 bytes)
-       .db     0x01                    ; Polling interval
+       .db     0x01                    ; Polling interval (1 microframe)
 
        ; Isochronous interface 0, alt 4, 4MB/s
        .db     DSCR_INTERFACE_LEN
@@ -190,7 +196,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (1024 bytes)
        .db     0x04                    ; Max. packet size, MSB (1024 bytes)
-       .db     0x02                    ; Polling interval
+       .db     0x02                    ; Polling interval (2 microframes)
 
        ; Isochronous interface 0, alt 5, 2MB/s
        .db     DSCR_INTERFACE_LEN
@@ -210,7 +216,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (1024 bytes)
        .db     0x04                    ; Max. packet size, MSB (1024 bytes)
-       .db     0x03                    ; Polling interval
+       .db     0x03                    ; Polling interval (4 microframes)
 
        ; Isochronous interface 0, alt 6, 1MB/s
        .db     DSCR_INTERFACE_LEN
@@ -230,7 +236,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (1024 bytes)
        .db     0x04                    ; Max. packet size, MSB (1024 bytes)
-       .db     0x04                    ; Polling interval
+       .db     0x04                    ; Polling interval (8 microframes)
 
        ; Isochronous interface 0, alt 7, 500kB/s
        .db     DSCR_INTERFACE_LEN
@@ -250,7 +256,7 @@ highspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (512 bytes)
        .db     0x02                    ; Max. packet size, MSB (512 bytes)
-       .db     0x04                    ; Polling interval
+       .db     0x04                    ; Polling interval (8 microframes)
 
 highspd_dscr_realend:
 
@@ -288,9 +294,9 @@ fullspd_dscr_end:
        .db     DSCR_ENDPOINT_TYPE
        .db     0x86                    ; EP number (6), direction (IN)
        .db     ENDPOINT_TYPE_BULK      ; Endpoint type (bulk)
-       .db     0x40                    ; Max. packet size, LSB (512 bytes)
-       .db     0x00                    ; Max. packet size, MSB (512 bytes)
-       .db     0x00                    ; Polling interval
+       .db     0x40                    ; Max. packet size, LSB (64 bytes)
+       .db     0x00                    ; Max. packet size, MSB (64 bytes)
+       .db     0x00                    ; Polling interval (ignored for bulk)
 
        ; Isochronous interface 0, alt 1, 1MB/s
        .db     DSCR_INTERFACE_LEN
@@ -310,7 +316,7 @@ fullspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0xff                    ; Max. packet size, LSB (1023 bytes)
        .db     0x03                    ; Max. packet size, MSB (1023 bytes)
-       .db     0x01                    ; Polling interval
+       .db     0x01                    ; Polling interval (1 frame)
 
        ; Isochronous interface 0, alt 2, 500kB/s
        .db     DSCR_INTERFACE_LEN
@@ -330,7 +336,7 @@ fullspd_dscr_end:
        .db     ENDPOINT_TYPE_ISO       ; Endpoint type (iso)
        .db     0x00                    ; Max. packet size, LSB (512 bytes)
        .db     0x02                    ; Max. packet size, MSB (512 bytes)
-       .db     0x01                    ; Polling interval
+       .db     0x01                    ; Polling interval (1 frame)
 
 fullspd_dscr_realend:
 
@@ -343,24 +349,7 @@ fullspd_dscr_realend:
 _dev_strings:
 
 ; See http://www.usb.org/developers/docs/USB_LANGIDs.pdf for the full list.
-_string0:
-       .db     string0end - _string0
-       .db     DSCR_STRING_TYPE
-       .db     0x09, 0x04              ; Language code 0x0409 (English, US)
-string0end:
-
-_string1:
-       .db     string1end - _string1
-       .db     DSCR_STRING_TYPE
-       .ascii  'O\0D\0M\0'
-string1end:
-
-_string2:
-       .db     string2end - _string2
-       .db     DSCR_STRING_TYPE
-       .ascii  'f\0x\0002\0l\0a\0f\0w\0'
-string2end:
-
-_dev_strings_end:
-       .dw     0x0000
+string_descriptor_lang 0 0x0409 ; Language code 0x0409 (English, US)
 
+string_descriptor_a 1,^"sigrok"
+string_descriptor_a 2,^"fx2lafw"