Fixed change usb config bug

In the standard atmel lib only one configuration was possible.
On a GETDESCRIPTOR request the board would always return the full buffer
with both configurations.

The USB driver requests each configuration one after another, using the
configuration index number.
The atmel lib did not support more than one USB configuration.
This commit is contained in:
Christina Quast committed 2015-02-20 14:35:36 +01:00
1 parent 6255ccca84
commit 49ba6bc1ba
7 files changed
+96 -21

No files matched your search

@@ -93,7 +93,7 @@ void HIDDKeyboardDriver_ConfigurationChangedHandler(uint8_t cfgnum)
if (USBD_HAL_IsHighSpeed() && pDescriptors->pHsConfiguration)
pDesc = (USBConfigurationDescriptor*)pDescriptors->pHsConfiguration;
else
pDesc = (USBConfigurationDescriptor*)pDescriptors->pFsConfiguration;
pDesc = (USBConfigurationDescriptor*)pDescriptors->pFsConfiguration[0];
HIDDKeyboard_ConfigureFunction((USBGenericDescriptor*)pDesc,
pDesc->wTotalLength);
}