Add new attributes to the HID Report Parser and HID Host Mode Class driver to keep track of the largest report the device can send for buffer allocation purposes. Change MouseHostWithParser and KeyboardHostWithParser demos to only allocate the needed number of bytes.
This commit is contained in:
@@ -120,7 +120,7 @@ int main(void)
|
||||
case HOST_STATE_Configured:
|
||||
if (HID_Host_IsReportReceived(&Mouse_HID_Interface))
|
||||
{
|
||||
uint8_t MouseReport[50];
|
||||
uint8_t MouseReport[Keyboard_HID_Interface.State.LargestReportSize];
|
||||
HID_Host_ReceiveReport(&Mouse_HID_Interface, &MouseReport);
|
||||
|
||||
uint8_t LEDMask = LEDS_NO_LEDS;
|
||||
|
||||
Reference in New Issue
Block a user