Files
ESP32-S3-LCD-1.3/include/modules/console.h
T

26 lines
577 B
C++

/**
* Serial console (Controller B) - line reader + command chain.
*
* Commands live in their modules (LinkPeer, Ota); this only splits lines and
* asks each handler in turn. `help` lists them.
*/
#ifndef CONSOLE_H
#define CONSOLE_H
#include <Arduino.h>
namespace Console {
typedef bool (*handler_t)(const char* line);
/** Register up to 8 handlers; each returns true if it consumed the line. */
void addHandler(handler_t h);
/** Non-blocking: read whatever is pending on Serial, dispatch complete lines. */
void tick();
} // namespace Console
#endif // CONSOLE_H