1
0
Fork 0

Ad hoc fix of command API

This commit is contained in:
tmk 2014-07-01 04:02:10 +09:00
parent 4069776c02
commit 47bc3016d3
2 changed files with 27 additions and 11 deletions

View file

@ -18,10 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef COMMAND_H
#define COMMAND
/* 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);
/* This allows to extend commands. Return 0 when command is not processed. */
bool command_extra(uint8_t code);
#else
#define command_proc(code) false
#endif