aboutsummaryrefslogtreecommitdiff
path: root/keyboards/converter/hp_46010a/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/converter/hp_46010a/matrix.c')
-rw-r--r--keyboards/converter/hp_46010a/matrix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/converter/hp_46010a/matrix.c b/keyboards/converter/hp_46010a/matrix.c
index 2ca7d0357..ac9224087 100644
--- a/keyboards/converter/hp_46010a/matrix.c
+++ b/keyboards/converter/hp_46010a/matrix.c
@@ -34,18 +34,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
34#include "config.h" 34#include "config.h"
35 35
36 36
37#ifndef DEBOUNCING_DELAY 37#ifndef DEBOUNCE
38# define DEBOUNCING_DELAY 5 38# define DEBOUNCE 5
39#endif 39#endif
40 40
41#if ( DEBOUNCING_DELAY > 0 ) 41#if ( DEBOUNCE > 0 )
42static uint16_t debouncing_time ; 42static uint16_t debouncing_time ;
43static bool debouncing = false ; 43static bool debouncing = false ;
44#endif 44#endif
45 45
46static uint8_t matrix [MATRIX_ROWS] = {0}; 46static uint8_t matrix [MATRIX_ROWS] = {0};
47 47
48#if ( DEBOUNCING_DELAY > 0 ) 48#if ( DEBOUNCE > 0 )
49static uint8_t matrix_debounce_old [MATRIX_ROWS] = {0}; 49static uint8_t matrix_debounce_old [MATRIX_ROWS] = {0};
50static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0}; 50static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0};
51#endif 51#endif
@@ -172,7 +172,7 @@ uint8_t matrix_scan(void) {
172 // the first byte of the keyboard's output data can be ignored 172 // the first byte of the keyboard's output data can be ignored
173 Matrix_ThrowByte(); 173 Matrix_ThrowByte();
174 174
175#if ( DEBOUNCING_DELAY > 0 ) 175#if ( DEBOUNCE > 0 )
176 176
177 for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { 177 for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
178 //transfer old debouncing values 178 //transfer old debouncing values
@@ -194,8 +194,8 @@ uint8_t matrix_scan(void) {
194#endif 194#endif
195 195
196 196
197#if ( DEBOUNCING_DELAY > 0 ) 197#if ( DEBOUNCE > 0 )
198 if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCING_DELAY ) ) { 198 if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCE ) ) {
199 199
200 for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { 200 for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
201 matrix[row] = matrix_debounce_new[row] ; 201 matrix[row] = matrix_debounce_new[row] ;