Debounce refactor / API (#3720)
* Added xeal60 via clone of lets split * Delete removed other keymaps * Basic keymap (no FN). Compiles. * Removed NP_STAR and NP_SLSH. * Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes. * Changed order of rules in TMK. Documented feature. * Fixed missing whitespace in debounce documentation Table wasn't working due to missing newline. * Added bold in a few areas. * DO NOT USE - Removed debounce from TMK. * Remove accidental xeal60 commit * DO NOT USE - debounce successfully compiled. * DO NOT USE Revert back to original API to support split_keyboards. * Working eager_pk * Whitespace cleanup. * Restored debounce.h since there wasnt any real change. * Moved debouncing_time variable to inside #if debounce * Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. * Removed #include "matrix.h" from debounce.h * Bug fix - was using MATRIX_ROWS instead of num_rows * Fixed compilation error with debounce_sym_g * Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE * Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2. * Fix compile error in debounce_eager_pk * Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk
This commit is contained in:
commit
c22f3ba3a2
10 changed files with 272 additions and 100 deletions
|
@ -51,10 +51,8 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
|||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS];
|
||||
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
|
||||
static matrix_row_t matrix[MATRIX_ROWS]; //debounced values
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
static void init_cols(void);
|
||||
|
@ -108,30 +106,6 @@ uint8_t matrix_cols(void) {
|
|||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
// void matrix_power_up(void) {
|
||||
// #if (DIODE_DIRECTION == COL2ROW)
|
||||
// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
|
||||
// /* DDRxn */
|
||||
// _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF);
|
||||
// toggle_row(r);
|
||||
// }
|
||||
// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
|
||||
// /* PORTxn */
|
||||
// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
|
||||
// }
|
||||
// #elif (DIODE_DIRECTION == ROW2COL)
|
||||
// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
|
||||
// /* DDRxn */
|
||||
// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
|
||||
// toggle_col(c);
|
||||
// }
|
||||
// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
|
||||
// /* PORTxn */
|
||||
// _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF);
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
// initialize row and col
|
||||
|
@ -175,6 +149,7 @@ uint8_t matrix_scan(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
//Deprecated.
|
||||
bool matrix_is_modified(void)
|
||||
{
|
||||
if (debounce_active()) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue