mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-31 01:20:44 +00:00
esp32: fix warning for changes in esp-idf 5.3
This commit is contained in:
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);
|
||||
@ -215,4 +225,4 @@ void btstack_stdin_setup(void (*handler)(char c)){
|
||||
(void) handler;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ESP_CONSOLE_UART */
|
||||
#endif /* CONFIG_ESP_CONSOLE_UART */
|
||||
|
Loading…
x
Reference in New Issue
Block a user