Skip to content

Commit

Permalink
cpu/esp32: fixup after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed May 2, 2019
1 parent 949eb6d commit acb5493
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions cpu/esp32/periph/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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
}
};
Expand Down

0 comments on commit acb5493

Please sign in to comment.