esp_wifi: optimize phy version log

This commit is contained in:
ChenJianxing 2020-11-13 16:11:11 +08:00 committed by xiehang
parent 18b6ed65f1
commit f4bb2b466c
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -640,6 +640,9 @@ static void __attribute((unused)) esp_phy_reduce_tx_power(esp_phy_init_data_t* i
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) {