Added FLASH command
pull/13/head
ArjanteMarvelde 2022-09-22 21:07:13 +02:00
rodzic 810d6d63d0
commit 8c8aa93dd0
1 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -13,6 +13,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "pico/stdlib.h" #include "pico/stdlib.h"
#include "pico.h"
#include "pico/bootrom.h"
#include "uSDR.h" #include "uSDR.h"
#include "lcd.h" #include "lcd.h"
@ -67,6 +69,14 @@ void mon_init()
/*** Below the definitions of the shell commands, add where needed ***/ /*** Below the definitions of the shell commands, add where needed ***/
/*** ------------------------------------------------------------- ***/ /*** ------------------------------------------------------------- ***/
/*
* Reboots the Pico as a USB mass storage device, ready to be programmed
*/
void mon_flash(void)
{
reset_usb_boot(1<<PICO_DEFAULT_LED_PIN,0);
}
/* /*
* Dumps a defined range of Si5351 registers * Dumps a defined range of Si5351 registers
*/ */
@ -223,9 +233,10 @@ void mon_adc(void)
/* /*
* Command shell table, organize the command functions above * Command shell table, organize the command functions above
*/ */
#define NCMD 8 #define NCMD 9
shell_t shell[NCMD]= shell_t shell[NCMD]=
{ {
{"flash", 5, &mon_flash, "flash", "Reboots into USB bootloader mode"},
{"si", 2, &mon_si, "si <start> <nr of reg>", "Dumps Si5351 registers"}, {"si", 2, &mon_si, "si <start> <nr of reg>", "Dumps Si5351 registers"},
{"vfo", 3, &mon_vfo, "vfo <id>", "Dumps vfo[id] registers"}, {"vfo", 3, &mon_vfo, "vfo <id>", "Dumps vfo[id] registers"},
{"lt", 2, &mon_lt, "lt (no parameters)", "LCD test, dumps characterset on LCD"}, {"lt", 2, &mon_lt, "lt (no parameters)", "LCD test, dumps characterset on LCD"},