summaryrefslogtreecommitdiff
path: root/keyboard/ergodox_ez
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-06-17 22:06:58 -0400
committerJack Humbert <jack.humb@gmail.com>2016-06-17 22:06:58 -0400
commitde326d078d9de21acccfa96525597308a7ec036d (patch)
treec273683f8b1aea9bf96a08e92136b3a14bd61891 /keyboard/ergodox_ez
parentb70248fa2144d297504eedbc80a76dfdc40d9f1f (diff)
prevents ergodox_ez from waking up machine (#375)
Diffstat (limited to 'keyboard/ergodox_ez')
-rw-r--r--keyboard/ergodox_ez/matrix.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/keyboard/ergodox_ez/matrix.c b/keyboard/ergodox_ez/matrix.c
index 7266cca985..2a7dfba21d 100644
--- a/keyboard/ergodox_ez/matrix.c
+++ b/keyboard/ergodox_ez/matrix.c
@@ -106,6 +106,25 @@ void matrix_init(void)
}
+void matrix_power_up(void) {
+ mcp23018_status = init_mcp23018();
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+}
+
uint8_t matrix_scan(void)
{
if (mcp23018_status) { // if there was an error