diff options
author | Drashna Jaelre <drashna@live.com> | 2019-02-14 20:36:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 20:36:20 -0800 |
commit | c22f3ba3a2605280b81829a764c29c9e01ae674f (patch) | |
tree | f7aba084d7aa8d1f60058cd409eefb5a0d7ebb34 /quantum/matrix.c | |
parent | cc5c6b449a4a36fc56fa5896b2b8f120e4bb0b31 (diff) | |
parent | 7d8c62993921383a35f9cd172fe0a1d2e893b2f3 (diff) | |
download | qmk_firmware-c22f3ba3a2605280b81829a764c29c9e01ae674f.tar.gz qmk_firmware-c22f3ba3a2605280b81829a764c29c9e01ae674f.zip |
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
Diffstat (limited to 'quantum/matrix.c')
-rw-r--r-- | quantum/matrix.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c index d2b805d7f..f7cad1a0f 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
@@ -51,10 +51,8 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | /* matrix state(1:on, 0:off) */ | 53 | /* matrix state(1:on, 0:off) */ |
54 | static matrix_row_t raw_matrix[MATRIX_ROWS]; | 54 | static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values |
55 | 55 | static matrix_row_t matrix[MATRIX_ROWS]; //debounced values | |
56 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
57 | |||
58 | 56 | ||
59 | #if (DIODE_DIRECTION == COL2ROW) | 57 | #if (DIODE_DIRECTION == COL2ROW) |
60 | static void init_cols(void); | 58 | static void init_cols(void); |
@@ -108,30 +106,6 @@ uint8_t matrix_cols(void) { | |||
108 | return MATRIX_COLS; | 106 | return MATRIX_COLS; |
109 | } | 107 | } |
110 | 108 | ||
111 | // void matrix_power_up(void) { | ||
112 | // #if (DIODE_DIRECTION == COL2ROW) | ||
113 | // for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | ||
114 | // /* DDRxn */ | ||
115 | // _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); | ||
116 | // toggle_row(r); | ||
117 | // } | ||
118 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { | ||
119 | // /* PORTxn */ | ||
120 | // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); | ||
121 | // } | ||
122 | // #elif (DIODE_DIRECTION == ROW2COL) | ||
123 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { | ||
124 | // /* DDRxn */ | ||
125 | // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); | ||
126 | // toggle_col(c); | ||
127 | // } | ||
128 | // for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | ||
129 | // /* PORTxn */ | ||
130 | // _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); | ||
131 | // } | ||
132 | // #endif | ||
133 | // } | ||
134 | |||
135 | void matrix_init(void) { | 109 | void matrix_init(void) { |
136 | 110 | ||
137 | // initialize row and col | 111 | // initialize row and col |
@@ -175,6 +149,7 @@ uint8_t matrix_scan(void) | |||
175 | return 1; | 149 | return 1; |
176 | } | 150 | } |
177 | 151 | ||
152 | //Deprecated. | ||
178 | bool matrix_is_modified(void) | 153 | bool matrix_is_modified(void) |
179 | { | 154 | { |
180 | if (debounce_active()) return false; | 155 | if (debounce_active()) return false; |