Switch back to a slightly less efficient, but more trivial way to toggle pins

pull/877/head
Jesse Vincent 4 years ago committed by Gergely Nagy
parent 0216ce8587
commit 281594029e
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -95,10 +95,10 @@ class ATmega: public kaleidoscope::driver::keyscanner::Base<_KeyScannerProps> {
typename _KeyScannerProps::RowState any_debounced_changes = 0; typename _KeyScannerProps::RowState any_debounced_changes = 0;
for (uint8_t current_row = 0; current_row < _KeyScannerProps::matrix_rows; current_row++) { 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(); typename _KeyScannerProps::RowState hot_pins = readCols();
OUTPUT_TOGGLE(_KeyScannerProps::matrix_row_pins[current_row]); 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]); any_debounced_changes |= debounce(hot_pins, &state_.debounce[current_row]);

Loading…
Cancel
Save