Browse Source

drivers: uart: esp32: fix driver initialization id number

The select uart instance used in uart driver initialization won't
work as expected because the index used was not correct. This
fixes the macro call to use proper index value.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
pull/42912/head
Sylvio Alves 3 years ago committed by Anas Nashif
parent
commit
bf08b5f0ed
  1. 2
      drivers/serial/uart_esp32.c

2
drivers/serial/uart_esp32.c

@ -575,7 +575,7 @@ static struct uart_esp32_data uart_esp32_data_##idx = { \ @@ -575,7 +575,7 @@ static struct uart_esp32_data uart_esp32_data_##idx = { \
}, \
.hal = { \
.dev = \
(uart_dev_t *)DT_REG_ADDR(DT_NODELABEL(uart##idx)), \
(uart_dev_t *)DT_INST_REG_ADDR(idx), \
}, \
}; \
\

Loading…
Cancel
Save