From acb549336a3404a3556f089983074a7d26f4c260 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 29 Mar 2019 08:25:57 +0100 Subject: [PATCH] cpu/esp32: fixup after rebase --- cpu/esp32/periph/uart.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/cpu/esp32/periph/uart.c b/cpu/esp32/periph/uart.c index a06f96abeeb26..6e5d4d25226e3 100644 --- a/cpu/esp32/periph/uart.c +++ b/cpu/esp32/periph/uart.c @@ -50,8 +50,7 @@ struct uart_hw_t { uart_dev_t* regs; /* pointer to register data struct of the UART device */ - uint8_t pin_txd; /* TxD pin */ - uint8_t pin_rxd; /* RxD pin */ + uint8_t mod; /* peripheral hardware module of the UART interface */ bool used; /* indicates whether UART is used */ uint32_t baudrate; /* used baudrate */ uart_data_bits_t data; /* used data bits */ @@ -67,55 +66,38 @@ struct uart_hw_t { static struct uart_hw_t _uarts[] = { { .regs = &UART0, - .pin_txd = GPIO1, - .pin_rxd = GPIO3, + .mod = PERIPH_UART0_MODULE, .used = false, .baudrate = STDIO_UART_BAUDRATE, .data = UART_DATA_BITS_8, .stop = UART_STOP_BITS_1, .parity = UART_PARITY_NONE, - .mod = PERIPH_UART0_MODULE, .signal_txd = U0TXD_OUT_IDX, .signal_rxd = U0RXD_IN_IDX, - .baudrate = STDIO_UART_BAUDRATE, - .used = false, .int_src = ETS_UART0_INTR_SOURCE }, - #if defined(UART1_TXD) && defined(UART1_RXD) - { .regs = &UART1, - .pin_txd = UART1_TXD, - .pin_rxd = UART1_RXD, + { + .regs = &UART1, + .mod = PERIPH_UART1_MODULE, .used = false, .baudrate = STDIO_UART_BAUDRATE, .data = UART_DATA_BITS_8, .stop = UART_STOP_BITS_1, .parity = UART_PARITY_NONE, - { - .regs = &UART1, - .mod = PERIPH_UART1_MODULE, .signal_txd = U1TXD_OUT_IDX, .signal_rxd = U1RXD_IN_IDX, - .baudrate = STDIO_UART_BAUDRATE, - .used = false, .int_src = ETS_UART1_INTR_SOURCE }, - #endif - #if defined(UART2_TXD) && defined(UART2_RXD) - { .regs = &UART2, - .pin_txd = UART2_TXD, - .pin_rxd = UART2_RXD, + { + .regs = &UART2, + .mod = PERIPH_UART2_MODULE, .used = false, .baudrate = STDIO_UART_BAUDRATE, .data = UART_DATA_BITS_8, .stop = UART_STOP_BITS_1, .parity = UART_PARITY_NONE, - { - .regs = &UART2, - .mod = PERIPH_UART2_MODULE, .signal_txd = U2TXD_OUT_IDX, .signal_rxd = U2RXD_IN_IDX, - .baudrate = STDIO_UART_BAUDRATE, - .used = false, .int_src = ETS_UART2_INTR_SOURCE } };