diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-06-06 12:09:56 -0700 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-06-06 12:09:56 -0700 |
| commit | faaaa134fd436be400aa2c7841b38907899d49a6 (patch) | |
| tree | 9deaea82d250f349b314ec89d369f068ddd75489 /keyboards/handwired/dactyl/matrix.c | |
| parent | fe6b8edd581c334a92a97c15faced95a12d5e882 (diff) | |
| download | qmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.gz qmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.zip | |
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
Diffstat (limited to 'keyboards/handwired/dactyl/matrix.c')
| -rw-r--r-- | keyboards/handwired/dactyl/matrix.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index f63cf1188..73423bfbd 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c | |||
| @@ -31,11 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 31 | 31 | ||
| 32 | /* Set 0 if debouncing isn't needed */ | 32 | /* Set 0 if debouncing isn't needed */ |
| 33 | 33 | ||
| 34 | #ifndef DEBOUNCING_DELAY | 34 | #ifndef DEBOUNCE |
| 35 | # define DEBOUNCING_DELAY 5 | 35 | # define DEBOUNCE 5 |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | #if (DEBOUNCING_DELAY > 0) | 38 | #if (DEBOUNCE > 0) |
| 39 | static uint16_t debouncing_time; | 39 | static uint16_t debouncing_time; |
| 40 | static bool debouncing = false; | 40 | static bool debouncing = false; |
| 41 | #endif | 41 | #endif |
| @@ -256,7 +256,7 @@ uint8_t matrix_scan(void) | |||
| 256 | 256 | ||
| 257 | #if (DIODE_DIRECTION == COL2ROW) | 257 | #if (DIODE_DIRECTION == COL2ROW) |
| 258 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { | 258 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { |
| 259 | # if (DEBOUNCING_DELAY > 0) | 259 | # if (DEBOUNCE > 0) |
| 260 | bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); | 260 | bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); |
| 261 | 261 | ||
| 262 | if (matrix_changed) { | 262 | if (matrix_changed) { |
| @@ -270,7 +270,7 @@ uint8_t matrix_scan(void) | |||
| 270 | 270 | ||
| 271 | #elif (DIODE_DIRECTION == ROW2COL) | 271 | #elif (DIODE_DIRECTION == ROW2COL) |
| 272 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | 272 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { |
| 273 | # if (DEBOUNCING_DELAY > 0) | 273 | # if (DEBOUNCE > 0) |
| 274 | bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); | 274 | bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); |
| 275 | 275 | ||
| 276 | if (matrix_changed) { | 276 | if (matrix_changed) { |
| @@ -284,8 +284,8 @@ uint8_t matrix_scan(void) | |||
| 284 | } | 284 | } |
| 285 | #endif | 285 | #endif |
| 286 | 286 | ||
| 287 | # if (DEBOUNCING_DELAY > 0) | 287 | # if (DEBOUNCE > 0) |
| 288 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { | 288 | if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { |
| 289 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | 289 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { |
| 290 | matrix[i] = matrix_debouncing[i]; | 290 | matrix[i] = matrix_debouncing[i]; |
| 291 | } | 291 | } |
| @@ -299,7 +299,7 @@ uint8_t matrix_scan(void) | |||
| 299 | 299 | ||
| 300 | bool matrix_is_modified(void) // deprecated and evidently not called. | 300 | bool matrix_is_modified(void) // deprecated and evidently not called. |
| 301 | { | 301 | { |
| 302 | #if (DEBOUNCING_DELAY > 0) | 302 | #if (DEBOUNCE > 0) |
| 303 | if (debouncing) return false; | 303 | if (debouncing) return false; |
| 304 | #endif | 304 | #endif |
| 305 | return true; | 305 | return true; |
