Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enter bootloader by double tapping reset button #6

Merged
merged 6 commits into from
Mar 22, 2024

Conversation

zUnixorn
Copy link
Contributor

@zUnixorn zUnixorn commented Mar 20, 2024

Applicable Changes

  • Feature addition
  • Modification to behaviour of existing functionality (potential breaking change)
  • Modification to existing public APIs (potential breaking change)
  • Bug fix
  • User docs modification
  • Rust toolchain updates
  • Dependency updates
  • Workflow change (GitHub Actions)
  • Repository housekeeping (e.g. READMEs, licensing, templates, etc.)

Related Issues

#5

Description of Changes

Adds the option to enter the bootloader with a double tap of the reset button. This is useful for entering the RP2040 UF2 bootloader, if the regular boot button is hard to reach.

In the current implementation, the field bootloader_double_tap_reset was added to the keyboard macro. If the bootloader-double-tap-reset feature is enabled, this field can be set and optionally change the default timeout value (200ms).

Like:
#[keyboard(bootloader_double_tap_reset)]
or
#[keyboard(bootloader_double_tap_reset = <val>)]

Testing Instructions

  1. Enable the feature in the Cargo.toml and add bootloader_double_tap_reset to the keyboard macro.
  2. Compile firmware and flash onto a RP2040.
  3. Press the reset button two times in quick succession and check if the UF2 bootloader was entered.

Check-list

  • I have updated or added to the user docs where applicable
  • I have tested the changes on real hardware if applicable
  • The changes do not break compilations with other potentially related feature flags
  • Credit given where applicable

Copy link
Owner

@Univa Univa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

rumcake-macros/Cargo.toml Outdated Show resolved Hide resolved
rumcake/src/hw/mod.rs Outdated Show resolved Hide resolved
rumcake-macros/src/keyboard.rs Outdated Show resolved Hide resolved
rumcake/src/hw/mod.rs Outdated Show resolved Hide resolved
rumcake/src/hw/mod.rs Outdated Show resolved Hide resolved
@Univa Univa linked an issue Mar 20, 2024 that may be closed by this pull request
4 tasks
Copy link
Owner

@Univa Univa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more things, then I think this is good to merge.

rumcake-macros/src/keyboard.rs Outdated Show resolved Hide resolved
rumcake/src/hw/mod.rs Outdated Show resolved Hide resolved
@Univa Univa merged commit a5b5ff2 into Univa:main Mar 22, 2024
This pull request was closed.
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.

Feature: Double-Tap reset button to Enter bootloader
2 participants