mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
usb: Change supported LANGID in USB descriptor to be English US
Some versions of Windows will ignore the USB device serial number if the string is not delivered with LANGID = English US 0x0409. This is true regardless of the configured locale of the machine.
This commit is contained in:
parent
19367730c0
commit
3e0a9bc47e
@ -59,7 +59,7 @@ static uint8_t usb_serial_number[2 + PIOS_SYS_SERIAL_NUM_ASCII_LEN*2 + 3*2] = {
|
||||
static const struct usb_string_langid usb_lang_id = {
|
||||
.bLength = sizeof(usb_lang_id),
|
||||
.bDescriptorType = USB_DESC_TYPE_STRING,
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_UK),
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_US),
|
||||
};
|
||||
|
||||
static const uint8_t usb_vendor_id[28] = {
|
||||
|
@ -79,7 +79,7 @@ static uint8_t usb_serial_number[52] = {
|
||||
static const struct usb_string_langid usb_lang_id = {
|
||||
.bLength = sizeof(usb_lang_id),
|
||||
.bDescriptorType = USB_DESC_TYPE_STRING,
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_UK),
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_US),
|
||||
};
|
||||
|
||||
static const uint8_t usb_vendor_id[28] = {
|
||||
|
@ -59,7 +59,7 @@ static uint8_t usb_serial_number[2 + PIOS_SYS_SERIAL_NUM_ASCII_LEN*2 + 3*2] = {
|
||||
static const struct usb_string_langid usb_lang_id = {
|
||||
.bLength = sizeof(usb_lang_id),
|
||||
.bDescriptorType = USB_DESC_TYPE_STRING,
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_UK),
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_US),
|
||||
};
|
||||
|
||||
static const uint8_t usb_vendor_id[28] = {
|
||||
|
@ -300,7 +300,7 @@ struct usb_cdc_union_func_desc {
|
||||
uint8_t bSlaveInterface;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define USB_LANGID_ENGLISH_UK 0x0809
|
||||
#define USB_LANGID_ENGLISH_US 0x0409
|
||||
|
||||
struct usb_string_langid {
|
||||
uint8_t bLength;
|
||||
|
@ -79,7 +79,7 @@ static uint8_t usb_serial_number[52] = {
|
||||
static const struct usb_string_langid usb_lang_id = {
|
||||
.bLength = sizeof(usb_lang_id),
|
||||
.bDescriptorType = USB_DESC_TYPE_STRING,
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_UK),
|
||||
.bLangID = htousbs(USB_LANGID_ENGLISH_US),
|
||||
};
|
||||
|
||||
static const uint8_t usb_vendor_id[28] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user