aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBAPI.h
AgeCommit message (Collapse)Author
2015-09-20Fix CDC Serial buffer size determinationNico
2015-08-14Merge branch 'cdc-settings' of https://github.com/matthijskooijman/ArduinoCristian Maglie
2015-08-12Precised USB Endpoint definitionsNicoHood
2015-08-12Added 16 byte endpoint supportNicoHood
2015-07-31Add Serial_::availableForWrite().Peter Van Hoyweghen
This makes the CDC "Serial" object on the Leonardo and similar boards support this recently introduced method as well. The CDC code in the sam core is not changed.
2015-07-31Add Serial_::readBreak() to process SEND_BREAK requestsMatthijs Kooijman
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.
2015-07-31Expose serial settings from CDC virtual serial portMatthijs Kooijman
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.
2015-07-16rename Setup typedef struct to USBSetupMartino Facchin
was really too common
2015-07-16Add support for waking up a host via USB HIDMartino Facchin
this is a rework of commit fbcf94801b8bba7f1c8c79cc7ae402b6b9dbb2d3
2015-07-16Move EP defines to headerMartino Facchin
2015-07-16Remove HID core libraryMartino Facchin
2015-05-12RX and TX Serial buffer sizes can now be defined independentlyNico
Fixes #2597
2014-09-12Added license to USBAPI.hCristian Maglie
Close #1847
2014-06-19Merge branch 'master' into ide-1.5.xCristian Maglie
2014-06-19Fixed regression in USBAPI and CDC (xaljox)Cristian Maglie
See: https://github.com/arduino/Arduino/commit/9ac7e30252fce5b9dafde3288519b020b73c37bd#commitcomment-6718676
2014-06-13Merge branch 'master' into HEADCristian Maglie
2014-06-10Update USBAPI.hEmbedded Micro
Fixes bug where Serial.read() would always return 0 as the first byte.
2014-05-26Merge branch 'usbcdc-improved' into ide-1.5.xCristian Maglie
2014-05-24Improve CDC read codePaul Brook
Read CDC data from USB FIFO on demand instead of in ISR. Remove superfluous ring buffer. Signed-off-by: Paul Brook <paul@nowt.org>
2014-05-24improved USB write speedsJustin Rajewski
2014-01-22Centrally decide which hardware UARTS are availableMatthijs Kooijman
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).
2013-09-30Merge branch 'master' into ide-1.5.xCristian Maglie
2013-09-02USB CDC two argument begin()Paul Brook
Add two argument form of Serial_::begin Signed-off-by: Paul Brook <paul@nowt.org>
2013-09-02USB serial baud arg typePaul Brook
Make USB Serial_::begin() function take an unsigned long argument for consistency with HardwareSerial. Signed-off-by: Paul Brook <paul@nowt.org>
2013-07-27Move buffers into USB CDC (look #947 and #1369 for reference)Cristian Maglie
2013-07-26Fixed compile problem for Leonardo after ↵Cristian Maglie
0bd6a2d20fb9664255b20e0db11dd4586ebe9007
2012-06-14Adding write(str) and write(buf, size) for USB CDC.David A. Mellis
So that they work on the Leonardo. http://code.google.com/p/arduino/issues/detail?id=958
2012-05-15Mouse.isPressed() now checks only for left button by defaultZach Eveland
if no argument is given now checks left button by default to be consistent with press() and release() (thanks, David Mellis)
2012-05-01renamed Leonardo USB_ class to USBDevice_ to be unambiguous. renamed "USB" ↵Zach Eveland
object to "USBDevice" to prevent conflict with USB Host library (thanks Massimo)
2012-04-01added Boolean operators to HardwareSerial and CDC to test whether the port ↵Zach Eveland
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.
2012-03-28removed horrible multi-key Keyboard.press() and Keyboard.release() methodsZach Eveland
Saves 924 bytes of Flash
2012-03-28eliminated Keyboard.type() - unnecessary duplication of Keyboard.write() ↵Zach Eveland
(David Mellis). Also edit KeyboardReprogram example which was the only example using type()
2012-03-26added methods to Keyboard to handle multiple simultaneous key presses or ↵Zach Eveland
releases (up to six each)
2012-03-26added stub methods for begin() and end() to Mouse and KeyboardZach Eveland
2012-03-03Added Keyboard support for all modifier and all common non-printing keys.Zach Eveland
2012-03-03Removed support for key mapping in Keyboard.Zach Eveland
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.
2012-03-03added Keyboard methods press(), release(), and releaseAll()Zach Eveland
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.
2012-03-03fixed minor compilation warnings for LeonardoZach Eveland
2011-12-20changed Keyboard write() method to type(). Made write() an alias for type() ↵Zach Eveland
to allow subclassing by Stream.
2011-12-20Revert "changed Keyboard write() method to type(). Made write() an alias ↵Zach Eveland
for type() to allow subclassing by Stream." This reverts commit de1d5fc0cb82874c0dcb766c5fb27ab36c5cb32c.
2011-12-20changed Keyboard write() method to type(). Made write() an alias for type() ↵Zach Eveland
to allow subclassing by Stream.
2011-12-18added asynchronous buffering of received CDC charactersZach Eveland
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.
2011-09-16added Mouse.isPressed() methodZach Eveland
2011-09-16made some Keyboard methods privateZach Eveland
2011-09-13fixed Mouse button assignmentsZach Eveland
2011-09-12made Mouse.buttons() private. removed MOUSE_ALL macroZach Eveland
2011-08-30added Mouse press() and release()Zach Eveland
2011-08-30support for non-Leonardo boards is back!Zach Eveland
2011-08-30CDC and HID write() routines now return non-void - brought in line with new ↵Zach Eveland
write behavior
2011-08-14Serial via USB worksZach Eveland
Integrated rest of Peter's USB implementation