altos: Drive row low instead of high in matrix driver
authorKeith Packard <keithp@keithp.com>
Sun, 9 Apr 2017 19:53:34 +0000 (12:53 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 9 Apr 2017 19:53:34 +0000 (12:53 -0700)
Driving it high won't work all that well as we're looking for zero bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_matrix.c

index e0f8ba75e1433bf171b43e8eb390c22d9bdfb315..fa2d0c57c1af8bff5d39976a83b23ed37792c488 100644 (file)
@@ -89,9 +89,9 @@ _ao_matrix_read_cols(void)
 static uint8_t
 _ao_matrix_read(uint8_t row) {
        uint8_t state;
-       _ao_matrix_drive_row(row, 1);
-       state = _ao_matrix_read_cols();
        _ao_matrix_drive_row(row, 0);
+       state = _ao_matrix_read_cols();
+       _ao_matrix_drive_row(row, 1);
        return state;
 }