summaryrefslogtreecommitdiffstats
path: root/common/keyboard.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-11-24 05:50:33 +0100
committertmk <nobody@nowhere>2014-11-24 05:50:33 +0100
commit363950982a291c3bfa03ac6362061b1d37dc06b0 (patch)
treec46fc53fe00137ced3c8edd3d0766ee844f77516 /common/keyboard.h
parenteb90ed6238426db9367e294abfaefb5de07564f5 (diff)
parent60096e11c77980ca6b54674c5b68248e8aa15d8d (diff)
downloadqmk_firmware-363950982a291c3bfa03ac6362061b1d37dc06b0.tar.gz
qmk_firmware-363950982a291c3bfa03ac6362061b1d37dc06b0.tar.xz
Merge branch 'rn42' into merge_rn42
Conflicts: .gitignore common.mk common/debug_config.h common/print.h
Diffstat (limited to 'common/keyboard.h')
-rw-r--r--common/keyboard.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/common/keyboard.h b/common/keyboard.h
index d1a922420..6442716fc 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