diff options
Diffstat (limited to 'keyboards/dc01/arrow/matrix.c')
| -rw-r--r-- | keyboards/dc01/arrow/matrix.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c index dd5e2ee9c..1823138c3 100644 --- a/keyboards/dc01/arrow/matrix.c +++ b/keyboards/dc01/arrow/matrix.c | |||
| @@ -36,11 +36,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 36 | 36 | ||
| 37 | /* Set 0 if debouncing isn't needed */ | 37 | /* Set 0 if debouncing isn't needed */ |
| 38 | 38 | ||
| 39 | #ifndef DEBOUNCING_DELAY | 39 | #ifndef DEBOUNCE |
| 40 | # define DEBOUNCING_DELAY 5 | 40 | # define DEBOUNCE 5 |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #if (DEBOUNCING_DELAY > 0) | 43 | #if (DEBOUNCE > 0) |
| 44 | static uint16_t debouncing_time; | 44 | static uint16_t debouncing_time; |
| 45 | static bool debouncing = false; | 45 | static bool debouncing = false; |
| 46 | #endif | 46 | #endif |
| @@ -155,7 +155,7 @@ uint8_t matrix_scan(void) | |||
| 155 | 155 | ||
| 156 | // Set row, read cols | 156 | // Set row, read cols |
| 157 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { | 157 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { |
| 158 | # if (DEBOUNCING_DELAY > 0) | 158 | # if (DEBOUNCE > 0) |
| 159 | bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); | 159 | bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); |
| 160 | 160 | ||
| 161 | if (matrix_changed) { | 161 | if (matrix_changed) { |
| @@ -173,7 +173,7 @@ uint8_t matrix_scan(void) | |||
| 173 | 173 | ||
| 174 | // Set col, read rows | 174 | // Set col, read rows |
| 175 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | 175 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { |
| 176 | # if (DEBOUNCING_DELAY > 0) | 176 | # if (DEBOUNCE > 0) |
| 177 | bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); | 177 | bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); |
| 178 | if (matrix_changed) { | 178 | if (matrix_changed) { |
| 179 | debouncing = true; | 179 | debouncing = true; |
| @@ -187,8 +187,8 @@ uint8_t matrix_scan(void) | |||
| 187 | 187 | ||
| 188 | #endif | 188 | #endif |
| 189 | 189 | ||
| 190 | # if (DEBOUNCING_DELAY > 0) | 190 | # if (DEBOUNCE > 0) |
| 191 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { | 191 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { |
| 192 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | 192 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { |
| 193 | matrix[i] = matrix_debouncing[i]; | 193 | matrix[i] = matrix_debouncing[i]; |
| 194 | } | 194 | } |
| @@ -209,7 +209,7 @@ uint8_t matrix_scan(void) | |||
| 209 | 209 | ||
| 210 | bool matrix_is_modified(void) | 210 | bool matrix_is_modified(void) |
| 211 | { | 211 | { |
| 212 | #if (DEBOUNCING_DELAY > 0) | 212 | #if (DEBOUNCE > 0) |
| 213 | if (debouncing) return false; | 213 | if (debouncing) return false; |
| 214 | #endif | 214 | #endif |
| 215 | return true; | 215 | return true; |
