aboutsummaryrefslogtreecommitdiff
path: root/keyboards/sx60
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/sx60
parentfe6b8edd581c334a92a97c15faced95a12d5e882 (diff)
downloadqmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.gz
qmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.zip
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
Diffstat (limited to 'keyboards/sx60')
-rwxr-xr-xkeyboards/sx60/config.h2
-rw-r--r--keyboards/sx60/matrix.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h
index cad8b0ba4..d75e19b29 100755
--- a/keyboards/sx60/config.h
+++ b/keyboards/sx60/config.h
@@ -31,7 +31,7 @@
31#endif 31#endif
32 32
33/* Set 0 if debouncing isn't needed */ 33/* Set 0 if debouncing isn't needed */
34#define DEBOUNCING_DELAY 5 34#define DEBOUNCE 5
35 35
36/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 36/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
37#define LOCKING_SUPPORT_ENABLE 37#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c
index 634a98a12..e8e9d6574 100644
--- a/keyboards/sx60/matrix.c
+++ b/keyboards/sx60/matrix.c
@@ -30,11 +30,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
31/* Set 0 if debouncing isn't needed */ 31/* Set 0 if debouncing isn't needed */
32 32
33#ifndef DEBOUNCING_DELAY 33#ifndef DEBOUNCE
34# define DEBOUNCING_DELAY 5 34# define DEBOUNCE 5
35#endif 35#endif
36 36
37#if (DEBOUNCING_DELAY > 0) 37#if (DEBOUNCE > 0)
38 static uint16_t debouncing_time; 38 static uint16_t debouncing_time;
39 static bool debouncing = false; 39 static bool debouncing = false;
40#endif 40#endif
@@ -154,7 +154,7 @@ uint8_t matrix_scan(void)
154 154
155 /* Set row, read cols */ 155 /* Set row, read cols */
156 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { 156 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
157# if (DEBOUNCING_DELAY > 0) 157# if (DEBOUNCE > 0)
158 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); 158 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
159 159
160 if (matrix_changed) { 160 if (matrix_changed) {
@@ -166,8 +166,8 @@ uint8_t matrix_scan(void)
166# endif 166# endif
167 } 167 }
168 168
169# if (DEBOUNCING_DELAY > 0) 169# if (DEBOUNCE > 0)
170 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 170 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
171 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 171 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
172 matrix[i] = matrix_debouncing[i]; 172 matrix[i] = matrix_debouncing[i];
173 } 173 }
@@ -181,7 +181,7 @@ uint8_t matrix_scan(void)
181 181
182bool matrix_is_modified(void) 182bool matrix_is_modified(void)
183{ 183{
184#if (DEBOUNCING_DELAY > 0) 184#if (DEBOUNCE > 0)
185 if (debouncing) return false; 185 if (debouncing) return false;
186#endif 186#endif
187 return true; 187 return true;