1
0
Fork 0

Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)

This commit is contained in:
Drashna Jaelre 2019-06-06 12:09:56 -07:00 committed by MechMerlin
parent fe6b8edd58
commit faaaa134fd
448 changed files with 594 additions and 627 deletions

View file

@ -83,7 +83,7 @@ This is a C header file that is one of the first things included, and will persi
* enables backlight breathing (only works with backlight pins B5, B6 and B7) * enables backlight breathing (only works with backlight pins B5, B6 and B7)
* `#define BREATHING_PERIOD 6` * `#define BREATHING_PERIOD 6`
* the length of one backlight "breath" in seconds * the length of one backlight "breath" in seconds
* `#define DEBOUNCING_DELAY 5` * `#define DEBOUNCE 5`
* the delay when reading the value of the pin (5 is default) * the delay when reading the value of the pin (5 is default)
* `#define LOCKING_SUPPORT_ENABLE` * `#define LOCKING_SUPPORT_ENABLE`
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap

View file

@ -140,7 +140,7 @@ To replace the function, all you need to do is add something like this to your c
```c ```c
void bootmagic_lite(void) { void bootmagic_lite(void) {
matrix_scan(); matrix_scan();
wait_ms(DEBOUNCING_DELAY * 2); wait_ms(DEBOUNCE * 2);
matrix_scan(); matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {

View file

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@ -62,4 +62,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif

View file

@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@ -45,4 +45,3 @@
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif

View file

@ -71,7 +71,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -38,7 +38,7 @@
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -47,7 +47,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -72,7 +72,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -72,7 +72,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -81,7 +81,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -27,7 +27,7 @@
#define DESCRIPTION i75 15x5 ortholinear keyboard #define DESCRIPTION i75 15x5 ortholinear keyboard
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -26,7 +26,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -76,7 +76,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -60,7 +60,7 @@
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -23,7 +23,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE

View file

@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -28,7 +28,7 @@
#define BACKLIGHT_LEVELS 5 #define BACKLIGHT_LEVELS 5
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Bit Trade One #define MANUFACTURER Bit Trade One
#define PRODUCT ADKB96 #define PRODUCT ADKB96
#define DESCRIPTION #define DESCRIPTION
/* key matrix size */ /* key matrix size */
// Rows are doubled-up // Rows are doubled-up
@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@ -75,4 +75,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION

View file

@ -39,7 +39,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@ -68,4 +68,3 @@
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125
#define DYNAMIC_KEYMAP_MACRO_COUNT 16 #define DYNAMIC_KEYMAP_MACRO_COUNT 16

View file

@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -262,5 +262,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) // DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR // DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389
#define DYNAMIC_KEYMAP_MACRO_COUNT 16 #define DYNAMIC_KEYMAP_MACRO_COUNT 16

View file

@ -89,7 +89,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -7,10 +7,10 @@
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -69,7 +69,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row); bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
unselect_cols(); unselect_cols();

View file

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -30,7 +30,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -30,7 +30,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -46,7 +46,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -64,7 +64,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_CUSTOM #define BACKLIGHT_CUSTOM
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS {} #define UNUSED_PINS {}
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK #define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
@ -48,4 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0 // #define BOOTMAGIC_LITE_COLUMN 0

View file

@ -23,7 +23,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Backlight configuration /* Backlight configuration
*/ */

View file

@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -23,7 +23,7 @@ void bootmagic_lite(void)
// We need multiple scans because debouncing can't be turned off. // We need multiple scans because debouncing can't be turned off.
matrix_scan(); matrix_scan();
wait_ms(DEBOUNCING_DELAY); wait_ms(DEBOUNCE);
matrix_scan(); matrix_scan();
// If the Esc and space bar are held down on power up, // If the Esc and space bar are held down on power up,

View file

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK #define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -32,8 +32,8 @@
#define BREATHING_PERIOD 5 #define BREATHING_PERIOD 5
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#undef DEBOUNCING_DELAY #undef DEBOUNCE
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
// set flashing LED with QMK DFU // set flashing LED with QMK DFU
#define QMK_LED B0 #define QMK_LED B0

View file

@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -81,7 +81,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -28,7 +28,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 6 // #define BACKLIGHT_LEVELS 6
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS { B0, C4, D3 } #define UNUSED_PINS { B0, C4, D3 }
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -24,10 +24,10 @@
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -111,7 +111,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = col_scan & (1<<row); bool curr_bit = col_scan & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
} }

View file

@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -24,10 +24,10 @@
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -98,7 +98,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row); bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
} }

View file

@ -36,6 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#endif #endif

View file

@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -90,7 +90,7 @@ uint8_t matrix_scan(void)
bool curr_bit = rows & (1<<row); bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= (matrix_row_t) 1 << col; matrix_debouncing[row] ^= (matrix_row_t) 1 << col;
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
} }

View file

@ -32,7 +32,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* /*
* Force NKRO * Force NKRO

View file

@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS { B0, C4, D3 } #define UNUSED_PINS { B0, C4, D3 }
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -24,10 +24,10 @@
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -111,7 +111,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = col_scan & (1<<row); bool curr_bit = col_scan & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
} }

View file

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 18 #define MATRIX_COLS 18
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -43,10 +43,10 @@ __attribute__ ((weak))
void matrix_scan_user(void) { void matrix_scan_user(void) {
} }
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@ -112,7 +112,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = col_scan & (1<<row); bool curr_bit = col_scan & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
} }

View file

@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -11,7 +11,7 @@
#define DESCRIPTION Its a stick of butter #define DESCRIPTION Its a stick of butter
#define VERSION "Paula Deen" #define VERSION "Paula Deen"
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define FORCE_NKRO #define FORCE_NKRO
/* key matrix size */ /* key matrix size */
@ -23,4 +23,3 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL

View file

@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK #define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1

View file

@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
// #define DEBOUNCING_DELAY 0 // #define DEBOUNCE 0
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \

View file

@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -53,7 +53,7 @@ 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 */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE //#define LOCKING_SUPPORT_ENABLE

View file

@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Number of backlighting levels */ /* Number of backlighting levels */
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3

View file

@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -25,7 +25,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -24,7 +24,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -24,7 +24,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -30,7 +30,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 20 #define DEBOUNCE 20
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST

View file

@ -30,7 +30,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -30,6 +30,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 8 #define MATRIX_COLS 8
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5

View file

@ -34,18 +34,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config.h" #include "config.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
#if ( DEBOUNCING_DELAY > 0 ) #if ( DEBOUNCE > 0 )
static uint16_t debouncing_time ; static uint16_t debouncing_time ;
static bool debouncing = false ; static bool debouncing = false ;
#endif #endif
static uint8_t matrix [MATRIX_ROWS] = {0}; 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_old [MATRIX_ROWS] = {0};
static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0}; static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0};
#endif #endif
@ -172,7 +172,7 @@ uint8_t matrix_scan(void) {
// the first byte of the keyboard's output data can be ignored // the first byte of the keyboard's output data can be ignored
Matrix_ThrowByte(); Matrix_ThrowByte();
#if ( DEBOUNCING_DELAY > 0 ) #if ( DEBOUNCE > 0 )
for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
//transfer old debouncing values //transfer old debouncing values
@ -194,8 +194,8 @@ uint8_t matrix_scan(void) {
#endif #endif
#if ( DEBOUNCING_DELAY > 0 ) #if ( DEBOUNCE > 0 )
if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCING_DELAY ) ) { if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCE ) ) {
for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) {
matrix[row] = matrix_debounce_new[row] ; matrix[row] = matrix_debounce_new[row] ;

View file

@ -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 */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 0 #define DEBOUNCE 0

View file

@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config.h" #include "config.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
#define print_matrix_header() print("\nr/c 01234567\n") #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 row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ;
static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_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 uint16_t debouncing_time ;
static bool debouncing = false ; static bool debouncing = false ;
#endif #endif
static uint8_t matrix [MATRIX_ROWS] = {0}; static uint8_t matrix [MATRIX_ROWS] = {0};
#if ( DEBOUNCING_DELAY > 0 ) #if ( DEBOUNCE > 0 )
static uint8_t matrix_debounce [MATRIX_ROWS] = {0}; static uint8_t matrix_debounce [MATRIX_ROWS] = {0};
#endif #endif
@ -237,7 +237,7 @@ void matrix_init(void) {
// initialize matrix state: all keys off // initialize matrix state: all keys off
for (uint8_t i = 0; i < MATRIX_ROWS; i++) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = 0; matrix[i] = 0;
# if (DEBOUNCING_DELAY > 0) # if (DEBOUNCE > 0)
matrix_debounce [i] = 0; matrix_debounce [i] = 0;
# endif # endif
} }
@ -247,7 +247,7 @@ void matrix_init(void) {
uint8_t matrix_scan(void) { uint8_t matrix_scan(void) {
for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) { 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); bool matrix_changed = matrix_read(matrix_debounce, current_row);
if (matrix_changed) { if (matrix_changed) {
@ -260,8 +260,8 @@ uint8_t matrix_scan(void) {
# endif # endif
} }
# if (DEBOUNCING_DELAY > 0) # if (DEBOUNCE > 0)
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debounce[i]; matrix[i] = matrix_debounce[i];
} }

View file

@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ /* 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 * 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_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION

View file

@ -52,10 +52,10 @@ Header Pins
Header / Matrix Header / Matrix
--------------- ---------------
Pin Name Description Pin Name Description
-------------------------------------------------------------- --------------------------------------------------------------
1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections 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 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 UNUSED_PINS
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define SOFT_SERIAL_PIN D0 #define SOFT_SERIAL_PIN D0
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5

View file

@ -63,7 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -169,4 +169,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LCD_E_PIN 1 //< pin for Enable line #define LCD_E_PIN 1 //< pin for Enable line
#endif #endif
*/ */

View file

@ -63,7 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#endif //#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -169,4 +169,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LCD_E_PIN 1 //< pin for Enable line #define LCD_E_PIN 1 //< pin for Enable line
#endif #endif
*/ */

Some files were not shown because too many files have changed in this diff Show more