Add a console with a reboot command

Couldn't just call the component "console" as that conflicted with the
ESP-IDF component, so opted for "console-wrapper".
This commit is contained in:
2023-05-15 18:32:34 +01:00
parent e4fa25a61e
commit 0634787df3
5 changed files with 96 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (c) Camden Dixie O'Brien
*/
#ifndef CONSOLE_H
#define CONSOLE_H
typedef int (*CommandFunc)(int argc, char **argv);
/**
* Initialize and start the console.
*/
void console_init(void);
/**
* Register a console command.
*
* The name, help and hint should all be null-terminated strings. Hint
* should list possible arguments.
*/
void console_register(
const char *name, const char *help, const char *hint, CommandFunc func);
#endif