diff options
author | QMK Bot <hello@qmk.fm> | 2021-08-07 06:52:11 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-08-07 06:52:11 +0000 |
commit | 7b709aaecc4e27dc289c67b90203810df3debe49 (patch) | |
tree | 80071a1ed4e6e2b710b6cc58823e5dd8c7f13859 | |
parent | 1f94e995653d42282d770b181c8df9e4bd79b963 (diff) | |
parent | 8a9688bc64ea4283ecfa19dc2bf2c3312e7c646f (diff) |
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r-- | keyboards/handwired/xealousbrown/config.h | 7 | ||||
-rw-r--r-- | keyboards/handwired/xealousbrown/matrix.c | 10 | ||||
-rw-r--r-- | keyboards/handwired/xealousbrown/readme.md | 5 | ||||
-rw-r--r-- | keyboards/handwired/xealousbrown/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/handwired/xealousbrown/xealousbrown.c | 6 |
5 files changed, 20 insertions, 10 deletions
diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h index bf9ad3e052..70775ffaeb 100644 --- a/keyboards/handwired/xealousbrown/config.h +++ b/keyboards/handwired/xealousbrown/config.h @@ -32,6 +32,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USB_POLLING_INTERVAL_MS 1 /* layer optimization */ #define LAYER_STATE_8BIT +#define MAX_LAYER 2 + +//debug scanrate +//#define DEBUG_MATRIX_SCAN_RATE +//debug scans taking longer than one ms +//#define BENCHMARK_MATRIX +#define MATRIX_IO_DELAY 15 /* * Keyboard Matrix Assignments * diff --git a/keyboards/handwired/xealousbrown/matrix.c b/keyboards/handwired/xealousbrown/matrix.c index cce0d06ebb..ba86ab7af0 100644 --- a/keyboards/handwired/xealousbrown/matrix.c +++ b/keyboards/handwired/xealousbrown/matrix.c @@ -28,7 +28,7 @@ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values // matrix code // super fast read_cols code. -static matrix_row_t read_cols(void) { +static inline matrix_row_t read_cols(void) { return (PINC & (1 << 6) ? 0 : (1UL << 0)) | (PIND & (1 << 7) ? 0 : (1UL << 1)) | (PINE & (1 << 6) ? 0 : (1UL << 2)) | @@ -100,13 +100,17 @@ uint8_t matrix_scan_custom(matrix_row_t current_matrix[]) { // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { select_row(current_row); - asm volatile("nop"); - asm volatile("nop"); + matrix_output_select_delay(); + matrix_row_t cols = read_cols(); changed |= (current_matrix[current_row] != cols); current_matrix[current_row] = cols; + unselect_rows(); + //this internally calls matrix_io_delay() + matrix_output_unselect_delay(); } return changed; } + diff --git a/keyboards/handwired/xealousbrown/readme.md b/keyboards/handwired/xealousbrown/readme.md index bbc2233d1c..fa5537e471 100644 --- a/keyboards/handwired/xealousbrown/readme.md +++ b/keyboards/handwired/xealousbrown/readme.md @@ -19,4 +19,7 @@ The brief list of speedhacks to make this keyboard blazing fast: 3) Eager-per-key Debouncing algorithm (no 5ms delay before message is sent) 4) 1000hz polling -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the +[make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + +Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index df90cd030e..04a01ec6bd 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -25,7 +25,7 @@ SPACE_CADET_ENABLE = no # Unneeded feature. LAYOUTS = 60_ansi # special sauce for this keyboard -DEBOUNCE_TYPE = eager_pk # Debounce using eager_pk. +DEBOUNCE_TYPE = sym_eager_pk # Debounce using eager_pk. CUSTOM_MATRIX = lite # Custom matrix that polls at 7000hz instead of a measly 2000hz. LTO_ENABLE = yes # smaller binary SRC += matrix.c diff --git a/keyboards/handwired/xealousbrown/xealousbrown.c b/keyboards/handwired/xealousbrown/xealousbrown.c index 03512b1acb..57c69bd312 100644 --- a/keyboards/handwired/xealousbrown/xealousbrown.c +++ b/keyboards/handwired/xealousbrown/xealousbrown.c @@ -50,13 +50,9 @@ void matrix_scan_user(void) { last_timer = timer; if ((timer % 1000 == 0) && (timer != last_print_out)) { - print("Benchmark:"); - print("\n"); - print_dec(timer); - print("\n"); + print("Scans: "); print_dec(scans); print("\n"); - print("-------"); scans = 0; last_print_out = timer; } |