1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 20:06:40 +00:00

Fix uart pinmux configuration

This commit is contained in:
hexkyz 2019-07-21 21:21:13 +01:00
parent 7cee36544c
commit 0c688189f6
3 changed files with 24 additions and 24 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;