diff options
author | Joshua Colbeck <Skrymir@users.noreply.github.com> | 2016-07-06 20:29:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-06 20:29:29 -0500 |
commit | e0e1c119f0c54ff7b69bf8eaa9e641b60610b4d9 (patch) | |
tree | 67aebd55b1538035a1e5839eff3bb66f89d2aca2 /keyboards/ergodox_ez/matrix.c | |
parent | 21ee3eb569caffdf2ad581c668682c0109c978e5 (diff) | |
parent | 5ed673d82d6cf91aa966a3e903ac37adb519f12c (diff) |
Merge pull request #1 from Skrymir/patch-1
add ergodox layout
Diffstat (limited to 'keyboards/ergodox_ez/matrix.c')
-rw-r--r-- | keyboards/ergodox_ez/matrix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index b87fddbad7..9c1efa1d05 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdint.h> #include <stdbool.h> #include <avr/io.h> -#include <util/delay.h> +#include "wait.h" #include "action_layer.h" #include "print.h" #include "debug.h" @@ -166,6 +166,7 @@ uint8_t matrix_scan(void) for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); + wait_us(30); // without this wait read unstable value. matrix_row_t cols = read_cols(i); if (matrix_debouncing[i] != cols) { matrix_debouncing[i] = cols; @@ -179,7 +180,7 @@ uint8_t matrix_scan(void) if (debouncing) { if (--debouncing) { - _delay_ms(1); + wait_us(1); } else { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; @@ -267,7 +268,6 @@ static matrix_row_t read_cols(uint8_t row) return data; } } else { - _delay_us(30); // without this wait read unstable value. // read from teensy return (PINF&(1<<0) ? 0 : (1<<0)) | |