aboutsummaryrefslogtreecommitdiff
path: root/firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/compiler.h
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2015-06-15 21:17:35 +0200
committerMatthijs Kooijman <matthijs@stdin.nl>2015-07-31 13:40:43 +0200
commitacb1a47a78ef96a5fcfbae9013dcc7d39e30292e (patch)
treee1181afbde193357d73c1cb97c7aafa32a8ec65a /firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/compiler.h
parent99a27d0bd8555f4b380e07ff2b7334ab6ae32841 (diff)
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.
Diffstat (limited to 'firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/compiler.h')
0 files changed, 0 insertions, 0 deletions