summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/usb_descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/usb_descriptor.h')
-rw-r--r--tmk_core/protocol/usb_descriptor.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index 5ae52735bd..bc62ebf26a 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -132,6 +132,13 @@ typedef struct {
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
#endif
+
+#ifdef JOYSTICK_ENABLE
+ // Joystick HID Interface
+ USB_Descriptor_Interface_t Joystick_Interface;
+ USB_HID_Descriptor_HID_t Joystick_HID;
+ USB_Descriptor_Endpoint_t Joystick_INEndpoint;
+#endif
} USB_Descriptor_Configuration_t;
/*
@@ -177,6 +184,9 @@ enum usb_interfaces {
INTERFACE_ID_WebUSB,
#endif
+#if defined(JOYSTICK_ENABLE)
+ JOYSTICK_INTERFACE,
+#endif
TOTAL_INTERFACES
};
@@ -239,6 +249,10 @@ enum usb_endpoints {
# define WEBUSB_IN_EPADDR (ENDPOINT_DIR_IN | WEBUSB_IN_EPNUM)
# define WEBUSB_OUT_EPADDR (ENDPOINT_DIR_OUT | WEBUSB_OUT_EPNUM)
#endif
+#ifdef JOYSTICK_ENABLE
+ JOYSTICK_IN_EPNUM = NEXT_EPNUM,
+ JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
+#endif
};
#ifdef PROTOCOL_LUFA
@@ -264,6 +278,7 @@ enum usb_endpoints {
#define CDC_NOTIFICATION_EPSIZE 8
#define CDC_EPSIZE 16
#define WEBUSB_EPSIZE 64
+#define JOYSTICK_EPSIZE 8
uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress);
#endif