X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fkeyboard.h;h=6442716fc754115037e3a03a833cf28b5588fb0b;hb=75a59e4d12a13efc03cacd85b394fcf1204aad76;hp=d1a922420b8483e01c6f50eedfcae4c83e96b711;hpb=eea3b699a6cf9976fc0179633feee6d079e5db78;p=max%2Ftmk_keyboard.git diff --git a/common/keyboard.h b/common/keyboard.h index d1a92242..6442716f 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) \ } @@ -62,6 +62,9 @@ void keyboard_init(void); void keyboard_task(void); void keyboard_set_leds(uint8_t leds); +__attribute__ ((weak)) void matrix_power_up(void) {} +__attribute__ ((weak)) void matrix_power_down(void) {} + #ifdef __cplusplus } #endif