aboutsummaryrefslogtreecommitdiff
path: root/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2009-09-21 12:23:09 +0000
committerDean Camera <[email protected]>2009-09-21 12:23:09 +0000
commit242303c1607fca405d9407b9fab6fb78cae676e2 (patch)
tree1163c20f5035ee4df711d1c718ef310ba89d2b53 /Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
parent3ffa7543a05761a0c69144c9b66196b08d8f1249 (diff)
downloadqmk_firmware-242303c1607fca405d9407b9fab6fb78cae676e2.tar.gz
qmk_firmware-242303c1607fca405d9407b9fab6fb78cae676e2.zip
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.
Diffstat (limited to 'Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c')
-rw-r--r--Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index d87c0e72c3..d89807461c 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -120,7 +120,7 @@ int main(void)
case HOST_STATE_Configured:
if (HID_Host_IsReportReceived(&Keyboard_HID_Interface))
{
- uint8_t KeyboardReport[50];
+ uint8_t KeyboardReport[Keyboard_HID_Interface.State.LargestReportSize];
HID_Host_ReceiveReport(&Keyboard_HID_Interface, &KeyboardReport);
for (uint8_t ReportNumber = 0; ReportNumber < HIDReportInfo.TotalReportItems; ReportNumber++)