Go to file
Matthijs Kooijman acb1a47a78 Expose serial settings from CDC virtual serial port
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-31 13:40:43 +02:00
bootloaders Bootloaders: wrong #ifdefs, should be defined() not just tested (i.e. noteq 0) 2015-07-14 16:16:31 +02:00
cores/arduino Expose serial settings from CDC virtual serial port 2015-07-31 13:40:43 +02:00
firmwares Merge branch 'master' into ide-1.5.x 2014-09-16 12:19:39 +02:00
libraries rework HID-based libraries and add Due fallback 2015-07-16 13:13:53 +02:00
variants Removed a handful of SVN expansion keywords. See #277 2015-07-03 10:38:07 +02:00
boards.txt Yun bootloader without blink 2015-07-07 17:15:42 +02:00
platform.keys.rewrite.txt Compiler: cores files get compiled under "core", libraries under "libraries". Fixes #2997 2015-06-29 15:11:45 +02:00
platform.txt Enable C11 support 2015-07-16 13:06:10 +02:00
programmers.txt Support the Atmel STK500 development board for ISP 2015-06-05 18:43:25 +02:00