Переглянути джерело

esp_phy: move lib_printf.c to esp_phy

 * fix the issue when esp32h2 target using phy_printf and rtc_printf
likunqiao 4 роки тому
батько
коміт
7aa2577d86

+ 1 - 0
components/esp_phy/CMakeLists.txt

@@ -13,6 +13,7 @@ if(IDF_TARGET STREQUAL "esp32h2")
 else()
     set(srcs "src/phy_init.c")
 endif()
+    list(APPEND srcs "src/lib_printf.c")
 
 idf_build_get_property(build_dir BUILD_DIR)
 

+ 6 - 14
components/esp_wifi/src/lib_printf.c → components/esp_phy/src/lib_printf.c

@@ -1,16 +1,8 @@
-// Copyright 2016 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+/*
+ * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 /**
  * @file lib_printf.c
@@ -142,7 +134,7 @@ int wapi_printf(const char* format, ...)
 {
     va_list arg;
     va_start(arg, format);
-    int res = lib_printf("coexist", format, arg);
+    int res = lib_printf("wapi", format, arg);
     va_end(arg);
     return res;
 }

+ 0 - 1
components/esp_wifi/CMakeLists.txt

@@ -18,7 +18,6 @@ if(CONFIG_ESP32_WIFI_ENABLED)
 
     set(srcs
         "src/coexist.c"
-        "src/lib_printf.c"
         "src/mesh_event.c"
         "src/smartconfig.c"
         "src/smartconfig_ack.c"