Partly revert commit 8bb3b2339f

Arduino integrated the function now as normal fix
This commit is contained in:
NicoHood 2016-01-04 18:13:30 +01:00
parent bb0960c9f3
commit 14f52f1879
2 changed files with 5 additions and 5 deletions

View file

@ -152,7 +152,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
// except the host tries to send more then 32k bytes.
// We dont have that much ram anyways.
if (length == featureLength) {
USB_RecvControlLong(featureReport, featureLength);
USB_RecvControl(featureReport, featureLength);
// Block until data is read (make length negative)
disableFeatureReport();
@ -164,7 +164,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
// Output (set led states)
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
if(length == sizeof(leds)){
USB_RecvControlLong(&leds, length);
USB_RecvControl(&leds, length);
return true;
}
}
@ -173,7 +173,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
else if(setup.wValueH == HID_REPORT_TYPE_INPUT)
{
if(length == sizeof(_keyReport)){
USB_RecvControlLong(&_keyReport, length);
USB_RecvControl(&_keyReport, length);
return true;
}
}

View file

@ -123,7 +123,7 @@ bool RawHID_::setup(USBSetup& setup)
// except the host tries to send more then 32k bytes.
// We dont have that much ram anyways.
if (length == featureLength) {
USB_RecvControlLong(featureReport, featureLength);
USB_RecvControl(featureReport, featureLength);
// Block until data is read (make length negative)
disableFeatureReport();
@ -135,7 +135,7 @@ bool RawHID_::setup(USBSetup& setup)
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
if(!dataAvailable && length <= dataLength){
// Write data to fit to the end (not the beginning) of the array
USB_RecvControlLong(data + dataLength - length, length);
USB_RecvControl(data + dataLength - length, length);
dataAvailable = length;
return true;
}