diff options
author | Eric Tang <e_l_tang@outlook.com> | 2016-05-23 20:42:21 -0700 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-05-23 23:42:21 -0400 |
commit | aaa758f1d3f97dda39879f2b055ad2da9680adfe (patch) | |
tree | cb0749cda23c0507dd2b230af3eb0ca81a97b8af /tmk_core/common/avr | |
parent | d66aa0abf96b5e887250cf0a7fa5e575f18c5a91 (diff) | |
download | qmk_firmware-aaa758f1d3f97dda39879f2b055ad2da9680adfe.tar.gz qmk_firmware-aaa758f1d3f97dda39879f2b055ad2da9680adfe.zip |
Optimize matrix scanning (#343)
Diffstat (limited to 'tmk_core/common/avr')
-rw-r--r-- | tmk_core/common/avr/suspend.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 4980680198..a6f3c64414 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -114,9 +114,7 @@ bool suspend_wakeup_condition(void) matrix_power_up(); matrix_scan(); matrix_power_down(); - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - if (matrix_get_row(r)) return true; - } + if (matrix_key_count()) return true; return false; } @@ -146,4 +144,3 @@ ISR(WDT_vect) } } #endif - |