From d836ea0107eb68752cf1570a4abd87a36b04449b Mon Sep 17 00:00:00 2001 From: diplfranzhoepfinger Date: Sun, 18 Aug 2024 20:28:04 +0200 Subject: [PATCH] Update uart_select_example_main.c --- .../uart/uart_select/main/uart_select_example_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/peripherals/uart/uart_select/main/uart_select_example_main.c b/examples/peripherals/uart/uart_select/main/uart_select_example_main.c index 7364290a3c..af900ed47e 100644 --- a/examples/peripherals/uart/uart_select/main/uart_select_example_main.c +++ b/examples/peripherals/uart/uart_select/main/uart_select_example_main.c @@ -7,6 +7,7 @@ CONDITIONS OF ANY KIND, either express or implied. */ #include +#include #include #include #include @@ -63,7 +64,7 @@ static void uart_select_task(void *arg) s = select(fd + 1, &rfds, NULL, NULL, &tv); if (s < 0) { - ESP_LOGE(TAG, "Select failed: errno %d", errno); + ESP_LOGE(TAG, "Select failed: errno %d (%s)", errno, strerror(errno)); break; } else if (s == 0) { ESP_LOGI(TAG, "Timeout has been reached and nothing has been received");