diff options
Diffstat (limited to 'libusb/include')
-rw-r--r-- | libusb/include/libusb/tusb_helpers.h | 14 | ||||
-rwxr-xr-x | libusb/include/libusb/tusb_helpers.h.gen | 7 |
2 files changed, 12 insertions, 9 deletions
diff --git a/libusb/include/libusb/tusb_helpers.h b/libusb/include/libusb/tusb_helpers.h index cd96357..2a6ee3c 100644 --- a/libusb/include/libusb/tusb_helpers.h +++ b/libusb/include/libusb/tusb_helpers.h @@ -1,4 +1,5 @@ -/* tusb_helpers.h - Preprocessor macros that I think should be included in TinyUSB +/* Generated by `./libusb/include/libusb/tusb_helpers.h.gen `. DO NOT EDIT! */ +/* libusb/tusb_helpers.h - Preprocessor macros that I think should be included in TinyUSB * * Copyright (c) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> * @@ -24,10 +25,11 @@ * */ -#ifndef _USB_HELPERS_H_ -#define _USB_HELPERS_H_ +#ifndef _LIBUSB_TUSB_HELPERS_H_ +#define _LIBUSB_TUSB_HELPERS_H_ -/* USB 2.0 §9.6.7 "String" says "The list of currently defined USB LANGIDs can be found at +/** + * USB 2.0 §9.6.7 "String" says "The list of currently defined USB LANGIDs can be found at * http://www.usb.org/developers/docs.html.", but that page 404s. * * Once upon a time the USB-IF (usb.org) published a "Language Identifiers (LANGIDs)" version 1.0, @@ -962,10 +964,10 @@ #define LANGID_QPS_PLOCM 0x09FF #define LANGID_QPS_PLOCM 0x09FF -/* USB 2.0 §9.6.6 "Endpoint", field bEndpointAddress, bit 7 */ +/** USB 2.0 §9.6.6 "Endpoint", field bEndpointAddress, bit 7 */ #define TUD_ENDPOINT_OUT 0x00 #define TUD_ENDPOINT_IN 0x80 #define TU_UTF16(str) u ## str -#endif /* _USB_HELPERS_H_ */ +#endif /* _LIBUSB_TUSB_HELPERS_H_ */ diff --git a/libusb/include/libusb/tusb_helpers.h.gen b/libusb/include/libusb/tusb_helpers.h.gen index 213eda0..9b917da 100755 --- a/libusb/include/libusb/tusb_helpers.h.gen +++ b/libusb/include/libusb/tusb_helpers.h.gen @@ -2,6 +2,7 @@ # -*- Mode: C -*- set -e exec >"${0%.gen}" +echo "/* Generated by \`$0 $*\`. DO NOT EDIT! */" cat <<'EOT' /* libusb/tusb_helpers.h - Preprocessor macros that I think should be included in TinyUSB * @@ -62,9 +63,9 @@ cat <<'EOT' * to sort their list of by most-significant-byte was a poor editorial choice. */ EOT -[ -f ${CMAKE_SOURCE_DIR?}/3rd-party/MS-LCID.pdf ] || wget -O ${CMAKE_SOURCE_DIR?}/3rd-party/MS-LCID.pdf 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf' -[ -f ${CMAKE_SOURCE_DIR?}/3rd-party/MS-LCID.txt ] || pdftotext -layout ${CMAKE_SOURCE_DIR?}/3rd-party/MS-LCID.pdf -<${CMAKE_SOURCE_DIR?}/3rd-party/MS-LCID.txt \ +[ -f 3rd-party/MS-LCID.pdf ] || wget -O 3rd-party/MS-LCID.pdf 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf' +[ -f 3rd-party/MS-LCID.txt ] || pdftotext -layout 3rd-party/MS-LCID.pdf +<3rd-party/MS-LCID.txt \ grep -E '^\s*0x[0-9A-F]{4}\s+[a-z]' | sed 's/,.*//' | grep -v reserved | # find the lines we're interested in sed -E 's/^\s*0x(..)(..)\s+(\S.*)/\2 \1 \3/p' | tr '[:lower:]-' '[:upper:]_' | # format them as 'PRIhex SUBhex UPPER_STR' sort | |