Skip to content

Instantly share code, notes, and snippets.

@sqrtroot
sqrtroot / main.cpp
Created August 22, 2021 20:44
Did you get sick of unplugging and replugging your raspberry pi pico. Repurpose the bootsel button, hold it for ~500ms and it will restart into usb boot mode!
#include <cstdio>
#include <hardware/gpio.h>
#include <hardware/regs/psm.h>
#include <hardware/structs/ioqspi.h>
#include <hardware/structs/sio.h>
#include <hardware/sync.h>
#include <pico/bootrom.h>
#include <pico/critical_section.h>
#include <pico/stdlib.h>
clear
echo"================================================="
echo"| |"
echo"| INS | HOME | PAGEUP |"
echo"| M4/AK | AWP | 5-7/REKT9 |"
echo"| |"
echo"================================================="
echo"| |"
echo"| DEL | END | PAGEDWN |"
echo"| SMOKE | BOOMNADE | FLASH |"