diff options
| author | Nick Brassel <nick@tzarc.org> | 2021-01-15 06:55:07 +1100 |
|---|---|---|
| committer | Nick Brassel <nick@tzarc.org> | 2021-01-15 06:55:07 +1100 |
| commit | ab375d3d075c105f09a1ddd0e155f178225518bc (patch) | |
| tree | 89e5ba3ddf9e3bba49759a0ea9cad9565f1ad5d1 /tmk_core/common/keyboard.c | |
| parent | 4b4445290038d19e2f0b31c293f39628dd77cb12 (diff) | |
| download | qmk_firmware-ab375d3d075c105f09a1ddd0e155f178225518bc.tar.gz qmk_firmware-ab375d3d075c105f09a1ddd0e155f178225518bc.zip | |
Revert "Keep track of last matrix activity (#10730)"
This reverts commit 79d1db332477963555416d9fff82ecac4399bd52.
Diffstat (limited to 'tmk_core/common/keyboard.c')
| -rw-r--r-- | tmk_core/common/keyboard.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index aea09169f..a1fbc01da 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
| @@ -97,10 +97,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 97 | # include "dip_switch.h" | 97 | # include "dip_switch.h" |
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | static uint32_t last_matrix_modification_time = 0; | ||
| 101 | uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; } | ||
| 102 | uint32_t last_matrix_activity_elapsed(void) { return timer_elapsed32(last_matrix_modification_time); } | ||
| 103 | |||
| 104 | // Only enable this if console is enabled to print to | 100 | // Only enable this if console is enabled to print to |
| 105 | #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) | 101 | #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) |
| 106 | static uint32_t matrix_timer = 0; | 102 | static uint32_t matrix_timer = 0; |
| @@ -342,8 +338,11 @@ void keyboard_task(void) { | |||
| 342 | housekeeping_task_kb(); | 338 | housekeeping_task_kb(); |
| 343 | housekeeping_task_user(); | 339 | housekeeping_task_user(); |
| 344 | 340 | ||
| 345 | uint8_t matrix_changed = matrix_scan(); | 341 | #if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) |
| 346 | if (matrix_changed) last_matrix_modification_time = timer_read32(); | 342 | uint8_t ret = matrix_scan(); |
| 343 | #else | ||
| 344 | matrix_scan(); | ||
| 345 | #endif | ||
| 347 | 346 | ||
| 348 | if (should_process_keypress()) { | 347 | if (should_process_keypress()) { |
| 349 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { | 348 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { |
| @@ -410,7 +409,7 @@ MATRIX_LOOP_END: | |||
| 410 | oled_task(); | 409 | oled_task(); |
| 411 | # ifndef OLED_DISABLE_TIMEOUT | 410 | # ifndef OLED_DISABLE_TIMEOUT |
| 412 | // Wake up oled if user is using those fabulous keys! | 411 | // Wake up oled if user is using those fabulous keys! |
| 413 | if (matrix_changed) oled_on(); | 412 | if (ret) oled_on(); |
| 414 | # endif | 413 | # endif |
| 415 | #endif | 414 | #endif |
| 416 | 415 | ||
