Initial commit: Pico serial echo with BOOTSEL reboot
This commit is contained in:
16
picomap.cpp
Normal file
16
picomap.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include "pico/stdlib.h"
|
||||
#include "pico/bootrom.h"
|
||||
|
||||
int main() {
|
||||
stdio_init_all();
|
||||
|
||||
while (true) {
|
||||
int c = getchar_timeout_us(100000);
|
||||
if (c == 'p') {
|
||||
printf("p");
|
||||
} else if (c == 'b') {
|
||||
reset_usb_boot(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user