Age | Commit message (Collapse) | Author |
|
In an excess of confidence, these defines were added to Leonardo's variant.h
3rd party boards sometimes avoid inheriting this variant but they still define USBCON, thus breaking the build
|
|
|
|
As I was not able to base the return types of `begin()` & `end()` off the c_str() function, I have changed the source so the features can be used by C++98 code, while still allowing ranged loops in C++11.
|
|
This will allow using the String library in a ranged for loop:
```C++
String s = "Hi, this is a test";
for( char c : s )
Serial.print( c );
```
|
|
This avoids dealing with ZLP’s in USB_Send, because the max packet size
will be EP size - 1.
|
|
Replaces #4280, only checks for the bootloader once
Tested with Hoodloader2, should work with every LUFA-derived bootloader released after 2014 (.apitable_signatures section must be placed at end of the flash)
BootloaderAPITable.S :
.global BootloaderAPI_Signatures
BootloaderAPI_Signatures:
.long BOOT_START_ADDR ; Start address of the bootloader
.word 0xDF00 ; Signature for the CDC class bootloader
.word 0xDCFB ; Signature for a LUFA class bootloader
makefile:
BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8)
|
|
|
|
Avoid using the overload of print() for signed integer since a negative value is not allowed here.
This results in a smaller (unless print(int) is used somewhere else in the program) and faster code because the overload for unsigned integer is simpler.
|
|
|
|
The current code is very verbose and a painful to maintain (Change ISR implementation in 20 different places? No Thanks!).
(This was originally part of #4519, but we all agreeded it deserved it's own PR)
|
|
the delay fails
|
|
Fix #4325
|
|
|
|
|
|
|
|
Stream::parseInt & Stream::parseFloat previously had protected
overloads which allowed skipping a custom character. This commit
brings this feature to the public interface.
To keep the public API simpler, the single paramter overload remains
protected. However its functionality is available in the public
interface using the two parameter overload.
|
|
Its default is SKIP_ALL which reflects previous versions.
However SKIP_NONE, and SKIP_WHITESPACE can refine this behaviour.
A parameter used in the protected overloads of parseInt/Float has been
changed from `skipChar` to `ignore`.
|
|
multiple decimals '.' in the stream. Only one can be accepted for
valid decimal numbers.
|
|
prefixed by an '.' character. Previously the preceeding zero must be
present: '0.'
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
For details see:
https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
The method
int8_t PluggableUSB::addFunction(PUSBListNode *, uint8_t *)
has been changed to
bool PluggableUSB::plug(PUSBListNode *node)
since both EP and Interfaces are now saved directly into node
|
|
|
|
This slightly simplifies PluggableUSB API.
|
|
|
|
|
|
Timer is declared above, so nothing is missing here.
|
|
|
|
|
|
|
|
|
|
fix pulseInLong considering overflow
|