Couldn't just call the component "console" as that conflicted with the ESP-IDF component, so opted for "console-wrapper".
26 lines
501 B
C
26 lines
501 B
C
/*
|
|
* 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
|