Skip to content

Commit

Permalink
Minor fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
pelrun committed Jan 7, 2019
1 parent 71028fc commit 5d584dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
23 changes: 12 additions & 11 deletions quantum/split_common/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,6 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)

#elif (DIODE_DIRECTION == ROW2COL)

static void init_pins(void)
{
unselect_cols();
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
setPinInputHigh(row_pins[x]);
}
}

static void select_col(uint8_t col)
{
writePinLow(col_pins[col]);
Expand All @@ -191,6 +183,14 @@ static void unselect_cols(void)
}
}

static void init_pins(void)
{
unselect_cols();
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
setPinInputHigh(row_pins[x]);
}
}

static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
{
bool matrix_changed = false;
Expand Down Expand Up @@ -537,6 +537,10 @@ static void slave_transport(void) {
#endif
}

__attribute__ ((weak))
void matrix_slave_scan_user(void) {
}

uint8_t matrix_scan(void)
{
uint8_t ret = _matrix_scan();
Expand Down Expand Up @@ -609,6 +613,3 @@ __attribute__ ((weak))
void matrix_scan_user(void) {
}

__attribute__ ((weak))
void matrix_slave_scan_user(void) {
}
3 changes: 2 additions & 1 deletion quantum/split_common/split_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ bool is_keyboard_master(void)
if (usbstate == UNKNOWN)
{
USBCON |= (1 << OTGPADE); // enables VBUS pad
_delay_us(5);
wait_us(5);

usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
}

Expand Down

0 comments on commit 5d584dc

Please sign in to comment.