aboutsummaryrefslogtreecommitdiff
path: root/keyboards/meira/matrix.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-06-06 12:09:56 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-06-06 12:09:56 -0700
commitfaaaa134fd436be400aa2c7841b38907899d49a6 (patch)
tree9deaea82d250f349b314ec89d369f068ddd75489 /keyboards/meira/matrix.c
parentfe6b8edd581c334a92a97c15faced95a12d5e882 (diff)
downloadqmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.gz
qmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.zip
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
Diffstat (limited to 'keyboards/meira/matrix.c')
-rw-r--r--keyboards/meira/matrix.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c
index c1952f35f..030c91332 100644
--- a/keyboards/meira/matrix.c
+++ b/keyboards/meira/matrix.c
@@ -33,11 +33,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33#include "config.h" 33#include "config.h"
34#include "timer.h" 34#include "timer.h"
35 35
36#ifndef DEBOUNCING_DELAY 36#ifndef DEBOUNCE
37# define DEBOUNCING_DELAY 5 37# define DEBOUNCE 5
38#endif 38#endif
39 39
40#if (DEBOUNCING_DELAY > 0) 40#if (DEBOUNCE > 0)
41 static uint16_t debouncing_time; 41 static uint16_t debouncing_time;
42 static bool debouncing = false; 42 static bool debouncing = false;
43#endif 43#endif
@@ -132,7 +132,7 @@ uint8_t _matrix_scan(void)
132{ 132{
133 // Set col, read rows 133 // Set col, read rows
134 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { 134 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
135# if (DEBOUNCING_DELAY > 0) 135# if (DEBOUNCE > 0)
136 bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); 136 bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
137 if (matrix_changed) { 137 if (matrix_changed) {
138 debouncing = true; 138 debouncing = true;
@@ -144,8 +144,8 @@ uint8_t _matrix_scan(void)
144 144
145 } 145 }
146 146
147# if (DEBOUNCING_DELAY > 0) 147# if (DEBOUNCE > 0)
148 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 148 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
149 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 149 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
150 matrix[i] = matrix_debouncing[i]; 150 matrix[i] = matrix_debouncing[i];
151 } 151 }
@@ -276,5 +276,3 @@ static void unselect_cols(void)
276 _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW 276 _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
277 } 277 }
278} 278}
279
280