-
- // for (uint8_t i = 0; i < MATRIX_COLS; i++) {
- // select_col(i);
- // wait_us(30); // without this wait read unstable value.
- // matrix_col_t current_col = read_rows();
- // if (matrix_transposed_debouncing[i] != current_col) {
- // matrix_transposed_debouncing[i] = current_col;
- // if (debouncing) {
- // debug("bounce!: "); debug_hex(debouncing); debug("\n");
- // }
- // debouncing = DEBOUNCING_DELAY;
- // }
- // unselect_col(i);
- // }
-
- // if (debouncing) {
- // if (--debouncing) {
- // wait_ms(1);
- // } else {
- // for (uint8_t i = 0; i < MATRIX_COLS; i++) {
- // matrix_transposed[i] = matrix_transposed_debouncing[i];
- // }
- // }
- // }
-
- // // Untranspose matrix
- // for (uint8_t y = 0; y < MATRIX_ROWS; y++) {
- // matrix_row_t row = 0;
- // for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- // row |= ((matrix_transposed[x] & (1<<y)) >> y) << x;
- // }
- // matrix[y] = row;
- // }