RawHID >64 byte fix

This commit is contained in:
NicoHood 2015-12-19 02:00:42 +01:00
parent 9a113eb8d2
commit 8bb3b2339f
3 changed files with 8 additions and 5 deletions

View file

@ -49,6 +49,9 @@ www.nicohood.de
Version History
===============
```
2.4.2 Release (xx.xx.2016)
* RawHID >64 byte fix
2.4.1 Release (19.12.2015)
* RawHID Improvements
* Added Keyboard Feature Report

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_RecvControl(featureReport, featureLength);
USB_RecvControlLong(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_RecvControl(&leds, length);
USB_RecvControlLong(&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_RecvControl(&_keyReport, length);
USB_RecvControlLong(&_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_RecvControl(featureReport, featureLength);
USB_RecvControlLong(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_RecvControl(data + dataLength - length, length);
USB_RecvControlLong(data + dataLength - length, length);
dataAvailable = length;
return true;
}