Просмотр исходного кода

esp_wifi: select slowclk as coex hardware timer source on esp32c2

liuning 3 лет назад
Родитель
Сommit
bc2f2a3100

+ 1 - 1
components/esp_rom/esp32c2/ld/esp32c2.rom.ld

@@ -2195,7 +2195,7 @@ coex_schm_unlock = 0x400021a8;
 coex_status_get = 0x400021ac;
 coex_wifi_release = 0x400021b0;
 esp_coex_ble_conn_dynamic_prio_get = 0x400021b4;
-coex_hw_timer_tick_get = 0x400021b8;
+/*coex_hw_timer_tick_get = 0x400021b8;*/
 /* Data (.data, .bss, .rodata) */
 coex_env_ptr = 0x3fcdfabc;
 coex_pti_tab_ptr = 0x3fcdfab8;

+ 2 - 0
components/esp_wifi/esp32c2/esp_adapter.c

@@ -789,5 +789,7 @@ coex_adapter_funcs_t g_coex_adapter_funcs = {
     ._malloc_internal =  malloc_internal_wrapper,
     ._free = free,
     ._esp_timer_get_time = esp_timer_get_time,
+    ._env_is_chip = env_is_chip_wrapper,
+    ._slowclk_cal_get = esp_clk_slowclk_cal_get_wrapper,
     ._magic = COEX_ADAPTER_MAGIC,
 };

+ 7 - 13
components/esp_wifi/include/esp_coexist_adapter.h

@@ -1,16 +1,8 @@
-// Copyright 2019 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: 2019-2022 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 #ifndef __ESP_COEXIST_ADAPTER_H__
 #define __ESP_COEXIST_ADAPTER_H__
@@ -51,6 +43,8 @@ typedef struct {
     void (* _timer_arm_us)(void *ptimer, uint32_t us, bool repeat);
 #endif
     int64_t (* _esp_timer_get_time)(void);
+    bool (* _env_is_chip)(void);
+    uint32_t (* _slowclk_cal_get)(void);
     int32_t _magic;
 } coex_adapter_funcs_t;
 

+ 1 - 1
components/esp_wifi/lib

@@ -1 +1 @@
-Subproject commit 4b1daf3775bc399296482ef2760f1efe9855e6f1
+Subproject commit 1cf0524060df61fc67d1f5527775cc2956050791

+ 0 - 1
tools/ci/check_copyright_ignore.txt

@@ -674,7 +674,6 @@ components/esp_system/ubsan.c
 components/esp_timer/test/test_esp_timer.c
 components/esp_timer/test/test_esp_timer_light_sleep.c
 components/esp_timer/test/test_ets_timer.c
-components/esp_wifi/include/esp_coexist_adapter.h
 components/esp_wifi/include/esp_mesh_internal.h
 components/esp_wifi/include/esp_private/esp_wifi_types_private.h
 components/esp_wifi/include/esp_private/wifi_types.h