aboutsummaryrefslogtreecommitdiff
path: root/Demos/Host/ClassDriver/KeyboardHostWithParser
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-09-21 12:23:09 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-09-21 12:23:09 +0000
commite3d994f2f11be75b5407d4d5530e2ae82e6bc597 (patch)
tree1163c20f5035ee4df711d1c718ef310ba89d2b53 /Demos/Host/ClassDriver/KeyboardHostWithParser
parent4b066dbf2c885714f5a581d906473202fb8993fd (diff)
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@839 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host/ClassDriver/KeyboardHostWithParser')
-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 d87c0e72..d8980746 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++)