thermosphere: uart fixes/ still not working

This commit is contained in:
TuxSH 2019-07-21 22:27:12 +02:00
parent f6e1cff5f8
commit e6adccce6e
2 changed files with 12 additions and 12 deletions

View file

@ -68,10 +68,10 @@ static inline uint32_t get_clk_source_val(CarDevice dev) {
static inline uint32_t get_clk_source_div(CarDevice dev) { static inline uint32_t get_clk_source_div(CarDevice dev) {
switch (dev) { switch (dev) {
case CARDEVICE_UARTA: return 1 << 24; // enable bit case CARDEVICE_UARTA: return 0;
case CARDEVICE_UARTB: return 1 << 24; // enable bit case CARDEVICE_UARTB: return 0;
case CARDEVICE_UARTC: return 1 << 24; // enable bit case CARDEVICE_UARTC: return 0;
case CARDEVICE_UARTD: return 1 << 24; // enable bit case CARDEVICE_UARTD: return 0;
case CARDEVICE_I2C1: return 0; case CARDEVICE_I2C1: return 0;
case CARDEVICE_I2C5: return 0; case CARDEVICE_I2C5: return 0;
case CARDEVICE_TZRAM: return 0; case CARDEVICE_TZRAM: return 0;

View file

@ -26,26 +26,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;