1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-04-15 14:42:31 +00:00

esp32: fix warning for changes in esp-idf 5.3

This commit is contained in:
Matthias Ringwald 2024-12-10 14:53:38 +01:00
parent 4b86d035e6
commit 4839cdf83e

@ -62,9 +62,15 @@
#include "driver/uart.h"
#include "esp_vfs_dev.h"
#include "esp_idf_version.h"
#include "esp_log.h"
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#include "driver/uart_vfs.h"
#else
#include "esp_vfs_dev.h"
#endif
static const char *TAG = "btstack_stdio";
// handle esp-idf change from CONFIG_CONSOLE_UART_NUM to CONFIG_ESP_CONSOLE_UART_NUM
@ -192,7 +198,11 @@ void btstack_stdio_init(void) {
0));
/* Tell VFS to use UART driver */
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
uart_vfs_dev_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
#else
esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM);
#endif
//Create a task to block on UART RX
xTaskCreate(btstack_stdio_task, "btstack_stdio", 2048, NULL, 12, NULL);