mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
Merge branch 'fix/fix_issues_when_support_multiple_phy_init_data_v6.0' into 'release/v6.0'
Fix/fix issues when support multiple phy init data v6.0(backport v6.0) See merge request espressif/esp-idf!52585
This commit is contained in:
Binary file not shown.
@@ -27,8 +27,8 @@ extern "C" {
|
||||
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
|
||||
#define PHY_CRC_ALGORITHM 1
|
||||
#define PHY_COUNTRY_CODE_LEN 2
|
||||
#define PHY_INIT_DATA_TYPE_OFFSET 254
|
||||
#define PHY_SUPPORT_MULTIPLE_BIN_OFFSET 253
|
||||
#define PHY_INIT_DATA_TYPE_OFFSET 126
|
||||
#define PHY_SUPPORT_MULTIPLE_BIN_OFFSET 125
|
||||
#endif
|
||||
|
||||
extern const char phy_init_magic_pre[];
|
||||
|
||||
@@ -283,6 +283,16 @@ void phy_wait_freq_hw_hop_done(void);
|
||||
void phy_track_temp_debug(uint8_t debug_flag, uint8_t track_temp);
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
|
||||
/**
|
||||
* @brief Get the PHY init data type that is currently applied to the PHY
|
||||
*
|
||||
* @return the applied init data type, ESP_PHY_INIT_DATA_TYPE_DEFAULT as long as no
|
||||
* certified init data has been selected by a country code
|
||||
*/
|
||||
phy_init_data_type_t esp_phy_get_init_data_type(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -118,6 +118,13 @@ static uint8_t s_phy_modem_init_ref = 0;
|
||||
extern uint8_t multi_phy_init_data_bin_start[] asm("_binary_phy_multiple_init_data_bin_start");
|
||||
extern uint8_t multi_phy_init_data_bin_end[] asm("_binary_phy_multiple_init_data_bin_end");
|
||||
#endif
|
||||
|
||||
/* Both flags live in the last bytes of an init data entry */
|
||||
_Static_assert(PHY_INIT_DATA_TYPE_OFFSET == sizeof(esp_phy_init_data_t) - 2,
|
||||
"PHY_INIT_DATA_TYPE_OFFSET does not match the PHY init data of this target");
|
||||
_Static_assert(PHY_SUPPORT_MULTIPLE_BIN_OFFSET == sizeof(esp_phy_init_data_t) - 3,
|
||||
"PHY_SUPPORT_MULTIPLE_BIN_OFFSET does not match the PHY init data of this target");
|
||||
|
||||
/* The following static variables are only used by Wi-Fi tasks, so they can be handled without lock */
|
||||
static phy_init_data_type_t s_phy_init_data_type = 0;
|
||||
|
||||
@@ -1208,6 +1215,11 @@ esp_err_t esp_phy_update_init_data(phy_init_data_type_t init_data_type)
|
||||
free(init_data_store);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
phy_init_data_type_t esp_phy_get_init_data_type(void)
|
||||
{
|
||||
return s_current_apply_phy_init_data;
|
||||
}
|
||||
#endif
|
||||
|
||||
esp_err_t esp_phy_update_country_info(const char *country)
|
||||
|
||||
Reference in New Issue
Block a user