From 281594029eee66fd742bd845e51514a60bda009d Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 11 Jul 2020 15:28:27 -0700 Subject: [PATCH] Switch back to a slightly less efficient, but more trivial way to toggle pins --- src/kaleidoscope/driver/keyscanner/ATmega.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kaleidoscope/driver/keyscanner/ATmega.h b/src/kaleidoscope/driver/keyscanner/ATmega.h index 90de72fe..8264fbca 100644 --- a/src/kaleidoscope/driver/keyscanner/ATmega.h +++ b/src/kaleidoscope/driver/keyscanner/ATmega.h @@ -95,10 +95,10 @@ class ATmega: public kaleidoscope::driver::keyscanner::Base<_KeyScannerProps> { typename _KeyScannerProps::RowState any_debounced_changes = 0; for (uint8_t current_row = 0; current_row < _KeyScannerProps::matrix_rows; current_row++) { + OUTPUT_TOGGLE(_KeyScannerProps::matrix_row_pins[current_row]); typename _KeyScannerProps::RowState hot_pins = readCols(); OUTPUT_TOGGLE(_KeyScannerProps::matrix_row_pins[current_row]); - OUTPUT_TOGGLE(_KeyScannerProps::matrix_row_pins[(current_row + 1) % _KeyScannerProps::matrix_rows]); any_debounced_changes |= debounce(hot_pins, &state_.debounce[current_row]);