From 66d3eabe42fa4590b111d3fe8442c0e556acedcd Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 1 Oct 2015 12:53:24 +0200 Subject: [HID] removed HIDDescriptor field The field is now built on-the-fly on the stack and sent over USB. This change increase Flash usage and decrease SRAM usage: before: 6114 / 241 after: 6152 / 216 (removed HIDDescriptor field) delta: +38 / -25 SRAM is a much more scarse resource and this change free up to about 10% of the "base" usage. --- libraries/HID/HID.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/HID/HID.cpp') diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index 574af6b..b7aab6c 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -26,7 +26,7 @@ HID_ HID; int HID_::getInterface(uint8_t* interfaceNum) { *interfaceNum += 1; // uses 1 - hidInterface = { + HIDDescriptor hidInterface = { D_INTERFACE(interface(), 1, 3, 0, 0), D_HIDREPORT(descriptorSize), D_ENDPOINT(USB_ENDPOINT_IN(endpoint()), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01) -- cgit v1.2.3-18-g5258