aboutsummaryrefslogtreecommitdiffstats
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 34a85978a..79dd87014 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -123,6 +123,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;
/*
@@ -164,6 +171,9 @@ enum usb_interfaces {
CDI_INTERFACE,
#endif
+#if defined(JOYSTICK_ENABLE)
+ JOYSTICK_INTERFACE,
+#endif
TOTAL_INTERFACES
};
@@ -219,6 +229,10 @@ enum usb_endpoints {
CDC_IN_EPNUM = NEXT_EPNUM,
CDC_OUT_EPNUM = NEXT_EPNUM,
#endif
+#ifdef JOYSTICK_ENABLE
+ JOYSTICK_IN_EPNUM = NEXT_EPNUM,
+ JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
+#endif
};
#ifdef PROTOCOL_LUFA
@@ -243,6 +257,7 @@ enum usb_endpoints {
#define MIDI_STREAM_EPSIZE 64
#define CDC_NOTIFICATION_EPSIZE 8
#define CDC_EPSIZE 16
+#define JOYSTICK_EPSIZE 8
uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress);
#endif