aboutsummaryrefslogtreecommitdiff
path: root/keyboards/converter/ibm_5291/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/converter/ibm_5291/matrix.c')
-rw-r--r--keyboards/converter/ibm_5291/matrix.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/converter/ibm_5291/matrix.c b/keyboards/converter/ibm_5291/matrix.c
index 58f6e37b6..8b2dba7ab 100644
--- a/keyboards/converter/ibm_5291/matrix.c
+++ b/keyboards/converter/ibm_5291/matrix.c
@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33#include "config.h" 33#include "config.h"
34 34
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#define print_matrix_header() print("\nr/c 01234567\n") 40#define print_matrix_header() print("\nr/c 01234567\n")
@@ -49,14 +49,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
49static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ; 49static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ;
50static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ; 50static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ;
51 51
52#if ( DEBOUNCING_DELAY > 0 ) 52#if ( DEBOUNCE > 0 )
53static uint16_t debouncing_time ; 53static uint16_t debouncing_time ;
54static bool debouncing = false ; 54static bool debouncing = false ;
55#endif 55#endif
56 56
57static uint8_t matrix [MATRIX_ROWS] = {0}; 57static uint8_t matrix [MATRIX_ROWS] = {0};
58 58
59#if ( DEBOUNCING_DELAY > 0 ) 59#if ( DEBOUNCE > 0 )
60static uint8_t matrix_debounce [MATRIX_ROWS] = {0}; 60static uint8_t matrix_debounce [MATRIX_ROWS] = {0};
61#endif 61#endif
62 62
@@ -237,7 +237,7 @@ void matrix_init(void) {
237 // initialize matrix state: all keys off 237 // initialize matrix state: all keys off
238 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 238 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
239 matrix[i] = 0; 239 matrix[i] = 0;
240# if (DEBOUNCING_DELAY > 0) 240# if (DEBOUNCE > 0)
241 matrix_debounce [i] = 0; 241 matrix_debounce [i] = 0;
242# endif 242# endif
243 } 243 }
@@ -247,7 +247,7 @@ void matrix_init(void) {
247 247
248uint8_t matrix_scan(void) { 248uint8_t matrix_scan(void) {
249 for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) { 249 for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) {
250# if (DEBOUNCING_DELAY > 0) 250# if (DEBOUNCE > 0)
251 bool matrix_changed = matrix_read(matrix_debounce, current_row); 251 bool matrix_changed = matrix_read(matrix_debounce, current_row);
252 252
253 if (matrix_changed) { 253 if (matrix_changed) {
@@ -260,8 +260,8 @@ uint8_t matrix_scan(void) {
260# endif 260# endif
261 } 261 }
262 262
263# if (DEBOUNCING_DELAY > 0) 263# if (DEBOUNCE > 0)
264 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 264 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
265 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 265 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
266 matrix[i] = matrix_debounce[i]; 266 matrix[i] = matrix_debounce[i];
267 } 267 }