summaryrefslogtreecommitdiff
path: root/keyboard/hhkb/matrix.c
diff options
context:
space:
mode:
authorDaniel Svensson <dsvensson@gmail.com>2016-05-29 16:39:27 +0200
committerJack Humbert <jack.humb@gmail.com>2016-05-29 10:39:27 -0400
commitb85dd60397e139f787ae26552145391f34686f4d (patch)
treebf77eddbf64cf3cea1600da2e8ac3c35ab472ff7 /keyboard/hhkb/matrix.c
parent536ad6813a452328d8b3437c55c1984f84eecc79 (diff)
downloadqmk_firmware-b85dd60397e139f787ae26552145391f34686f4d.tar.gz
qmk_firmware-b85dd60397e139f787ae26552145391f34686f4d.zip
Fix build errors (#359)
* brings gh60 up-to-date (needs testing) * brings hhkb up-to-date (needs testing) * brings jd45 up-to-date (needs testing)
Diffstat (limited to 'keyboard/hhkb/matrix.c')
-rw-r--r--keyboard/hhkb/matrix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboard/hhkb/matrix.c b/keyboard/hhkb/matrix.c
index 14fae0b82c..2dfb2f5e1f 100644
--- a/keyboard/hhkb/matrix.c
+++ b/keyboard/hhkb/matrix.c
@@ -188,6 +188,14 @@ void matrix_print(void)
}
}
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
+ count += bitpop16(matrix_get_row(r));
+ }
+ return count;
+}
+
void matrix_power_up(void) {
KEY_POWER_ON();
}