summaryrefslogtreecommitdiff
path: root/libusb/include
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/include')
-rw-r--r--libusb/include/libusb/tusb_helpers.h10
-rwxr-xr-xlibusb/include/libusb/tusb_helpers.h.gen29
-rw-r--r--libusb/include/libusb/usb_common.h2
3 files changed, 24 insertions, 17 deletions
diff --git a/libusb/include/libusb/tusb_helpers.h b/libusb/include/libusb/tusb_helpers.h
index a250ca7..0c35f62 100644
--- a/libusb/include/libusb/tusb_helpers.h
+++ b/libusb/include/libusb/tusb_helpers.h
@@ -1,7 +1,7 @@
-/* Generated by `./libusb/include/libusb/tusb_helpers.h.gen `. DO NOT EDIT! */
+/* 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>
+ * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
*
* SPDX-License-Identifier: MIT
*
@@ -36,16 +36,16 @@
* dated 2000-03-29. There is no longer any mention of this on usb.org, but I found a copy at
* http://www.baiheee.com/Documents/090518/090518112619/USB_LANGIDs.pdf
*
- * So how does the USB-IF defined LANGIDs these days?
+ * So if they don't publish that anymore, how does the USB-IF define LANGIDs these days?
*
* https://www.usb.org/deprecated-links-and-tools says "To get the latest LANGID definitions go to
* https://docs.microsoft.com/en-us/windows/desktop/intl/language-identifier-constants-and-strings. This
* page will change as new LANGIDs are added." That page has no list of LANGIDs, but says "For the
* predefined primary language identifiers with their valid sublanguage identifiers, see
* [\[MS-LCID\]: Windows Language Code Identifier (LCID)
- * Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-565326e84c37f)."
+ * Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f)."
* That page at the time of this writing as a PDF marked as version 16.0, dated 2024-04-24:
- * https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf
+ * https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MS-LCID/%5bMS-LCID%5d.pdf
* [MS-LCID] defines an LCID as a 32-bit value consisting of a 16-bit a "Language ID", a 4-bit "Sort
* ID", and 12 reserved bits.
*
diff --git a/libusb/include/libusb/tusb_helpers.h.gen b/libusb/include/libusb/tusb_helpers.h.gen
index 326ca22..1de1d09 100755
--- a/libusb/include/libusb/tusb_helpers.h.gen
+++ b/libusb/include/libusb/tusb_helpers.h.gen
@@ -7,7 +7,7 @@ echo "/* Generated by \`$0 $*\`. DO NOT EDIT! */"
cat <<'EOT'
/* libusb/tusb_helpers.h - Preprocessor macros that I think should be included in TinyUSB
*
- * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+ * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
*
* SPDX-License-Identifier: MIT
*
@@ -42,16 +42,16 @@ cat <<'EOT'
* dated 2000-03-29. There is no longer any mention of this on usb.org, but I found a copy at
* http://www.baiheee.com/Documents/090518/090518112619/USB_LANGIDs.pdf
*
- * So how does the USB-IF defined LANGIDs these days?
+ * So if they don't publish that anymore, how does the USB-IF define LANGIDs these days?
*
* https://www.usb.org/deprecated-links-and-tools says "To get the latest LANGID definitions go to
* https://docs.microsoft.com/en-us/windows/desktop/intl/language-identifier-constants-and-strings. This
* page will change as new LANGIDs are added." That page has no list of LANGIDs, but says "For the
* predefined primary language identifiers with their valid sublanguage identifiers, see
* [\[MS-LCID\]: Windows Language Code Identifier (LCID)
- * Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-565326e84c37f)."
+ * Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f)."
* That page at the time of this writing as a PDF marked as version 16.0, dated 2024-04-24:
- * https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf
+ * https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MS-LCID/%5bMS-LCID%5d.pdf
* [MS-LCID] defines an LCID as a 32-bit value consisting of a 16-bit a "Language ID", a 4-bit "Sort
* ID", and 12 reserved bits.
*
@@ -65,17 +65,24 @@ cat <<'EOT'
*/
EOT
if [[ ! -f 3rd-party/MS-LCID.pdf || 3rd-party/MS-LCID.pdf -ot $0 ]]; then
- wget --no-use-server-timestamps -O 3rd-party/MS-LCID.pdf 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf'
+ wget --no-use-server-timestamps -O 3rd-party/MS-LCID.pdf 'https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MS-LCID/%5bMS-LCID%5d.pdf'
fi
if [[ ! -f 3rd-party/MS-LCID.txt || 3rd-party/MS-LCID.txt -ot 3rd-party/MS-LCID.pdf ]]; then
pdftotext -layout 3rd-party/MS-LCID.pdf
fi
-<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 |
- sed -E 's/(..) (..) (.*)/#define LANGID_\3 0x\2\1/' | # format them as '#define LANGID_UPPER_STR 0xSUBPRI'
- column --table --output-separator=' '
+{
+ {
+ # find the lines we're interested in
+ grep -E '^\s*0x[0-9A-F]{4}\s+[a-z]' | sed 's/,.*//' | grep -v reserved
+ } | {
+ # format them as 'PRIhex SUBhex UPPER_STR'
+ sed -E 's/^\s*0x(..)(..)\s+(\S.*)/\2 \1 \3/p' | tr '[:lower:]-' '[:upper:]_'
+ } | sort | {
+ # format them as '#define LANGID_UPPER_STR 0xSUBPRI'
+ sed -E 's/(..) (..) (.*)/#define LANGID_\3 0x\2\1/' |
+ column --table --output-separator=' '
+ }
+} <3rd-party/MS-LCID.txt
cat <<'EOT'
/** USB 2.0 ยง9.6.6 "Endpoint", field bEndpointAddress, bit 7 */
diff --git a/libusb/include/libusb/usb_common.h b/libusb/include/libusb/usb_common.h
index e31b3ab..9fe0794 100644
--- a/libusb/include/libusb/usb_common.h
+++ b/libusb/include/libusb/usb_common.h
@@ -27,7 +27,7 @@ enum {
/* Globals ********************************************************************/
extern uint8_t cfgnum_std;
-void usb_common_earlyinit(void);
+void usb_common_earlyinit(uint16_t *serial, uint8_t serial_bytelen);
void usb_common_lateinit(void);
COROUTINE usb_common_cr(void *arg);