23 #if FOCUS_WITHOUT_DOCS 24 #define FOCUS_HOOK(n, d) ({ \ 25 static kaleidoscope::Focus::HookNode _c = { \ 30 #define FOCUS_HOOK(n, d) ({ \ 31 static kaleidoscope::Focus::HookNode _c = { \ 40 typedef bool (*
Hook)(
const char *command);
43 const __FlashStringHelper *
docs;
49 void begin(
void)
final;
56 static void printColor(uint8_t r, uint8_t g, uint8_t b);
61 static bool helpHook(
const char *command);
66 static char command_[32];
68 static void loopHook(
bool is_post_clear);
69 static void drain(
void);
75 #define FOCUS_HOOK_HELP FOCUS_HOOK(Focus.helpHook, "help") 76 #define FOCUS_HOOK_VERSION FOCUS_HOOK(Focus.versionHook, "version") void begin(void) final
Definition: Focus.cpp:30
static void printSeparator(void)
Definition: Focus.cpp:102
Focus(void)
Definition: Focus.cpp:27
HookNode * next
Definition: Focus.h:44
const __FlashStringHelper * docs
Definition: Focus.h:43
static void printSpace(void)
Definition: Focus.cpp:86
struct kaleidoscope::Focus::HookNode HookNode
static void printColor(uint8_t r, uint8_t g, uint8_t b)
Definition: Focus.cpp:94
Hook handler
Definition: Focus.h:42
bool(* Hook)(const char *command)
Definition: Focus.h:40
Definition: Kaleidoscope.h:40
static bool versionHook(const char *command)
Definition: Focus.cpp:124
static void printNumber(uint16_t number)
Definition: Focus.cpp:90
static void printBool(bool b)
Definition: Focus.cpp:106
static bool helpHook(const char *command)
Definition: Focus.cpp:110
static void addHook(HookNode *new_node)
Definition: Focus.cpp:40