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:
25
components/console_wrapper/console.h
Normal file
25
components/console_wrapper/console.h
Normal 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
|
||||
Reference in New Issue
Block a user