RawHID >64 byte fix
This commit is contained in:
parent
9a113eb8d2
commit
8bb3b2339f
3 changed files with 8 additions and 5 deletions
|
|
@ -49,6 +49,9 @@ www.nicohood.de
|
||||||
Version History
|
Version History
|
||||||
===============
|
===============
|
||||||
```
|
```
|
||||||
|
2.4.2 Release (xx.xx.2016)
|
||||||
|
* RawHID >64 byte fix
|
||||||
|
|
||||||
2.4.1 Release (19.12.2015)
|
2.4.1 Release (19.12.2015)
|
||||||
* RawHID Improvements
|
* RawHID Improvements
|
||||||
* Added Keyboard Feature Report
|
* Added Keyboard Feature Report
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
|
||||||
// except the host tries to send more then 32k bytes.
|
// except the host tries to send more then 32k bytes.
|
||||||
// We dont have that much ram anyways.
|
// We dont have that much ram anyways.
|
||||||
if (length == featureLength) {
|
if (length == featureLength) {
|
||||||
USB_RecvControl(featureReport, featureLength);
|
USB_RecvControlLong(featureReport, featureLength);
|
||||||
|
|
||||||
// Block until data is read (make length negative)
|
// Block until data is read (make length negative)
|
||||||
disableFeatureReport();
|
disableFeatureReport();
|
||||||
|
|
@ -164,7 +164,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
|
||||||
// Output (set led states)
|
// Output (set led states)
|
||||||
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
|
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
|
||||||
if(length == sizeof(leds)){
|
if(length == sizeof(leds)){
|
||||||
USB_RecvControl(&leds, length);
|
USB_RecvControlLong(&leds, length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -173,7 +173,7 @@ bool BootKeyboard_::setup(USBSetup& setup)
|
||||||
else if(setup.wValueH == HID_REPORT_TYPE_INPUT)
|
else if(setup.wValueH == HID_REPORT_TYPE_INPUT)
|
||||||
{
|
{
|
||||||
if(length == sizeof(_keyReport)){
|
if(length == sizeof(_keyReport)){
|
||||||
USB_RecvControl(&_keyReport, length);
|
USB_RecvControlLong(&_keyReport, length);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ bool RawHID_::setup(USBSetup& setup)
|
||||||
// except the host tries to send more then 32k bytes.
|
// except the host tries to send more then 32k bytes.
|
||||||
// We dont have that much ram anyways.
|
// We dont have that much ram anyways.
|
||||||
if (length == featureLength) {
|
if (length == featureLength) {
|
||||||
USB_RecvControl(featureReport, featureLength);
|
USB_RecvControlLong(featureReport, featureLength);
|
||||||
|
|
||||||
// Block until data is read (make length negative)
|
// Block until data is read (make length negative)
|
||||||
disableFeatureReport();
|
disableFeatureReport();
|
||||||
|
|
@ -135,7 +135,7 @@ bool RawHID_::setup(USBSetup& setup)
|
||||||
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
|
else if(setup.wValueH == HID_REPORT_TYPE_OUTPUT){
|
||||||
if(!dataAvailable && length <= dataLength){
|
if(!dataAvailable && length <= dataLength){
|
||||||
// Write data to fit to the end (not the beginning) of the array
|
// 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;
|
dataAvailable = length;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue