diff options
| author | Simon John <git@the-jedi.co.uk> | 2013-06-20 21:34:40 +0200 |
|---|---|---|
| committer | Sudar <sudar@sudarmuthu.com> | 2013-06-21 08:37:11 +0530 |
| commit | c284ec93dd939b4f8c4c0ab1eccf1516784de1dc (patch) | |
| tree | e5e2bf691f237d1320253485a62ce32c63f13991 | |
| parent | 4e22abe0dee5b76eed63bd18eb47d5cc2b16f212 (diff) | |
Add support for reseting "Micro" Arduino.
Micro can be reset using Leonardo reset functions itself. So call
Leonardo reset functions for Micro as well.
The reset function seems to have some issues for Micro and is not
100% reliable, like Leonardo. See comments in #30.
Fix #80
Fix #83
| -rw-r--r-- | HISTORY.md | 1 | ||||
| -rw-r--r-- | arduino-mk/Arduino.mk | 12 | ||||
| -rwxr-xr-x | bin/ard-reset-arduino | 4 |
3 files changed, 13 insertions, 4 deletions
@@ -6,6 +6,7 @@ The following is the rough list of changes that went into different versions. I ### 0.12.1 (in development) - Add $OBJDIR to the list of configuration that gets printed. Fix issue #77 - Add support for specifying optimization level. Fix issue #81 +- Add support for reseting "Micro" Arduino. Fix issue #80 (https://github.com/sej7278) ### 0.12.0 (2013-06-20) - Fix "generated_assembly" target, which got broken earlier. Fix issue #76 (https://github.com/matthijskooijman) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index fefde1e..edc36e5 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -380,8 +380,16 @@ endif ######################################################################## # Reset # +ifeq ($(BOARD_TAG),leonardo) + LEO_RESET = 1 +endif + +ifeq ($(BOARD_TAG),micro) + LEO_RESET = 1 +endif + ifndef RESET_CMD - ifeq ($(BOARD_TAG),leonardo) + ifdef LEO_RESET RESET_CMD = $(ARDMK_PATH)/ard-reset-arduino --leonardo \ $(ARD_RESET_OPTS) $(call get_arduino_port) else @@ -391,7 +399,7 @@ ifndef RESET_CMD endif ifndef WAIT_CONNECTION_CMD - ifeq ($(BOARD_TAG),leonardo) + ifdef LEO_RESET WAIT_CONNECTION_CMD = \ $(ARDMK_PATH)/wait-connection-leonardo $(call get_arduino_port) else diff --git a/bin/ard-reset-arduino b/bin/ard-reset-arduino index ba4cbd2..6269878 100755 --- a/bin/ard-reset-arduino +++ b/bin/ard-reset-arduino @@ -99,7 +99,7 @@ Specify the DTR pulse width in seconds. =item --leonardo -Reset a Leonardo. +Reset a Leonardo or Micro. =back @@ -115,7 +115,7 @@ Patches are welcome. Martin Oldfield, ex-atelier@mjo.tc -Support for Leonardo added by sej7278, https://github.com/sej7278 +Support for Leonardo/Micro added by sej7278, https://github.com/sej7278 Thanks to Daniele Vergini who suggested this to me, and supplied a command line version. |
