]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Additional optimization, reach speed 368 scans/second
authorOleg Kostyuk <cub.uanic@gmail.com>
Mon, 16 Sep 2013 02:21:44 +0000 (05:21 +0300)
committerOleg Kostyuk <cub.uanic@gmail.com>
Mon, 16 Sep 2013 02:22:06 +0000 (05:22 +0300)
keyboard/ergodox/matrix.c

index b75d7c57a038e14ae70955f74717baa02ef7654c..0c5b73113f5d64bd87f90fdd4b7a8585b01df592 100644 (file)
@@ -146,7 +146,6 @@ uint8_t matrix_scan(void)
 
     for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
         select_row(i);
-        _delay_us(30);  // without this wait read unstable value.
         matrix_row_t cols = read_cols(i);
         if (matrix_debouncing[i] != cols) {
             matrix_debouncing[i] = cols;
@@ -246,6 +245,7 @@ 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)) |