65uint32_t
parseNum(
const char *&p, uint8_t base);
70extern bool (*
hook)(
char cmd,
const char *args);
72static const uint8_t
LINE = 100;
79void holdInto(
bool (*busy)(
char cmd),
char *buf);
97inline void prof(uint8_t) {}
100inline void begin(
const char *) {}
105inline void print(
const char *) {}
108inline void frameStack(uint32_t *, uint32_t *) {}
110inline void prof(uint8_t) {}
The CHGame library's build switches.
The serial debug protocol.
Definition Debug.h:38
static const uint8_t LINE
The longest command line, in characters.
Definition Debug.h:72
void markRenderEnd()
Frame timing for P: call when drawing ends (before the flush).
uint32_t parseNum(const char *&p, uint8_t base)
Parse a number from a command's arguments, for a game's hook.
void holdWhile(bool(*busy)(char cmd))
holdInto() with a buffer of its own (which exists only in a game that calls this).
Definition Debug.h:82
void poll()
Read and answer commands: at the top of loop(), before nextFrame().
void print(const char *s)
Send text to the host as it is (no newline added).
void profStart()
Start a profiled frame (CHGAME_PROFILE builds): T reports averages per call.
void waitInput()
In the simulator, block until input may have arrived (elsewhere nothing).
void markUpdateStart()
Frame timing for P: call when the logic tick starts.
void markRenderStart()
Frame timing for P: call when drawing starts.
void frameStack(uint32_t *lo, uint32_t *hi)
Report a second stack's high-water mark in P (fstk=): frames drawn from inside a search,...
void begin(const char *hello)
Start the protocol: at the top of setup().
void holdInto(bool(*busy)(char cmd), char *buf)
Hold the game's commands while it is busy, in a caller's buffer.
void prof(uint8_t slot)
Charge the time since the previous prof() to a slot.
bool(* hook)(char cmd, const char *args)
The game's own commands, or nullptr.