diff options
Diffstat (limited to 'keyboards/lily58/matrix.c')
| -rw-r--r-- | keyboards/lily58/matrix.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/lily58/matrix.c b/keyboards/lily58/matrix.c index fc42dd14d..328d16c77 100644 --- a/keyboards/lily58/matrix.c +++ b/keyboards/lily58/matrix.c | |||
| @@ -37,11 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 37 | # include "serial.h" | 37 | # include "serial.h" |
| 38 | #endif | 38 | #endif |
| 39 | 39 | ||
| 40 | #ifndef DEBOUNCING_DELAY | 40 | #ifndef DEBOUNCE |
| 41 | # define DEBOUNCING_DELAY 5 | 41 | # define DEBOUNCE 5 |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if (DEBOUNCING_DELAY > 0) | 44 | #if (DEBOUNCE > 0) |
| 45 | static uint16_t debouncing_time; | 45 | static uint16_t debouncing_time; |
| 46 | static bool debouncing = false; | 46 | static bool debouncing = false; |
| 47 | #endif | 47 | #endif |
| @@ -145,7 +145,7 @@ uint8_t _matrix_scan(void) | |||
| 145 | #if (DIODE_DIRECTION == COL2ROW) | 145 | #if (DIODE_DIRECTION == COL2ROW) |
| 146 | // Set row, read cols | 146 | // Set row, read cols |
| 147 | for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { | 147 | for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { |
| 148 | # if (DEBOUNCING_DELAY > 0) | 148 | # if (DEBOUNCE > 0) |
| 149 | bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); | 149 | bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); |
| 150 | 150 | ||
| 151 | if (matrix_changed) { | 151 | if (matrix_changed) { |
| @@ -162,7 +162,7 @@ uint8_t _matrix_scan(void) | |||
| 162 | #elif (DIODE_DIRECTION == ROW2COL) | 162 | #elif (DIODE_DIRECTION == ROW2COL) |
| 163 | // Set col, read rows | 163 | // Set col, read rows |
| 164 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | 164 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { |
| 165 | # if (DEBOUNCING_DELAY > 0) | 165 | # if (DEBOUNCE > 0) |
| 166 | bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); | 166 | bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); |
| 167 | if (matrix_changed) { | 167 | if (matrix_changed) { |
| 168 | debouncing = true; | 168 | debouncing = true; |
| @@ -175,8 +175,8 @@ uint8_t _matrix_scan(void) | |||
| 175 | } | 175 | } |
| 176 | #endif | 176 | #endif |
| 177 | 177 | ||
| 178 | # if (DEBOUNCING_DELAY > 0) | 178 | # if (DEBOUNCE > 0) |
| 179 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { | 179 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { |
| 180 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { | 180 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { |
| 181 | matrix[i+offset] = matrix_debouncing[i+offset]; | 181 | matrix[i+offset] = matrix_debouncing[i+offset]; |
| 182 | } | 182 | } |
