Skip to content

Commit

Permalink
[N64] Reduce scope of N64 digital workaround to N64 port 1 only
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Jun 28, 2022
1 parent cc4c824 commit 8e408d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main/wired/nsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,14 @@ void nsi_init(void) {
RMT.conf_ch[rmt_ch[i][system]].conf1.rx_filter_en = 0;

PIN_FUNC_SELECT(GPIO_PIN_MUX_REG_IRAM[gpio_pin[i]], PIN_FUNC_GPIO);
gpio_set_direction_iram(gpio_pin[i], GPIO_MODE_INPUT_OUTPUT); /* Bidirectional open-drain */
if (wired_adapter.system_id == N64 && i == 0) {
/* Bidirectional push-pull to workaround N64 Digital OSD glitching the line on port 1 */
gpio_set_direction_iram(gpio_pin[i], GPIO_MODE_INPUT_OUTPUT);
}
else {
/* Bidirectional open-drain */
gpio_set_direction_iram(gpio_pin[i], GPIO_MODE_INPUT_OUTPUT_OD);
}
gpio_matrix_out(gpio_pin[i], RMT_SIG_OUT0_IDX + rmt_ch[i][system], 0, 0);
gpio_matrix_in(gpio_pin[i], RMT_SIG_IN0_IDX + rmt_ch[i][system], 0);

Expand Down

0 comments on commit 8e408d9

Please sign in to comment.