Extract magic numbers from the device descriptor as macros.

This commit is contained in:
László Monda
2016-02-25 09:26:33 +01:00
parent 0160d17d64
commit cea9182113
4 changed files with 48 additions and 27 deletions

View File

@@ -8,8 +8,11 @@
// Macros:
#define USB_DEVICE_SPECIFIC_BCD_VERSION (0x0200U)
#define USB_DEVICE_DEMO_BCD_VERSION (0x0101U)
#define USB_VENDOR_ID 0x15A2U
#define USB_PRODUCT_ID 0x007EU
#define USB_DEVICE_SPECIFICATION_BCD_VERSION (0x0200U)
#define USB_DEVICE_RELEASE_NUMBER (0x0101U)
#define USB_DEVICE_CLASS (0x00U)
#define USB_DEVICE_SUBCLASS (0x00U)
@@ -27,6 +30,12 @@
#define USB_DEVICE_STRING_COUNT (5U)
#define USB_DEVICE_LANGUAGE_COUNT (1U)
#define USB_STRING_DESCRIPTOR_ID_SERIAL_NUMBER 0x00U
#define USB_STRING_DESCRIPTOR_ID_MANUFACTURER 0x01U
#define USB_STRING_DESCRIPTOR_ID_PRODUCT 0x02U
#define USB_STRING_DESCRIPTOR_ID_MOUSE 0x03U
#define USB_STRING_DESCRIPTOR_ID_KEYBOARD 0x04U
#define USB_COMPOSITE_CONFIGURE_INDEX (1U)
#define USB_COMPOSITE_INTERFACE_COUNT (USB_HID_KEYBOARD_INTERFACE_COUNT + USB_HID_MOUSE_INTERFACE_COUNT)