Remove HID interface related string descriptors.

This commit is contained in:
László Monda
2016-02-29 15:35:59 +01:00
parent 0247fe17b1
commit f62a96778f
5 changed files with 4 additions and 81 deletions

View File

@@ -56,7 +56,7 @@ uint8_t UsbConfigurationDescriptor[USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH] =
USB_MOUSE_CLASS,
USB_MOUSE_SUBCLASS,
USB_MOUSE_PROTOCOL,
USB_STRING_DESCRIPTOR_ID_MOUSE,
USB_STRING_DESCRIPTOR_NONE,
// Mouse HID descriptor
@@ -90,7 +90,7 @@ uint8_t UsbConfigurationDescriptor[USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH] =
USB_KEYBOARD_CLASS,
USB_KEYBOARD_SUBCLASS,
USB_KEYBOARD_PROTOCOL,
USB_STRING_DESCRIPTOR_ID_KEYBOARD,
USB_STRING_DESCRIPTOR_NONE,
// Keyboard HID descriptor
@@ -124,7 +124,7 @@ uint8_t UsbConfigurationDescriptor[USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH] =
USB_GENERIC_HID_CLASS,
USB_GENERIC_HID_SUBCLASS,
USB_GENERIC_HID_PROTOCOL,
USB_STRING_DESCRIPTOR_ID_GENERIC_HID,
USB_STRING_DESCRIPTOR_NONE,
// Generic HID descriptor
@@ -224,18 +224,12 @@ uint32_t UsbStringDescriptorLengths[USB_STRING_DESCRIPTOR_COUNT] = {
sizeof(UsbLanguageListStringDescriptor),
sizeof(UsbManufacturerString),
sizeof(UsbProductString),
sizeof(UsbMouseString),
sizeof(UsbKeyboardString),
sizeof(UsbGenericHidString),
};
uint8_t *UsbStringDescriptors[USB_STRING_DESCRIPTOR_COUNT] = {
UsbLanguageListStringDescriptor,
UsbManufacturerString,
UsbProductString,
UsbMouseString,
UsbKeyboardString,
UsbGenericHidString,
};
usb_status_t USB_DeviceGetDeviceDescriptor(

View File

@@ -38,7 +38,7 @@
// String descriptors
#define USB_STRING_DESCRIPTOR_COUNT (6U)
#define USB_STRING_DESCRIPTOR_COUNT (3U)
#define USB_LANGUAGE_LIST_STRING_DESCRIPTOR_LENGTH (4U)
#define USB_MANUFACTURER_STRING_DESCRIPTOR_LENGTH (58U)
@@ -47,9 +47,6 @@
#define USB_STRING_DESCRIPTOR_ID_SUPPORTED_LANGUAGES 0U
#define USB_STRING_DESCRIPTOR_ID_MANUFACTURER 1U
#define USB_STRING_DESCRIPTOR_ID_PRODUCT 2U
#define USB_STRING_DESCRIPTOR_ID_MOUSE 3U
#define USB_STRING_DESCRIPTOR_ID_KEYBOARD 4U
#define USB_STRING_DESCRIPTOR_ID_GENERIC_HID 5U
// Functions:

View File

@@ -67,26 +67,3 @@ uint8_t UsbGenericHidReportDescriptor[USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH]
0x91U, 0x02U, /* Input (Data, Variable, Absolute) */
0xC0U, /* End collection */
};
uint8_t UsbGenericHidString[USB_GENERIC_HID_STRING_DESCRIPTOR_LENGTH] = {
sizeof(UsbGenericHidString),
USB_DESCRIPTOR_TYPE_STRING,
'H', 0x00U,
'I', 0x00U,
'D', 0x00U,
' ', 0x00U,
'G', 0x00U,
'E', 0x00U,
'N', 0x00U,
'E', 0x00U,
'R', 0x00U,
'I', 0x00U,
'C', 0x00U,
' ', 0x00U,
'D', 0x00U,
'E', 0x00U,
'V', 0x00U,
'I', 0x00U,
'C', 0x00U,
'E', 0x00U,
};

View File

@@ -77,27 +77,3 @@ uint8_t UsbKeyboardReportDescriptor[USB_KEYBOARD_REPORT_DESCRIPTOR_LENGTH] = {
0x81U, 0x00U, // Input (Data, Array), Key arrays (6U bytes)
0xC0U, // End collection
};
uint8_t UsbKeyboardString[USB_KEYBOARD_STRING_DESCRIPTOR_LENGTH] = {
sizeof(UsbKeyboardString),
USB_DESCRIPTOR_TYPE_STRING,
'H', 0x00U,
'I', 0x00U,
'D', 0x00U,
' ', 0x00U,
'K', 0x00U,
'E', 0x00U,
'Y', 0x00U,
'B', 0x00U,
'O', 0x00U,
'A', 0x00U,
'R', 0x00U,
'D', 0x00U,
' ', 0x00U,
'D', 0x00U,
'E', 0x00U,
'V', 0x00U,
'I', 0x00U,
'C', 0x00U,
'E', 0x00U,
};

View File

@@ -75,24 +75,3 @@ uint8_t UsbMouseReportDescriptor[USB_MOUSE_REPORT_DESCRIPTOR_LENGTH] = {
0xC0U, // End collection, Close Pointer collection
0xC0U // End collection, Close Mouse collection
};
uint8_t UsbMouseString[USB_MOUSE_STRING_DESCRIPTOR_LENGTH] = {
sizeof(UsbMouseString),
USB_DESCRIPTOR_TYPE_STRING,
'H', 0x00U,
'I', 0x00U,
'D', 0x00U,
' ', 0x00U,
'M', 0x00U,
'O', 0x00U,
'U', 0x00U,
'S', 0x00U,
'E', 0x00U,
' ', 0x00U,
'D', 0x00U,
'E', 0x00U,
'V', 0x00U,
'I', 0x00U,
'C', 0x00U,
'E', 0x00U,
};