Commit Graph

22 Commits

Author SHA1 Message Date
Martino Facchin d1e46f9070 [AVR] Discover newer bootloader at runtime
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)
2016-04-06 17:41:06 +02:00
Nico a9005c7627 Fix compiler warning in CDC.cpp 2015-09-28 16:30:39 +02:00
Cristian Maglie 83a2836bbb Merge branch 'cdc-settings' of https://github.com/matthijskooijman/Arduino 2015-08-14 13:37:00 +02:00
NicoHood aa5a91f1a3 Added 16 byte endpoint support 2015-08-12 17:48:17 +02:00
NicoHood efea1e62f9 Made Magic Key Settings more flexible 2015-08-12 17:48:09 +02:00
Peter Van Hoyweghen 33f2757d4e Add Serial_::availableForWrite().
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-31 14:06:20 +02:00
Matthijs Kooijman d93c15ca5c Add Serial_::readBreak() to process SEND_BREAK requests
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-31 14:06:19 +02:00
Matthijs Kooijman 172717cf6c 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
Martino Facchin f2973ba389 save RAM content overridden by bootloader magic
and restore it in case of aborted reboot
use RAMEND-1 as suggested by @yyyc514 in PR #2474

of course it's not a real solution but we cannot force everyone to update the bootloader using an external programmer
2015-07-16 13:13:52 +02:00
Martino Facchin 512e369e80 rename Setup typedef struct to USBSetup
was really too common
2015-07-16 13:13:52 +02:00
Martino Facchin 32dd3a630b make CDC function non removable 2015-07-16 13:12:14 +02:00
Cristian Maglie 2a3bd8c978 Fixed trivial include error introduced in previous commit 2e3e539b... oops... 2014-09-12 16:58:05 +02:00
Cristian Maglie 5adeef3b5e Fix for upload problems on Arduino Leonardo (and derivatives) with OSX 10.9.4 2014-09-01 12:16:41 +02:00
Cristian Maglie 2632f64a75 Merge branch 'master' into ide-1.5.x 2014-06-19 17:01:53 +02:00
Cristian Maglie fe3196f9b6 Merge branch 'master' into HEAD 2014-05-30 10:54:14 +02:00
Cristian Maglie 8ffc54f4ca Merge branch 'usbcdc-improved' into ide-1.5.x 2014-05-26 13:38:07 +02:00
Cristian Maglie 94d9a9d1f8 Fixed other trivial warnings in AVR USB core.
See #1877
2014-04-20 23:08:55 +02:00
Cristian Maglie 79664a0800 Merge branch 'master' into ide-1.5.x 2013-09-30 16:25:10 +02:00
Cristian Maglie 2e0432e664 Move buffers into USB CDC (look #947 and #1369 for reference) 2013-07-27 12:06:42 +02:00
Cristian Maglie 77b2619a6c Merged latest changes in AVR arduino core 2012-10-18 18:47:50 +02:00
Cristian Maglie 828076175e Merge of arduino-1.0.1. Work in progress... 2012-05-23 09:22:52 +02:00
Cristian Maglie 822dcb0989 Created second level in hardware folder: hardware/PACKAGE/PLATFORM/...
Made some helper class for files filtering.
platforms.txt now contains only one platform at a time.
Some cleanup in Compiler and AvrDudeUploader classes.
2011-12-30 15:46:04 +01:00