diff --git a/port/esp32/components/btstack/btstack_stdin_esp32.c b/port/esp32/components/btstack/btstack_stdin_esp32.c index 44ca55933..77f3a57b0 100644 --- a/port/esp32/components/btstack/btstack_stdin_esp32.c +++ b/port/esp32/components/btstack/btstack_stdin_esp32.c @@ -53,6 +53,11 @@ #include "freertos/task.h" #include "driver/uart.h" +// handle esp-idf change from CONFIG_CONSOLE_UART_NUM to CONFIG_ESP_CONSOLE_UART_NUM +#ifndef CONFIG_ESP_CONSOLE_UART_NUM +#define CONFIG_ESP_CONSOLE_UART_NUM CONFIG_CONSOLE_UART_NUM +#endif + #define BUF_SIZE (UART_FIFO_LEN) volatile int stdin_character_received; @@ -72,11 +77,11 @@ static void btstack_stdin_task(void *arg){ UNUSED(arg); //Install UART driver, and get the queue. - uart_driver_install(CONFIG_CONSOLE_UART_NUM, UART_FIFO_LEN * 2, UART_FIFO_LEN * 2, 0, NULL, 0); + uart_driver_install(CONFIG_ESP_CONSOLE_UART_NUM, UART_FIFO_LEN * 2, UART_FIFO_LEN * 2, 0, NULL, 0); do { // read single byte - uart_read_bytes(CONFIG_CONSOLE_UART_NUM, (uint8_t*) &stdin_character, 1, portMAX_DELAY); + uart_read_bytes(CONFIG_ESP_CONSOLE_UART_NUM, (uint8_t*) &stdin_character, 1, portMAX_DELAY); stdin_character_received = 1; // request poll