Skip to content

Conversation

@algernon
Copy link
Contributor

@algernon algernon commented May 1, 2017

There are some devices out there that can't be reset from software, and need a physical button pressed to put them into bootloader mode. On these devices, trying to reset them is not going to work, so it is best skipped.

As such, this little change adds a manualReset flag to the board options, which when set, allows Avr109._reset to return immediately, skipping the whole reset dance. As a consequence, boards with the flag set, will have to be reset by the user before calling the _upload (or avrgirl.flash) method.

Tested & works on the Shortcut keyboard, and fixes #111.

Please let me know if you don't like the name of the flag - or anything else with the pull request - and I'll update it accordingly!

There are some devices out there that can't be reset from software, and need a
physical button pressed to put them into bootloader mode. On these devices,
trying to reset them is not going to work, so it is best skipped.

As such, this little change adds a `manualReset` flag to the board options,
which when set, allows `Avr109._reset` to return immediately, skipping the whole
reset dance. As a consequence, boards with the flag set, will have to be reset
by the user before calling the `_upload` (or `avrgirl.flash`) method.

Tested & works on the Shortcut keyboard, and fixes #111.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
@coveralls
Copy link

coveralls commented May 1, 2017

Coverage Status

Coverage decreased (-0.3%) to 43.704% when pulling 2ff1478 on algernon:f/avr109-manualReset into c3fb4e3 on noopkat:master.

@noopkat noopkat merged commit 2ff1478 into noopkat:master May 14, 2017
@noopkat
Copy link
Owner

noopkat commented May 14, 2017

Hi @algernon!

This is a rad addition to avrgirl-arduino! Thank you so much for taking the time to learn the codebase in order to contribute. I have merged this, with a couple of extra checks around the flag, along with some brief documentation in the README.

That Shortcut keyboard is really cool! ✨

bitmoji

@algernon
Copy link
Contributor Author

Whoops, sorry for missing the instance options! Should've thought of that, too.

Thanks for taking the patch nevertheless.

@algernon algernon deleted the f/avr109-manualReset branch May 15, 2017 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for devices that require a manual reset

3 participants