X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fkeyboard.h;h=60f8a89d1d3a5703fe686286aaed8b3cc6d50338;hb=c67ae2a6b546c822759352586c14cd9dccbbe0ff;hp=d1a922420b8483e01c6f50eedfcae4c83e96b711;hpb=04fe78ee0a7fe9baed39f021799a3dbb24ebeb36;p=tmk_firmware.git diff --git a/common/keyboard.h b/common/keyboard.h index d1a9224..60f8a89 100644 --- a/common/keyboard.h +++ b/common/keyboard.h @@ -30,16 +30,16 @@ extern "C" { typedef struct { uint8_t col; uint8_t row; -} key_t; +} keypos_t; /* key event */ typedef struct { - key_t key; + keypos_t key; bool pressed; uint16_t time; } keyevent_t; -/* equivalent test of key_t */ +/* equivalent test of keypos_t */ #define KEYEQ(keya, keyb) ((keya).row == (keyb).row && (keya).col == (keyb).col) /* Rules for No Event: @@ -52,7 +52,7 @@ static inline bool IS_RELEASED(keyevent_t event) { return (!IS_NOEVENT(event) && /* Tick event */ #define TICK (keyevent_t){ \ - .key = (key_t){ .row = 255, .col = 255 }, \ + .key = (keypos_t){ .row = 255, .col = 255 }, \ .pressed = false, \ .time = (timer_read() | 1) \ }