diff options
author | David Madison <dmadison@users.noreply.github.com> | 2019-02-17 14:18:23 -0500 |
---|---|---|
committer | David Madison <dmadison@users.noreply.github.com> | 2019-02-19 13:16:56 -0500 |
commit | 60b8a6df837a31bc9783cf34a98bcda9917b7ba6 (patch) | |
tree | 00e1b9c1f75c1c98ec03eb77e4062f45f2269acd /cores/arduino/USBCore.cpp | |
parent | 3364c6f736a77e60f26273af0bb021f4507dd1b9 (diff) |
Add XInput device and config descriptors
Diffstat (limited to 'cores/arduino/USBCore.cpp')
-rw-r--r-- | cores/arduino/USBCore.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 6146954..f2f5540 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -34,7 +34,6 @@ volatile u8 RxLEDPulse; /**< Milliseconds remaining for data Rx LED pulse */ extern const u16 STRING_LANGUAGE[] PROGMEM; extern const u8 STRING_PRODUCT[] PROGMEM; extern const u8 STRING_MANUFACTURER[] PROGMEM; -extern const DeviceDescriptor USB_DeviceDescriptorIAD PROGMEM; const u16 STRING_LANGUAGE[2] = { (3<<8) | (2+2), @@ -65,13 +64,6 @@ const u8 STRING_PRODUCT[] PROGMEM = USB_PRODUCT; const u8 STRING_MANUFACTURER[] PROGMEM = USB_MANUFACTURER; - -#define DEVICE_CLASS 0x02 - -// DEVICE DESCRIPTOR -const DeviceDescriptor USB_DeviceDescriptorIAD = - D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1); - //================================================================== //================================================================== @@ -451,8 +443,8 @@ int USB_RecvControl(void* d, int len) static bool SendConfiguration(int maxlen) { - // InitControl(maxlen); - // USB_SendControl( * Config Descriptor Here * ); + InitControl(maxlen); + USB_SendControl(TRANSFER_PGM, &USB_ConfigDescriptor, USB_ConfigDescriptorSize); return true; } @@ -474,7 +466,7 @@ bool SendDescriptor(USBSetup& setup) const u8* desc_addr = 0; if (USB_DEVICE_DESCRIPTOR_TYPE == t) { - desc_addr = (const u8*)&USB_DeviceDescriptorIAD; + desc_addr = (const u8*) &USB_DeviceDescriptor; } else if (USB_STRING_DESCRIPTOR_TYPE == t) { |