Skip to content

Commit

Permalink
[WIRED] Keep controller order for FC Keyboard
Browse files Browse the repository at this point in the history
A patch for Family BASIC allow to read P1 from D1
  • Loading branch information
darthcloud committed Nov 22, 2023
1 parent 2fac77b commit 9302b8d
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions main/wired/npiso_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,19 +703,9 @@ void npiso_init(uint32_t package)
io_conf.pull_up_en = GPIO_PULLUP_ENABLE;
gpio_config_iram(&io_conf);
if (!(GPIO.in1.val & (1U << (FC_ONLY_MODE_PIN - 32)))) {
if (dev_type[0] == DEV_FC_KB) {
gpio_pins[0][NPISO_CLK] = P2_CLK_PIN;
gpio_mask[0][NPISO_CLK] = P2_CLK_MASK;
gpio_pins[0][NPISO_D0] = P2_D0_PIN;
gpio_mask[0][NPISO_D0] = P2_D0_MASK;
gpio_pins[1][NPISO_CLK] = P1_CLK_PIN;
gpio_mask[1][NPISO_CLK] = P1_CLK_MASK;
gpio_pins[1][NPISO_D0] = P1_D1_PIN;
gpio_mask[1][NPISO_D0] = P1_D1_MASK;
}
else {
gpio_pins[0][NPISO_D0] = P1_D1_PIN;
gpio_mask[0][NPISO_D0] = P1_D1_MASK;
gpio_pins[0][NPISO_D0] = P1_D1_PIN;
gpio_mask[0][NPISO_D0] = P1_D1_MASK;
if (!(dev_type[0] == DEV_FC_KB)) {
gpio_pins[1][NPISO_D0] = P2_D1_PIN;
gpio_mask[1][NPISO_D0] = P2_D1_MASK;
}
Expand Down

0 comments on commit 9302b8d

Please sign in to comment.