forked from mirrors/qmk_userspace
parent
03ed819717
commit
d597af9e1e
12 changed files with 99 additions and 418 deletions
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "split_util.h"
|
||||
#include "pro_micro.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
# include "i2c.h"
|
||||
|
@ -99,9 +99,10 @@ void matrix_init(void)
|
|||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
TXLED0;
|
||||
RXLED0;
|
||||
setPinOutput(B0);
|
||||
setPinOutput(D5);
|
||||
writePinHigh(B0);
|
||||
writePinHigh(D5);
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
|
@ -180,10 +181,10 @@ int serial_transaction(void) {
|
|||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||
int ret=serial_update_buffers();
|
||||
if (ret ) {
|
||||
if(ret==2)RXLED1;
|
||||
if(ret==2) writePinLow(B0);
|
||||
return 1;
|
||||
}
|
||||
RXLED0;
|
||||
writePinHigh(B0);
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||
}
|
||||
|
@ -235,7 +236,7 @@ uint8_t matrix_master_scan(void) {
|
|||
if( serial_transaction() ) {
|
||||
#endif
|
||||
// turn on the indicator led when halves are disconnected
|
||||
TXLED1;
|
||||
writePinLow(D5);
|
||||
|
||||
error_count++;
|
||||
|
||||
|
@ -248,7 +249,7 @@ uint8_t matrix_master_scan(void) {
|
|||
}
|
||||
} else {
|
||||
// turn off the indicator led on no error
|
||||
TXLED0;
|
||||
writePinHigh(D5);
|
||||
error_count = 0;
|
||||
}
|
||||
matrix_scan_quantum();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue