X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fcommand.h;h=b57a6c1cedc504ae77862f5d1f12a9914ee8be22;hb=47bc3016d36cbfd83904fff5947acb6436dd37c3;hp=4888f5ee0bbcf5e4de53127e715cc57fc66ce665;hpb=f4125707399d11a7d80587659c464b9bcddb8c56;p=tmk_firmware.git diff --git a/common/command.h b/common/command.h index 4888f5e..b57a6c1 100644 --- a/common/command.h +++ b/common/command.h @@ -18,8 +18,18 @@ along with this program. If not, see . #ifndef COMMAND_H #define COMMAND -uint8_t command_proc(void); -/* This allows to extend commands. Return 0 when command is not processed. */ -uint8_t command_extra(void); +/* TODO: Refactoring */ +typedef enum { ONESHOT, CONSOLE, MOUSEKEY } command_state_t; +extern command_state_t command_state; + +/* This allows to extend commands. Return false when command is not processed. */ +bool command_extra(uint8_t code); +bool command_console_extra(uint8_t code); + +#ifdef COMMAND_ENABLE +bool command_proc(uint8_t code); +#else +#define command_proc(code) false +#endif #endif