pull/18/head
Jesse Vincent 9 years ago
parent ffb6828939
commit 9da546f174

@ -34,55 +34,55 @@ void implementation_led_sync() {
LED.sync();
}
void implementation_scan_row(byte row) {
if (left_initted) {
leftsx1509.updatePinState(left_rowpins[row], LOW);
leftsx1509.sendPinStates();
leftsx1509.fetchPinStates();
}
if (right_initted) {
rightsx1509.updatePinState(right_rowpins[row], LOW);
rightsx1509.sendPinStates();
rightsx1509.fetchPinStates();
void implementation_scan_row(byte row) {
if (left_initted) {
leftsx1509.updatePinState(left_rowpins[row], LOW);
leftsx1509.sendPinStates();
leftsx1509.fetchPinStates();
}
if (right_initted) {
rightsx1509.updatePinState(right_rowpins[row], LOW);
rightsx1509.sendPinStates();
rightsx1509.fetchPinStates();
}
}
}
void implementation_finish_scanning_row(byte row) {
if (left_initted)
leftsx1509.updatePinState(left_rowpins[row], HIGH);
if (right_initted)
rightsx1509.updatePinState(right_rowpins[row], HIGH);
}
if (left_initted)
leftsx1509.updatePinState(left_rowpins[row], HIGH);
if (right_initted)
rightsx1509.updatePinState(right_rowpins[row], HIGH);
}
uint8_t implementation_scan_left_col(byte row, byte col,uint8_t state) {
//If we see an electrical connection on I->J,
//If we see an electrical connection on I->J,
state <<= 1;
state <<= 1;
if (left_initted && leftsx1509.readPrefetchedPin(left_colpins[col])) {
state |= 0;
} else {
state |= 1;
}
return state;
if (left_initted && leftsx1509.readPrefetchedPin(left_colpins[col])) {
state |= 0;
} else {
state |= 1;
}
return state;
}
uint8_t implementation_scan_right_col(byte row, byte col, uint8_t state) {
//If we see an electrical connection on I->J,
//If we see an electrical connection on I->J,
state <<= 1;
state <<= 1;
if (right_initted && rightsx1509.readPrefetchedPin(right_colpins[col])) {
state |= 0;
} else {
state |= 1;
}
if (right_initted && rightsx1509.readPrefetchedPin(right_colpins[col])) {
state |= 0;
} else {
state |= 1;
}
return state;
return state;
}
@ -91,7 +91,7 @@ uint8_t implementation_scan_right_col(byte row, byte col, uint8_t state) {
boolean implementation_right_hand_connected(void) {
if (right_initted) {
return true;
} else {
} else {
return false;
}
}

@ -28,7 +28,7 @@ static uint8_t right_rowpins[]= {8,9,10,11};
#define KEYMAP_LIST KEYMAP_QWERTY KEYMAP_GENERIC_FN2 KEYMAP_NUMPAD
void implementation_scan_row(byte row);
void implementation_finish_scanning_row(byte row);
void implementation_finish_scanning_row(byte row);
uint8_t implementation_scan_right_col(byte row, byte col, uint8_t state);
uint8_t implementation_scan_left_col(byte row, byte col, uint8_t state);
void implementation_pins_setup();

@ -78,7 +78,7 @@ void scan_matrix() {
TS("calling send_key_event")
send_key_event(row, col);
if (implementation_right_hand_connected()) {
send_key_event(row, (COLS - 1) - col);
}

Loading…
Cancel
Save