Age | Commit message (Collapse) | Author |
|
Sometimes Arduino-based USB devices don't work because some hardware
(like KVM switches) gets confused by the CDC sub-devices.
This change makes it relatively easy to disable CDC at compiletime.
Disabling it of course means that the serial console won't work anymore,
so you need to use the reset button when flashing.
CDC_DISABLED is also used in ArduinoCore-samd for the same purpose.
based on
https://github.com/gdsports/usb-metamorph/tree/master/USBSerPassThruLine
See also https://github.com/NicoHood/HID/issues/225 and
https://github.com/arduino/Arduino/issues/6387 and
https://forum.arduino.cc/index.php?topic=545288.msg3717028#msg3717028
|
|
Avoids unused variable warning if USB is enabled but pluggable USB is not
|
|
Based on code originally by Rob van der Veer <rob.c.veer@gmail.com>, this adds
USBDevice.isSuspended(), so user sketches can run custom code in their `loop`
methods after checking if the device is suspended or not.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
|
|
Instead of checking for the NEW_LUFA_SIGNATURE once in program memory and then
setting a flag which is used for further checks, a function is used that always
checks program memory directly.
If a flag is used, there's a slight chance that its location in RAM could fall
on MAGIC_KEY_POS. In this case, an aborted USB auto-reset sequence may fail.
|
|
|
|
Interface Association Descriptor" and "USB Interface Association Descriptor Device Class Code and Use Model"
|
|
See #5732 #4864 #4138 #3946
|
|
This reverts commit 817d700a7503b269f986075cad637ce56c657e37.
|
|
I was compiling with -Werror and this little error popped up
|
|
On Linux, setting autosuspend_delay_ms to N and control to auto allows the host pc to suspend the peripheral. Some Linux distro (Ubuntu, Mint) apply this behaviour by default.
If the sketch's prints where less frequent than N milliseconds the sketch prints would never arrive.
This patch allows sending a remote wakeup event to unsuspend the peripheral and allow the serial prints to be received.
|
|
|
|
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)
|
|
|
|
|
|
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
|
|
For details see:
https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
was really too common
|
|
this is a rework of commit fbcf94801b8bba7f1c8c79cc7ae402b6b9dbb2d3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
If the Start of Frame interrupt triggers just after the call
to USB_SendSpace in USB_Send then we can get data loss.
When the first bank is full and the second partially full,
the SOF handler will release the second bank via USB_Flush.
Data is then lost due to overflow as USB_Send continues writing data
to the now-closed bank.
Fix this by re-checking the FIFO status inside LockEP, immediately before
doing the data write.
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
See #1877
|
|
See #1877
|
|
See #1877
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo)
|
|
done to avoid driver problems for users who installed the pre-release bootloader and driver
|