mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 09:07:29 +00:00
usb serial debug interface & usb serial async msg (#2111)
* add serial_debug * not use OSS * add path print * add string print and vec * clean up * clean up * format * add an async blocking bool * add an async blocking bool - comment * protect the unexpected tx * naming * remove demo code
This commit is contained in:

committed by
GitHub

parent
bb1b703dc1
commit
b2da21b88a
@@ -1131,6 +1131,23 @@ static void cmd_sendpocsag(BaseSequentialStream* chp, int argc, char* argv[]) {
|
||||
chprintf(chp, "ok\r\n");
|
||||
}
|
||||
|
||||
static void cmd_asyncmsg(BaseSequentialStream* chp, int argc, char* argv[]) {
|
||||
const char* usage = "usage: asyncmsg x, x can be enable or disable\r\n";
|
||||
if (argc != 1) {
|
||||
chprintf(chp, usage);
|
||||
return;
|
||||
}
|
||||
if (strcmp(argv[0], "disable") == 0) {
|
||||
portapack::async_tx_enabled = false;
|
||||
chprintf(chp, "ok\r\n");
|
||||
} else if (strcmp(argv[0], "enable") == 0) {
|
||||
portapack::async_tx_enabled = true;
|
||||
chprintf(chp, "ok\r\n");
|
||||
} else {
|
||||
chprintf(chp, usage);
|
||||
}
|
||||
}
|
||||
|
||||
static const ShellCommand commands[] = {
|
||||
{"reboot", cmd_reboot},
|
||||
{"dfu", cmd_dfu},
|
||||
@@ -1162,6 +1179,7 @@ static const ShellCommand commands[] = {
|
||||
{"pmemreset", cmd_pmemreset},
|
||||
{"settingsreset", cmd_settingsreset},
|
||||
{"sendpocsag", cmd_sendpocsag},
|
||||
{"asyncmsg", cmd_asyncmsg},
|
||||
{NULL, NULL}};
|
||||
|
||||
static const ShellConfig shell_cfg1 = {
|
||||
|
Reference in New Issue
Block a user