aboutsummaryrefslogtreecommitdiff
path: root/keyboards/lily58/rev1/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lily58/rev1/matrix.c')
-rwxr-xr-xkeyboards/lily58/rev1/matrix.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/keyboards/lily58/rev1/matrix.c b/keyboards/lily58/rev1/matrix.c
index eaff974e5..eb7e16e24 100755
--- a/keyboards/lily58/rev1/matrix.c
+++ b/keyboards/lily58/rev1/matrix.c
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30#include "util.h" 30#include "util.h"
31#include "matrix.h" 31#include "matrix.h"
32#include "split_util.h" 32#include "split_util.h"
33#include "pro_micro.h" 33#include "quantum.h"
34 34
35#ifdef USE_MATRIX_I2C 35#ifdef USE_MATRIX_I2C
36# include "i2c.h" 36# include "i2c.h"
@@ -101,9 +101,10 @@ void matrix_init(void)
101 unselect_rows(); 101 unselect_rows();
102 init_cols(); 102 init_cols();
103 103
104 TX_RX_LED_INIT; 104 setPinOutput(B0);
105 TXLED0; 105 setPinOutput(D5);
106 RXLED0; 106 writePinHigh(B0);
107 writePinHigh(D5);
107 108
108 // initialize matrix state: all keys off 109 // initialize matrix state: all keys off
109 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 110 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -188,10 +189,10 @@ int serial_transaction(int master_changed) {
188 int ret=serial_update_buffers(); 189 int ret=serial_update_buffers();
189#endif 190#endif
190 if (ret ) { 191 if (ret ) {
191 if(ret==2) RXLED1; 192 if(ret==2) writePinLow(B0);
192 return 1; 193 return 1;
193 } 194 }
194 RXLED0; 195 writePinHigh(B0);
195 memcpy(&matrix[slaveOffset], 196 memcpy(&matrix[slaveOffset],
196 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); 197 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
197 return 0; 198 return 0;
@@ -240,7 +241,7 @@ uint8_t matrix_master_scan(void) {
240 if( serial_transaction(mchanged) ) { 241 if( serial_transaction(mchanged) ) {
241#endif 242#endif
242 // turn on the indicator led when halves are disconnected 243 // turn on the indicator led when halves are disconnected
243 TXLED1; 244 writePinLow(D5);
244 245
245 error_count++; 246 error_count++;
246 247
@@ -253,7 +254,7 @@ uint8_t matrix_master_scan(void) {
253 } 254 }
254 } else { 255 } else {
255 // turn off the indicator led on no error 256 // turn off the indicator led on no error
256 TXLED0; 257 writePinHigh(D5);
257 error_count = 0; 258 error_count = 0;
258 } 259 }
259 matrix_scan_quantum(); 260 matrix_scan_quantum();