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 | |
parent | 4b4445290038d19e2f0b31c293f39628dd77cb12 (diff) |
Revert "Keep track of last matrix activity (#10730)"
This reverts commit 79d1db332477963555416d9fff82ecac4399bd52.
Diffstat (limited to 'tmk_core/common')
-rw-r--r-- | tmk_core/common/keyboard.c | 13 | ||||
-rw-r--r-- | tmk_core/common/keyboard.h | 3 |
2 files changed, 6 insertions, 10 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index aea09169fb..a1fbc01da6 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/>. # include "dip_switch.h" #endif -static uint32_t last_matrix_modification_time = 0; -uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; } -uint32_t last_matrix_activity_elapsed(void) { return timer_elapsed32(last_matrix_modification_time); } - // Only enable this if console is enabled to print to #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) static uint32_t matrix_timer = 0; @@ -342,8 +338,11 @@ void keyboard_task(void) { housekeeping_task_kb(); housekeeping_task_user(); - uint8_t matrix_changed = matrix_scan(); - if (matrix_changed) last_matrix_modification_time = timer_read32(); +#if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) + uint8_t ret = matrix_scan(); +#else + matrix_scan(); +#endif if (should_process_keypress()) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { @@ -410,7 +409,7 @@ MATRIX_LOOP_END: oled_task(); # ifndef OLED_DISABLE_TIMEOUT // Wake up oled if user is using those fabulous keys! - if (matrix_changed) oled_on(); + if (ret) oled_on(); # endif #endif diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index cc5b2e5e42..d04e685cdb 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -73,9 +73,6 @@ void keyboard_post_init_user(void); void housekeeping_task_kb(void); void housekeeping_task_user(void); -uint32_t last_matrix_activity_time(void); // Timestamp of the last matrix activity -uint32_t last_matrix_activity_elapsed(void); // Number of milliseconds since the last matrix activity - #ifdef __cplusplus } #endif |