mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
Fix uart pinmux configuration
This commit is contained in:
parent
7cee36544c
commit
0c688189f6
3 changed files with 24 additions and 24 deletions
|
@ -24,26 +24,26 @@ void uart_config(UartDevice dev) {
|
||||||
|
|
||||||
switch (dev) {
|
switch (dev) {
|
||||||
case UART_A:
|
case UART_A:
|
||||||
pinmux->uart1_rx = 0;
|
pinmux->uart1_tx = 0;
|
||||||
pinmux->uart1_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart1_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart1_rts = 0;
|
pinmux->uart1_rts = 0;
|
||||||
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_B:
|
case UART_B:
|
||||||
pinmux->uart2_rx = 0;
|
pinmux->uart2_tx = 0;
|
||||||
pinmux->uart2_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart2_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart2_rts = 0;
|
pinmux->uart2_rts = 0;
|
||||||
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_C:
|
case UART_C:
|
||||||
pinmux->uart3_rx = 0;
|
pinmux->uart3_tx = 0;
|
||||||
pinmux->uart3_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart3_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart3_rts = 0;
|
pinmux->uart3_rts = 0;
|
||||||
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_D:
|
case UART_D:
|
||||||
pinmux->uart4_rx = 0;
|
pinmux->uart4_tx = 0;
|
||||||
pinmux->uart4_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart4_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart4_rts = 0;
|
pinmux->uart4_rts = 0;
|
||||||
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -24,26 +24,26 @@ void uart_config(UartDevice dev) {
|
||||||
|
|
||||||
switch (dev) {
|
switch (dev) {
|
||||||
case UART_A:
|
case UART_A:
|
||||||
pinmux->uart1_rx = 0;
|
pinmux->uart1_tx = 0;
|
||||||
pinmux->uart1_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart1_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart1_rts = 0;
|
pinmux->uart1_rts = 0;
|
||||||
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_B:
|
case UART_B:
|
||||||
pinmux->uart2_rx = 0;
|
pinmux->uart2_tx = 0;
|
||||||
pinmux->uart2_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart2_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart2_rts = 0;
|
pinmux->uart2_rts = 0;
|
||||||
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_C:
|
case UART_C:
|
||||||
pinmux->uart3_rx = 0;
|
pinmux->uart3_tx = 0;
|
||||||
pinmux->uart3_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart3_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart3_rts = 0;
|
pinmux->uart3_rts = 0;
|
||||||
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_D:
|
case UART_D:
|
||||||
pinmux->uart4_rx = 0;
|
pinmux->uart4_tx = 0;
|
||||||
pinmux->uart4_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart4_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart4_rts = 0;
|
pinmux->uart4_rts = 0;
|
||||||
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -24,26 +24,26 @@ void uart_config(UartDevice dev) {
|
||||||
|
|
||||||
switch (dev) {
|
switch (dev) {
|
||||||
case UART_A:
|
case UART_A:
|
||||||
pinmux->uart1_rx = 0;
|
pinmux->uart1_tx = 0;
|
||||||
pinmux->uart1_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart1_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart1_rts = 0;
|
pinmux->uart1_rts = 0;
|
||||||
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart1_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_B:
|
case UART_B:
|
||||||
pinmux->uart2_rx = 0;
|
pinmux->uart2_tx = 0;
|
||||||
pinmux->uart2_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart2_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart2_rts = 0;
|
pinmux->uart2_rts = 0;
|
||||||
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart2_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_C:
|
case UART_C:
|
||||||
pinmux->uart3_rx = 0;
|
pinmux->uart3_tx = 0;
|
||||||
pinmux->uart3_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart3_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart3_rts = 0;
|
pinmux->uart3_rts = 0;
|
||||||
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart3_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
case UART_D:
|
case UART_D:
|
||||||
pinmux->uart4_rx = 0;
|
pinmux->uart4_tx = 0;
|
||||||
pinmux->uart4_tx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
pinmux->uart4_rx = (PINMUX_INPUT | PINMUX_PULL_UP);
|
||||||
pinmux->uart4_rts = 0;
|
pinmux->uart4_rts = 0;
|
||||||
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
pinmux->uart4_cts = (PINMUX_INPUT | PINMUX_PULL_DOWN);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue