mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
[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.
This commit is contained in:
parent
214b260a82
commit
d13aadc7d5
@ -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)
|
||||
|
@ -84,7 +84,6 @@ protected:
|
||||
bool setup(USBSetup& setup, uint8_t interfaceNum);
|
||||
|
||||
private:
|
||||
HIDDescriptor hidInterface;
|
||||
uint8_t epType[1];
|
||||
|
||||
HIDDescriptorListNode* rootNode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user