aboutsummaryrefslogtreecommitdiff
path: root/keyboards/helix/pico/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/helix/pico/matrix.c')
-rw-r--r--keyboards/helix/pico/matrix.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/keyboards/helix/pico/matrix.c b/keyboards/helix/pico/matrix.c
index a537ef03c..27170e039 100644
--- a/keyboards/helix/pico/matrix.c
+++ b/keyboards/helix/pico/matrix.c
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
29#include "util.h" 29#include "util.h"
30#include "matrix.h" 30#include "matrix.h"
31#include "split_util.h" 31#include "split_util.h"
32#include "pro_micro.h" 32#include "quantum.h"
33 33
34#ifdef USE_MATRIX_I2C 34#ifdef USE_MATRIX_I2C
35# include "i2c.h" 35# include "i2c.h"
@@ -99,9 +99,10 @@ void matrix_init(void)
99 unselect_rows(); 99 unselect_rows();
100 init_cols(); 100 init_cols();
101 101
102 TX_RX_LED_INIT; 102 setPinOutput(B0);
103 TXLED0; 103 setPinOutput(D5);
104 RXLED0; 104 writePinHigh(B0);
105 writePinHigh(D5);
105 106
106 // initialize matrix state: all keys off 107 // initialize matrix state: all keys off
107 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 108 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -180,10 +181,10 @@ int serial_transaction(void) {
180 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 181 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
181 int ret=serial_update_buffers(); 182 int ret=serial_update_buffers();
182 if (ret ) { 183 if (ret ) {
183 if(ret==2)RXLED1; 184 if(ret==2) writePinLow(B0);
184 return 1; 185 return 1;
185 } 186 }
186 RXLED0; 187 writePinHigh(B0);
187 for (int i = 0; i < ROWS_PER_HAND; ++i) { 188 for (int i = 0; i < ROWS_PER_HAND; ++i) {
188 matrix[slaveOffset+i] = serial_slave_buffer[i]; 189 matrix[slaveOffset+i] = serial_slave_buffer[i];
189 } 190 }
@@ -235,7 +236,7 @@ uint8_t matrix_master_scan(void) {
235 if( serial_transaction() ) { 236 if( serial_transaction() ) {
236#endif 237#endif
237 // turn on the indicator led when halves are disconnected 238 // turn on the indicator led when halves are disconnected
238 TXLED1; 239 writePinLow(D5);
239 240
240 error_count++; 241 error_count++;
241 242
@@ -248,7 +249,7 @@ uint8_t matrix_master_scan(void) {
248 } 249 }
249 } else { 250 } else {
250 // turn off the indicator led on no error 251 // turn off the indicator led on no error
251 TXLED0; 252 writePinHigh(D5);
252 error_count = 0; 253 error_count = 0;
253 } 254 }
254 matrix_scan_quantum(); 255 matrix_scan_quantum();