From 64e45c7b4c68762fa5ab7b68917d6c8478dd5370 Mon Sep 17 00:00:00 2001 From: yangfeng Date: Fri, 17 Oct 2025 19:05:13 +0800 Subject: [PATCH] fix: delete the file components/esp_coex/src/lib_printf.c --- components/esp_coex/src/lib_printf.c | 52 ---------------------------- 1 file changed, 52 deletions(-) delete mode 100644 components/esp_coex/src/lib_printf.c diff --git a/components/esp_coex/src/lib_printf.c b/components/esp_coex/src/lib_printf.c deleted file mode 100644 index a8429225b4..0000000000 --- a/components/esp_coex/src/lib_printf.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016-2025 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @file lib_printf.c - * - * This file contains library-specific printf functions - * used by WiFi libraries in the `lib` directory. - * These function are used to catch any output which gets printed - * by libraries, and redirect it to ESP_LOG macros. - * - * Eventually WiFi libraries will use ESP_LOG functions internally - * and these definitions will be removed. - */ - -#include -#include -#include "esp_log.h" -#include "esp_attr.h" - -#define VPRINTF_STACK_BUFFER_SIZE 80 - -static int lib_printf(const char* tag, const char* format, va_list arg) -{ - char temp[VPRINTF_STACK_BUFFER_SIZE]; - int len = vsnprintf(temp, sizeof(temp) - 1, format, arg); - temp[sizeof(temp) - 1] = 0; - int i; - for (i = len - 1; i >= 0; --i) { - if (temp[i] != '\n' && temp[i] != '\r' && temp[i] != ' ') { - break; - } - temp[i] = 0; - } - if (i > 0) { - ESP_LOGI(tag, "%s", temp); - } - va_end(arg); - return len; -} - -int coexist_printf(const char* format, ...) -{ - va_list arg = {}; - va_start(arg, format); - int res = lib_printf("coexist", format, arg); - va_end(arg); - return res; -}