Age | Commit message (Collapse) | Author |
|
This allows detecting when the USB host sends a break request and what
the value of the request was. See the comments in USBAPI.h for details.
This just modifies the avr core, not the sam core.
|
|
This allows a sketch to find out the settings chosen by the USB host
(computer) and act accordingly.
Other than reading the DTR flag and checking if the baudrate is 1200,
the regular CDC code doesn't actually use any of these settings.
By exposing these settings to the sketch, it can for example copy them
to the hardware UART, turning the Leonardo into a proper USB-to-serial
device. This can be useful to let the computer directly talk to whatever
device is connected to the hardware serial port (like an XBee module).
The Teensy core already supported these methods. This code was
independently developed, but the method names were chosen to match the
Teensy code, for compatibility (except that `dtr()` and `rtr()` return
`bool`, while the Teensy version return a `uint8_t`).
This change is applied to both the avr and sam cores, which have a very
similar CDC implementation.
|
|
was really too common
|
|
this is a rework of commit fbcf94801b8bba7f1c8c79cc7ae402b6b9dbb2d3
|
|
|
|
|
|
Fixes #2597
|
|
Close #1847
|
|
|
|
See:
https://github.com/arduino/Arduino/commit/9ac7e30252fce5b9dafde3288519b020b73c37bd#commitcomment-6718676
|
|
|
|
Fixes bug where Serial.read() would always return 0 as the first byte.
|
|
|
|
Read CDC data from USB FIFO on demand instead of in ISR.
Remove superfluous ring buffer.
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
|
|
Before, this decision was made in few different places, based on
sometimes different register defines.
Now, HardwareSerial.h decides wich UARTS are available, defines
USE_HWSERIALn macros and HardwareSerial.cpp simply checks these macros
(together with some #ifs to decide which registers to use for UART 0).
For consistency, USBAPI.h also defines a HAVE_CDCSERIAL macro when
applicable.
For supported targets, this should change any behaviour. For unsupported
targets, the error messages might subtly change because some checks are
moved or changed.
Additionally, this moves the USBAPI.h include form HardareSerial.h into
Arduino.h and raises an error when both CDC serial and UART0 are
available (previously this would silently use UART0 instead of CDC, but
there is not currently any Atmel chip available for which this would
occur).
|
|
|
|
Add two argument form of Serial_::begin
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
Make USB Serial_::begin() function take an unsigned long argument for
consistency with HardwareSerial.
Signed-off-by: Paul Brook <paul@nowt.org>
|
|
|
|
0bd6a2d20fb9664255b20e0db11dd4586ebe9007
|
|
So that they work on the Leonardo.
http://code.google.com/p/arduino/issues/detail?id=958
|
|
if no argument is given now checks left button by default to be consistent with press() and release() (thanks, David Mellis)
|
|
object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo)
|
|
is ready to send data.
Mostly useful for Leonardo - simple way to test whether the port is actually opened by an application and ready to receive data. For Serial objects attached to real UARTs always returns true.
|
|
Saves 924 bytes of Flash
|
|
(David Mellis). Also edit KeyboardReprogram example which was the only example using type()
|
|
releases (up to six each)
|
|
|
|
|
|
Was no longer being used and would be damn near impossible to support with the new scheme for handling modifiers and non-printing keyboard characters.
|
|
Changes mean that a single, persistent key report must be used so keys can be added or removed. Also reimplemented type() using the new methods.
|
|
|
|
to allow subclassing by Stream.
|
|
for type() to allow subclassing by Stream."
This reverts commit de1d5fc0cb82874c0dcb766c5fb27ab36c5cb32c.
|
|
to allow subclassing by Stream.
|
|
This fixes the issue Federico reported where bytes written by host but not read by sketch would cause serial connection to lock up. Ring buffer implementation is based on HardwareSerial.cpp.
Adds public accept() method to CDC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write behavior
|
|
Integrated rest of Peter's USB implementation
|