Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ App|Description

App|Description
---|---
[hello_double_tap](system/hello_double_tap) | On dev boards with a reset button (but no BOOTSEL), a magic number in RAM can be used to enter the USB bootloader, when the reset button is pressed twice quickly.
[hello_double_tap](system/hello_double_tap) | An LED blink with the `pico_bootsel_via_double_reset` library linked. This enters the USB bootloader when it detects the system being reset twice in quick succession, which is useful for boards with a reset button but no BOOTSEL button.
[narrow_io_write](system/narrow_io_write) | Demonstrate the effects of 8-bit and 16-bit writes on a 32-bit IO register.
[unique_board_id](system/unique_board_id) | Read the 64 bit unique ID from external flash, which serves as a unique identifier for the board.
### Timer
Expand Down
1 change: 0 additions & 1 deletion system/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if (NOT PICO_NO_HARDWARE)
add_subdirectory(double_tap_usb_boot)
add_subdirectory(narrow_io_write)
add_subdirectory(hello_double_tap)
add_subdirectory(unique_board_id)
Expand Down
13 changes: 0 additions & 13 deletions system/double_tap_usb_boot/CMakeLists.txt

This file was deleted.

36 changes: 0 additions & 36 deletions system/double_tap_usb_boot/double_tap_usb_boot.c

This file was deleted.

11 changes: 9 additions & 2 deletions system/hello_double_tap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ add_executable(hello_double_tap
hello_double_tap.c
)

# Double tap reset into bootrom is injected by linking with the double_tap_usb_boot library
# Double tap reset into bootrom is injected by linking with the
# pico_bootsel_via_double_reset library
target_link_libraries(hello_double_tap
pico_stdlib
double_tap_usb_boot
pico_bootsel_via_double_reset
)

# Entering the bootloader in this way also lets us specify a GPIO to be used
# as a bootloader activity LED:
target_compile_definitions(hello_double_tap PRIVATE
PICO_BOOTSEL_VIA_DOUBLE_RESET_ACTIVITY_LED=25
)

pico_add_extra_outputs(hello_double_tap)

# add url via pico_set_program_url
Expand Down
10 changes: 7 additions & 3 deletions system/hello_double_tap/hello_double_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@

#include "pico/stdlib.h"

// This is a regular old LED blinking example, however it is linked with double_tap_usb_boot
// so pressing reset quickly twice, will reset into USB bootloader
// This is a regular old LED blinking example, however it is linked with the
// `pico_bootsel_via_double_reset` library, so resetting the board twice
// quickly will enter the USB bootloader. This is useful for boards which have
// a reset button but no BOOTSEL, as long as you remember to always link the
// `pico_bootsel_via_double_reset` library!

int main() {
const uint LED_PIN = 21;
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
Expand Down