aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired/promethium/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/handwired/promethium/matrix.c
parentfe6b8edd581c334a92a97c15faced95a12d5e882 (diff)
downloadqmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.gz
qmk_firmware-faaaa134fd436be400aa2c7841b38907899d49a6.zip
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
Diffstat (limited to 'keyboards/handwired/promethium/matrix.c')
-rw-r--r--keyboards/handwired/promethium/matrix.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c
index 0b4456e28..3b8e5af82 100644
--- a/keyboards/handwired/promethium/matrix.c
+++ b/keyboards/handwired/promethium/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
@@ -128,7 +128,7 @@ uint8_t matrix_scan(void)
128{ 128{
129 // Set row, read cols 129 // Set row, read cols
130 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { 130 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
131# if (DEBOUNCING_DELAY > 0) 131# if (DEBOUNCE > 0)
132 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); 132 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
133 133
134 if (matrix_changed) { 134 if (matrix_changed) {
@@ -142,8 +142,8 @@ uint8_t matrix_scan(void)
142 142
143 } 143 }
144 144
145# if (DEBOUNCING_DELAY > 0) 145# if (DEBOUNCE > 0)
146 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 146 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
147 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 147 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
148 matrix[i] = matrix_debouncing[i]; 148 matrix[i] = matrix_debouncing[i];
149 } 149 }
@@ -157,7 +157,7 @@ uint8_t matrix_scan(void)
157 157
158bool matrix_is_modified(void) 158bool matrix_is_modified(void)
159{ 159{
160#if (DEBOUNCING_DELAY > 0) 160#if (DEBOUNCE > 0)
161 if (debouncing) return false; 161 if (debouncing) return false;
162#endif 162#endif
163 return true; 163 return true;
@@ -294,4 +294,3 @@ static void unselect_row(uint8_t row)
294static void unselect_rows(void) 294static void unselect_rows(void)
295{ 295{
296} 296}
297