There is no need to instantiate a SystemProfilerParser object
each time extractVIDAndPID is invoked.
Added also `synchronized` keword to avoid reentrance problems
if the method is being used in multiple threads.
The startup bash script lacked quotes in some places, causing it to
interpret part of the path to the splash image as the main class and
fail to start:
arduino: line 29: [: /home/a/Arduino: binary operator expected
Error: Could not find or load main class IDE.lib.splash.png
For the -splash option, simply adding quotes was not sufficient. If no
splash screen was to be used (so when $SPLASH was empty), using
"$SPLASH" would result in an empty argument being passed to java, which
was then interpreted by java as the name of the base class.
To allow spaces to occur in the -splash option, but also allow it to be
omitted entirely, options to java are now passed through the
$JAVA_OPTIONS array. By using the special "${JAVA_OPTIONS[@]}" syntax,
each element in the array is expanded into a single argument, even when
spaces are present inside (this is identical to what happens with "$@").
This fixes#3950
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.