From 9eb34fd153a07df2440bb0eeacebc0c5ffc761e6 Mon Sep 17 00:00:00 2001 From: ChenJianxing Date: Fri, 13 Nov 2020 16:11:11 +0800 Subject: [PATCH] esp_wifi: optimize phy version log --- components/esp_wifi/include/esp_phy_init.h | 7 +++++++ components/esp_wifi/src/phy_init.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/components/esp_wifi/include/esp_phy_init.h b/components/esp_wifi/include/esp_phy_init.h index 7c0d263b0d..70b55cbeb0 100644 --- a/components/esp_wifi/include/esp_phy_init.h +++ b/components/esp_wifi/include/esp_phy_init.h @@ -244,6 +244,13 @@ esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module); * microsecond since boot when phy/rf was last switched on */ int64_t esp_phy_rf_get_on_ts(void); + +/** + * @brief Get PHY lib version + * @return PHY lib version. + */ +char * get_phy_version_str(void); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/src/phy_init.c b/components/esp_wifi/src/phy_init.c index 2fb99c8919..a0421ac4a8 100644 --- a/components/esp_wifi/src/phy_init.c +++ b/components/esp_wifi/src/phy_init.c @@ -617,6 +617,9 @@ static void esp_phy_reduce_tx_power(esp_phy_init_data_t* init_data) void esp_phy_load_cal_and_init(phy_rf_module_t module) { + char * phy_version = get_phy_version_str(); + ESP_LOGI(TAG, "phy_version %s", phy_version); + esp_phy_calibration_data_t* cal_data = (esp_phy_calibration_data_t*) calloc(sizeof(esp_phy_calibration_data_t), 1); if (cal_data == NULL) {