aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/converter
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/converter
parentfe6b8edd581c334a92a97c15faced95a12d5e882 (diff)
downloadfirmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.gz
firmware-faaaa134fd436be400aa2c7841b38907899d49a6.tar.bz2
firmware-faaaa134fd436be400aa2c7841b38907899d49a6.zip
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
Diffstat (limited to 'keyboards/converter')
-rw-r--r--keyboards/converter/hp_46010a/config.h4
-rw-r--r--keyboards/converter/hp_46010a/matrix.c14
-rw-r--r--keyboards/converter/ibm_5291/config.h4
-rw-r--r--keyboards/converter/ibm_5291/matrix.c16
-rw-r--r--keyboards/converter/modelm101/config.h4
-rw-r--r--keyboards/converter/numeric_keypad_IIe/config.h6
6 files changed, 22 insertions, 26 deletions
diff --git a/keyboards/converter/hp_46010a/config.h b/keyboards/converter/hp_46010a/config.h
index f77ed4115..b7297ab88 100644
--- a/keyboards/converter/hp_46010a/config.h
+++ b/keyboards/converter/hp_46010a/config.h
@@ -30,6 +30,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 8
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 5
-
-
+#define DEBOUNCE 5
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/>.
#include "config.h"
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
#endif
-#if ( DEBOUNCING_DELAY > 0 )
+#if ( DEBOUNCE > 0 )
static uint16_t debouncing_time ;
static bool debouncing = false ;
#endif
static uint8_t matrix [MATRIX_ROWS] = {0};
-#if ( DEBOUNCING_DELAY > 0 )
+#if ( DEBOUNCE > 0 )
static uint8_t matrix_debounce_old [MATRIX_ROWS] = {0};
static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0};
#endif
@@ -172,7 +172,7 @@ uint8_t matrix_scan(void) {
// the first byte of the keyboard's output data can be ignored
Matrix_ThrowByte();
-#if ( DEBOUNCING_DELAY > 0 )
+#if ( DEBOUNCE > 0 )
for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
//transfer old debouncing values
@@ -194,8 +194,8 @@ uint8_t matrix_scan(void) {
#endif
-#if ( DEBOUNCING_DELAY > 0 )
- if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCING_DELAY ) ) {
+#if ( DEBOUNCE > 0 )
+ if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCE ) ) {
for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
matrix[row] = matrix_debounce_new[row] ;
diff --git a/keyboards/converter/ibm_5291/config.h b/keyboards/converter/ibm_5291/config.h
index 5c9ca1e4a..9701bdfe9 100644
--- a/keyboards/converter/ibm_5291/config.h
+++ b/keyboards/converter/ibm_5291/config.h
@@ -37,6 +37,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 0
-
-
+#define DEBOUNCE 0
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/>.
#include "config.h"
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
#endif
#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/>.
static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ;
static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ;
-#if ( DEBOUNCING_DELAY > 0 )
+#if ( DEBOUNCE > 0 )
static uint16_t debouncing_time ;
static bool debouncing = false ;
#endif
static uint8_t matrix [MATRIX_ROWS] = {0};
-#if ( DEBOUNCING_DELAY > 0 )
+#if ( DEBOUNCE > 0 )
static uint8_t matrix_debounce [MATRIX_ROWS] = {0};
#endif
@@ -237,7 +237,7 @@ void matrix_init(void) {
// initialize matrix state: all keys off
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
-# if (DEBOUNCING_DELAY > 0)
+# if (DEBOUNCE > 0)
matrix_debounce [i] = 0;
# endif
}
@@ -247,7 +247,7 @@ void matrix_init(void) {
uint8_t matrix_scan(void) {
for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) {
-# if (DEBOUNCING_DELAY > 0)
+# if (DEBOUNCE > 0)
bool matrix_changed = matrix_read(matrix_debounce, current_row);
if (matrix_changed) {
@@ -260,8 +260,8 @@ uint8_t matrix_scan(void) {
# endif
}
-# if (DEBOUNCING_DELAY > 0)
- if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
+# if (DEBOUNCE > 0)
+ if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debounce[i];
}
diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h
index 97b78614c..958b29b74 100644
--- a/keyboards/converter/modelm101/config.h
+++ b/keyboards/converter/modelm101/config.h
@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
-#define DEBOUNCING_DELAY 5
+#define DEBOUNCE 5
/*
* Magic Key Options
@@ -120,4 +120,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION \ No newline at end of file
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_IIe/config.h
index 8cf0eaa40..a129e1210 100644
--- a/keyboards/converter/numeric_keypad_IIe/config.h
+++ b/keyboards/converter/numeric_keypad_IIe/config.h
@@ -52,10 +52,10 @@ Header Pins
Header / Matrix
---------------
-Pin Name Description
+Pin Name Description
--------------------------------------------------------------
1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections
-7 NC
+7 NC
9,11,10,8 X4-X7 X-direction key-matrix connections
@@ -98,4 +98,4 @@ http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_conn
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
#define SOFT_SERIAL_PIN D0
-#define DEBOUNCING_DELAY 5
+#define DEBOUNCE 5