aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/claw44/rev1/matrix.c17
-rw-r--r--keyboards/crkbd/rev1/matrix.c17
-rw-r--r--keyboards/ergoinu/matrix.c39
-rw-r--r--keyboards/handwired/not_so_minidox/matrix.c9
-rw-r--r--keyboards/helix/pico/matrix.c17
-rw-r--r--keyboards/helix/rev1/matrix.c9
-rw-r--r--keyboards/helix/rev2/matrix.c17
-rwxr-xr-xkeyboards/lily58/rev1/matrix.c17
-rw-r--r--keyboards/yosino58/rev1/matrix.c17
-rw-r--r--keyboards/zinc/rev1/matrix.c17
-rw-r--r--keyboards/zinc/reva/matrix.c17
11 files changed, 99 insertions, 94 deletions
diff --git a/keyboards/claw44/rev1/matrix.c b/keyboards/claw44/rev1/matrix.c
index 718cc5744..a5896d979 100644
--- a/keyboards/claw44/rev1/matrix.c
+++ b/keyboards/claw44/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"
@@ -102,9 +102,10 @@ void matrix_init(void)
102 unselect_rows(); 102 unselect_rows();
103 init_cols(); 103 init_cols();
104 104
105 TX_RX_LED_INIT; 105 setPinOutput(B0);
106 TXLED0; 106 setPinOutput(D5);
107 RXLED0; 107 writePinHigh(B0);
108 writePinHigh(D5);
108 109
109 // initialize matrix state: all keys off 110 // initialize matrix state: all keys off
110 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 111 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
189 int ret=serial_update_buffers(); 190 int ret=serial_update_buffers();
190#endif 191#endif
191 if (ret ) { 192 if (ret ) {
192 if(ret==2) RXLED1; 193 if(ret==2) writePinLow(B0);
193 return 1; 194 return 1;
194 } 195 }
195 RXLED0; 196 writePinHigh(B0);
196 memcpy(&matrix[slaveOffset], 197 memcpy(&matrix[slaveOffset],
197 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); 198 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
198 return 0; 199 return 0;
@@ -241,7 +242,7 @@ uint8_t matrix_master_scan(void) {
241 if( serial_transaction(mchanged) ) { 242 if( serial_transaction(mchanged) ) {
242#endif 243#endif
243 // turn on the indicator led when halves are disconnected 244 // turn on the indicator led when halves are disconnected
244 TXLED1; 245 writePinLow(D5);
245 246
246 error_count++; 247 error_count++;
247 248
@@ -254,7 +255,7 @@ uint8_t matrix_master_scan(void) {
254 } 255 }
255 } else { 256 } else {
256 // turn off the indicator led on no error 257 // turn off the indicator led on no error
257 TXLED0; 258 writePinHigh(D5);
258 error_count = 0; 259 error_count = 0;
259 } 260 }
260 matrix_scan_quantum(); 261 matrix_scan_quantum();
diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/matrix.c
index 9d86879d6..46dead369 100644
--- a/keyboards/crkbd/rev1/matrix.c
+++ b/keyboards/crkbd/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"
@@ -96,37 +96,38 @@ uint8_t matrix_cols(void)
96void tx_rx_leds_init(void) 96void tx_rx_leds_init(void)
97{ 97{
98#ifndef NO_DEBUG_LEDS 98#ifndef NO_DEBUG_LEDS
99 TX_RX_LED_INIT; 99 setPinOutput(B0);
100 TXLED0; 100 setPinOutput(D5);
101 RXLED0; 101 writePinHigh(B0);
102 writePinHigh(D5);
102#endif 103#endif
103} 104}
104 105
105void tx_led_on(void) 106void tx_led_on(void)
106{ 107{
107#ifndef NO_DEBUG_LEDS 108#ifndef NO_DEBUG_LEDS
108 TXLED1; 109 writePinLow(D5);
109#endif 110#endif
110} 111}
111 112
112void tx_led_off(void) 113void tx_led_off(void)
113{ 114{
114#ifndef NO_DEBUG_LEDS 115#ifndef NO_DEBUG_LEDS
115 TXLED0; 116 writePinHigh(D5);
116#endif 117#endif
117} 118}
118 119
119void rx_led_on(void) 120void rx_led_on(void)
120{ 121{
121#ifndef NO_DEBUG_LEDS 122#ifndef NO_DEBUG_LEDS
122 RXLED1; 123 writePinLow(B0);
123#endif 124#endif
124} 125}
125 126
126void rx_led_off(void) 127void rx_led_off(void)
127{ 128{
128#ifndef NO_DEBUG_LEDS 129#ifndef NO_DEBUG_LEDS
129 RXLED0; 130 writePinHigh(B0);
130#endif 131#endif
131} 132}
132 133
diff --git a/keyboards/ergoinu/matrix.c b/keyboards/ergoinu/matrix.c
index 00914a257..4a80cf9f2 100644
--- a/keyboards/ergoinu/matrix.c
+++ b/keyboards/ergoinu/matrix.c
@@ -29,24 +29,10 @@ 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 "quantum.h"
32 33
33#include "serial.h" 34#include "serial.h"
34 35
35// from pro_micro.h
36#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
37
38#ifndef DISABLE_PROMICRO_LEDs
39 #define TXLED0 PORTD |= (1<<5)
40 #define TXLED1 PORTD &= ~(1<<5)
41 #define RXLED0 PORTB |= (1<<0)
42 #define RXLED1 PORTB &= ~(1<<0)
43#else
44 #define TXLED0
45 #define TXLED1
46 #define RXLED0
47 #define RXLED1
48#endif
49
50#ifndef DEBOUNCE 36#ifndef DEBOUNCE
51# define DEBOUNCE 5 37# define DEBOUNCE 5
52#endif 38#endif
@@ -108,11 +94,12 @@ void matrix_init(void) {
108 unselect_rows(); 94 unselect_rows();
109 init_cols(); 95 init_cols();
110 96
111 TX_RX_LED_INIT; 97 setPinOutput(B0);
98 setPinOutput(D5);
112 99
113 #ifdef DISABLE_PROMICRO_LEDs 100 #ifdef DISABLE_PROMICRO_LEDs
114 PORTD |= (1<<5); 101 writePinHigh(B0);
115 PORTB |= (1<<0); 102 writePinHigh(D5);
116 #endif 103 #endif
117 104
118 // initialize matrix state: all keys off 105 // initialize matrix state: all keys off
@@ -158,10 +145,14 @@ int serial_transaction(void) {
158 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 145 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
159 int ret=serial_update_buffers(); 146 int ret=serial_update_buffers();
160 if (ret ) { 147 if (ret ) {
161 if(ret==2)RXLED1; 148#ifndef DISABLE_PROMICRO_LEDs
149 if(ret==2) writePinLow(B0);
150#endif
162 return 1; 151 return 1;
163 } 152 }
164RXLED0; 153#ifndef DISABLE_PROMICRO_LEDs
154 writePinHigh(B0);
155#endif
165 for (int i = 0; i < ROWS_PER_HAND; ++i) { 156 for (int i = 0; i < ROWS_PER_HAND; ++i) {
166 matrix[slaveOffset+i] = serial_slave_buffer[i]; 157 matrix[slaveOffset+i] = serial_slave_buffer[i];
167 } 158 }
@@ -197,8 +188,10 @@ uint8_t matrix_master_scan(void) {
197 } 188 }
198 189
199 if( serial_transaction() ) { 190 if( serial_transaction() ) {
191#ifndef DISABLE_PROMICRO_LEDs
200 // turn on the indicator led when halves are disconnected 192 // turn on the indicator led when halves are disconnected
201 TXLED1; 193 writePinLow(D5);
194#endif
202 195
203 error_count++; 196 error_count++;
204 197
@@ -210,8 +203,10 @@ uint8_t matrix_master_scan(void) {
210 } 203 }
211 } 204 }
212 } else { 205 } else {
206#ifndef DISABLE_PROMICRO_LEDs
213 // turn off the indicator led on no error 207 // turn off the indicator led on no error
214 TXLED0; 208 writePinHigh(D5);
209#endif
215 error_count = 0; 210 error_count = 0;
216 } 211 }
217 matrix_scan_quantum(); 212 matrix_scan_quantum();
diff --git a/keyboards/handwired/not_so_minidox/matrix.c b/keyboards/handwired/not_so_minidox/matrix.c
index 27a38dca0..aca9daedc 100644
--- a/keyboards/handwired/not_so_minidox/matrix.c
+++ b/keyboards/handwired/not_so_minidox/matrix.c
@@ -29,8 +29,8 @@ 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"
33#include "config.h" 32#include "config.h"
33#include "quantum.h"
34 34
35#ifdef USE_I2C 35#ifdef USE_I2C
36# include "i2c.h" 36# include "i2c.h"
@@ -100,7 +100,8 @@ void matrix_init(void)
100 unselect_rows(); 100 unselect_rows();
101 init_cols(); 101 init_cols();
102 102
103 TX_RX_LED_INIT; 103 setPinOutput(B0);
104 setPinOutput(D5);
104 105
105 // initialize matrix state: all keys off 106 // initialize matrix state: all keys off
106 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 107 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -201,7 +202,7 @@ uint8_t matrix_scan(void)
201 if( serial_transaction() ) { 202 if( serial_transaction() ) {
202#endif 203#endif
203 // turn on the indicator led when halves are disconnected 204 // turn on the indicator led when halves are disconnected
204 TXLED1; 205 writePinLow(D5);
205 206
206 error_count++; 207 error_count++;
207 208
@@ -214,7 +215,7 @@ uint8_t matrix_scan(void)
214 } 215 }
215 } else { 216 } else {
216 // turn off the indicator led on no error 217 // turn off the indicator led on no error
217 TXLED0; 218 writePinHigh(D5);
218 error_count = 0; 219 error_count = 0;
219 } 220 }
220 matrix_scan_quantum(); 221 matrix_scan_quantum();
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();
diff --git a/keyboards/helix/rev1/matrix.c b/keyboards/helix/rev1/matrix.c
index f2506868e..06ef49b56 100644
--- a/keyboards/helix/rev1/matrix.c
+++ b/keyboards/helix/rev1/matrix.c
@@ -29,8 +29,8 @@ 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"
33#include "config.h" 32#include "config.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"
@@ -100,7 +100,8 @@ void matrix_init(void)
100 unselect_rows(); 100 unselect_rows();
101 init_cols(); 101 init_cols();
102 102
103 TX_RX_LED_INIT; 103 setPinOutput(B0);
104 setPinOutput(D5);
104 105
105 // initialize matrix state: all keys off 106 // initialize matrix state: all keys off
106 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 107 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -201,7 +202,7 @@ uint8_t matrix_scan(void)
201 if( serial_transaction() ) { 202 if( serial_transaction() ) {
202#endif 203#endif
203 // turn on the indicator led when halves are disconnected 204 // turn on the indicator led when halves are disconnected
204 TXLED1; 205 writePinLow(D5);
205 206
206 error_count++; 207 error_count++;
207 208
@@ -214,7 +215,7 @@ uint8_t matrix_scan(void)
214 } 215 }
215 } else { 216 } else {
216 // turn off the indicator led on no error 217 // turn off the indicator led on no error
217 TXLED0; 218 writePinHigh(D5);
218 error_count = 0; 219 error_count = 0;
219 } 220 }
220 matrix_scan_quantum(); 221 matrix_scan_quantum();
diff --git a/keyboards/helix/rev2/matrix.c b/keyboards/helix/rev2/matrix.c
index 050dcac2d..8ea070aa3 100644
--- a/keyboards/helix/rev2/matrix.c
+++ b/keyboards/helix/rev2/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"
@@ -100,9 +100,10 @@ void matrix_init(void)
100 unselect_rows(); 100 unselect_rows();
101 init_cols(); 101 init_cols();
102 102
103 TX_RX_LED_INIT; 103 setPinOutput(B0);
104 TXLED0; 104 setPinOutput(D5);
105 RXLED0; 105 writePinHigh(B0);
106 writePinHigh(D5);
106 107
107 // initialize matrix state: all keys off 108 // initialize matrix state: all keys off
108 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 109 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -185,10 +186,10 @@ int serial_transaction(int master_changed) {
185 int ret=serial_update_buffers(); 186 int ret=serial_update_buffers();
186#endif 187#endif
187 if (ret ) { 188 if (ret ) {
188 if(ret==2) RXLED1; 189 if(ret==2) writePinLow(B0);
189 return 1; 190 return 1;
190 } 191 }
191 RXLED0; 192 writePinHigh(B0);
192 memcpy(&matrix[slaveOffset], 193 memcpy(&matrix[slaveOffset],
193 (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); 194 (void *)serial_slave_buffer, sizeof(serial_slave_buffer));
194 return 0; 195 return 0;
@@ -239,7 +240,7 @@ uint8_t matrix_master_scan(void) {
239 if( serial_transaction(mchanged) ) { 240 if( serial_transaction(mchanged) ) {
240#endif 241#endif
241 // turn on the indicator led when halves are disconnected 242 // turn on the indicator led when halves are disconnected
242 TXLED1; 243 writePinLow(D5);
243 244
244 error_count++; 245 error_count++;
245 246
@@ -252,7 +253,7 @@ uint8_t matrix_master_scan(void) {
252 } 253 }
253 } else { 254 } else {
254 // turn off the indicator led on no error 255 // turn off the indicator led on no error
255 TXLED0; 256 writePinHigh(D5);
256 error_count = 0; 257 error_count = 0;
257 } 258 }
258 matrix_scan_quantum(); 259 matrix_scan_quantum();
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();
diff --git a/keyboards/yosino58/rev1/matrix.c b/keyboards/yosino58/rev1/matrix.c
index 718cc5744..20efb6922 100644
--- a/keyboards/yosino58/rev1/matrix.c
+++ b/keyboards/yosino58/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"
@@ -102,9 +102,10 @@ void matrix_init(void)
102 unselect_rows(); 102 unselect_rows();
103 init_cols(); 103 init_cols();
104 104
105 TX_RX_LED_INIT; 105 setPinOutput(B0);
106 TXLED0; 106 setPinOutput(D5);
107 RXLED0; 107 writePinHigh(D5);
108 writePinHigh(B0);
108 109
109 // initialize matrix state: all keys off 110 // initialize matrix state: all keys off
110 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 111 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
189 int ret=serial_update_buffers(); 190 int ret=serial_update_buffers();
190#endif 191#endif
191 if (ret ) { 192 if (ret ) {
192 if(ret==2) RXLED1; 193 if(ret==2) writePinLow(B0);
193 return 1; 194 return 1;
194 } 195 }
195 RXLED0; 196 writePinHigh(B0);
196 memcpy(&matrix[slaveOffset], 197 memcpy(&matrix[slaveOffset],
197 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); 198 (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
198 return 0; 199 return 0;
@@ -241,7 +242,7 @@ uint8_t matrix_master_scan(void) {
241 if( serial_transaction(mchanged) ) { 242 if( serial_transaction(mchanged) ) {
242#endif 243#endif
243 // turn on the indicator led when halves are disconnected 244 // turn on the indicator led when halves are disconnected
244 TXLED1; 245 writePinLow(D5);
245 246
246 error_count++; 247 error_count++;
247 248
@@ -254,7 +255,7 @@ uint8_t matrix_master_scan(void) {
254 } 255 }
255 } else { 256 } else {
256 // turn off the indicator led on no error 257 // turn off the indicator led on no error
257 TXLED0; 258 writePinHigh(D5);
258 error_count = 0; 259 error_count = 0;
259 } 260 }
260 matrix_scan_quantum(); 261 matrix_scan_quantum();
diff --git a/keyboards/zinc/rev1/matrix.c b/keyboards/zinc/rev1/matrix.c
index 220954f05..df674ce14 100644
--- a/keyboards/zinc/rev1/matrix.c
+++ b/keyboards/zinc/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"
@@ -102,9 +102,10 @@ void matrix_init(void)
102 unselect_rows(); 102 unselect_rows();
103 init_cols(); 103 init_cols();
104 104
105 TX_RX_LED_INIT; 105 setPinOutput(B0);
106 TXLED0; 106 setPinOutput(D5);
107 RXLED0; 107 writePinHigh(D5);
108 writePinHigh(B0);
108 109
109 // initialize matrix state: all keys off 110 // initialize matrix state: all keys off
110 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 111 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
189 int ret=serial_update_buffers(); 190 int ret=serial_update_buffers();
190#endif 191#endif
191 if (ret ) { 192 if (ret ) {
192 if(ret==2) RXLED1; 193 if(ret==2) writePinLow(B0);
193 return 1; 194 return 1;
194 } 195 }
195 RXLED0; 196 writePinHigh(B0);
196 memcpy(&matrix[slaveOffset], 197 memcpy(&matrix[slaveOffset],
197 (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); 198 (void *)serial_slave_buffer, sizeof(serial_slave_buffer));
198 return 0; 199 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();
diff --git a/keyboards/zinc/reva/matrix.c b/keyboards/zinc/reva/matrix.c
index 220954f05..5b58500db 100644
--- a/keyboards/zinc/reva/matrix.c
+++ b/keyboards/zinc/reva/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"
@@ -102,9 +102,10 @@ void matrix_init(void)
102 unselect_rows(); 102 unselect_rows();
103 init_cols(); 103 init_cols();
104 104
105 TX_RX_LED_INIT; 105 setPinOutput(B0);
106 TXLED0; 106 setPinOutput(D5);
107 RXLED0; 107 writePinHigh(B0);
108 writePinHigh(D5);
108 109
109 // initialize matrix state: all keys off 110 // initialize matrix state: all keys off
110 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 111 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
189 int ret=serial_update_buffers(); 190 int ret=serial_update_buffers();
190#endif 191#endif
191 if (ret ) { 192 if (ret ) {
192 if(ret==2) RXLED1; 193 if(ret==2) writePinLow(B0);
193 return 1; 194 return 1;
194 } 195 }
195 RXLED0; 196 writePinHigh(B0);
196 memcpy(&matrix[slaveOffset], 197 memcpy(&matrix[slaveOffset],
197 (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); 198 (void *)serial_slave_buffer, sizeof(serial_slave_buffer));
198 return 0; 199 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();