~ruther/qmk_firmware

36109a887a60f7c83b01006578790b86c3f158cd — QMK Bot 3 years ago b74509d + c681b6d
Merge remote-tracking branch 'origin/master' into develop
1 files changed, 9 insertions(+), 2 deletions(-)

M keyboards/redox_w/matrix.c
M keyboards/redox_w/matrix.c => keyboards/redox_w/matrix.c +9 -2
@@ 18,6 18,8 @@
#include "matrix.h"
#include "uart.h"

#define UART_MATRIX_RESPONSE_TIMEOUT 10000

void matrix_init_custom(void) {
    uart_init(1000000);
}


@@ 39,11 41,16 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
        //harm to leave it in here
        while (!uart_available()) {
            timeout++;
            if (timeout > 10000) {
            if (timeout > UART_MATRIX_RESPONSE_TIMEOUT) {
                break;
            }
        }
        uart_data[i] = uart_read();

        if (timeout < UART_MATRIX_RESPONSE_TIMEOUT) {
            uart_data[i] = uart_read();
        } else {
            uart_data[i] = 0x00;
        }
    }

    //check for the end packet, the key state bytes use the LSBs, so 0xE0