Since the HID library adds some general HID definitions and structs, it is very useful to also include this in a custom library.
If you dupe the information you have problems of redeclaration.
Having those defintions inside the official HID library is essential for a good working additional HID API.
This commit just shows other that this option is available and not implemented.
You may use this to determine the Led Lights state of a keyboard or transmit data via RAWHID from the PC.
Quick usage guide:
int length = ((setup.wValueH << 8) | setup.wLength);
USB_RecvControl((uint8_t* data, USB_EP_SIZE); // Needs to be splitted into USB_EP_SIZE packets, not shown here. See HID Project.
Alternatively we can only pass the wIndex to getDescriptor but I suggest to just pass the pointer aka reference of the whole setup.
In guess (havent tested this) that this results in more or less the code size but its a) idential with the other functions and b) we late have more flexibility here.
The Code got a quick SerialKeyboard.ino test
The iterations in the for loop also use unsigned and the setup struct etc as well.
There was no change in HID required since we just init the inherited variables via constructor and the type is never mentioned.
A no brainer update.
Expose optional timeout parameter values of dhcp for user to adjust on
their code.
Currently if dhcp server is not available, code will block inside
DhcpClass::request_DHCP_lease() for 60s. Having this parameters exposed
user can specify their timeout requirements without changing the lib
code.
Change is backward compatible as parameters are optional and defaults to
existing values.
- Fix typos and formatting.
- Remove analog inputs part of Circuit comment in ChatServer and
AdvancedChatServer. The examples don't use these analog inputs.
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.
The check for available slot in PluggableUSB is done on the endpoint
and not on the number of plugged modules.
The modulesCount field is no longer useful and it has been removed.
This change allows the compiler to handle callbacks resolution.
Callbacks now must be implemented on the class that extends
PUSBListNode and this is forced by compiler by means of pure
virtual methods.
Also the calls to HID.interface() and HID.endpoint() can now
be simplified to interface() and endpoint() respectively since
the methods are no more static.