fx2lafw_headers = \
include/command.h \
include/dscr.inc \
+ include/common.inc \
include/fx2lafw.h \
include/gpif-acquisition.h
gpif-acquisition.rel
hantek_6022be_headers = \
- include/dscr_hantek_6022be.inc
+ include/dscr_hantek_6022be.inc \
+ include/common.inc
hantek_6022be_sources = \
hantek_6022be.c
hantek_6022be.rel
sainsmart_dds120_headers = \
- include/dscr_hantek_6022be.inc
+ include/dscr_hantek_6022be.inc \
+ include/common.inc
sainsmart_dds120_sources = \
sainsmart_dds120.c
--- /dev/null
+;;\r
+;; This file is part of the sigrok-firmware-fx2lafw project.\r
+;;\r
+;; Copyright (C) 2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>\r
+;;\r
+;; This program is free software; you can redistribute it and/or modify\r
+;; it under the terms of the GNU General Public License as published by\r
+;; the Free Software Foundation; either version 2 of the License, or\r
+;; (at your option) any later version.\r
+;;\r
+;; This program is distributed in the hope that it will be useful,\r
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+;; GNU General Public License for more details.\r
+;;\r
+;; You should have received a copy of the GNU General Public License\r
+;; along with this program; if not, write to the Free Software\r
+;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
+;;\r
+\r
+.macro string_descriptor_a n,str\r
+_string'n:\r
+ .nchr len,"'str"\r
+ .db len * 2 + 2\r
+ .db 3\r
+ .irpc i,^"'str"\r
+ .db ''i, 0\r
+ .endm\r
+.endm\r
+\r
+.macro string_descriptor_lang n,l\r
+_string'n:\r
+ .db 4\r
+ .db 3\r
+ .dw >l + (<l * 0x100)\r
+.endm\r
;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
;;
+.include "common.inc"
+
.module DEV_DSCR
; Descriptor types
_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 's\0i\0g\0r\0o\0k\0'
-string1end:
-
-_string2:
- .db string2end - _string2
- .db DSCR_STRING_TYPE
- .ascii 'f\0x\0002\0l\0a\0f\0w\0'
-string2end:
+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
-
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;;
+.include "common.inc"
+
.module DEV_DSCR
; Descriptor types
_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 's\0i\0g\0r\0o\0k\0'
-string1end:
-
-_string2:
- .db string2end - _string2
- .db DSCR_STRING_TYPE
- .ascii 'f\0x\0002\0l\0a\0f\0w\0'
-string2end:
+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
-