mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-24 10:38:01 +08:00
feat(wifi): refactor and add more wifi feature for 11n certificate
This commit is contained in:
@ -68,12 +68,7 @@ esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data, esp_phy_calibrat
|
||||
{
|
||||
esp_err_t status = ESP_OK;
|
||||
uint8_t sta_mac[6];
|
||||
uint8_t* local_init_data = calloc(1, 256);
|
||||
#ifdef CONFIG_CONSOLE_UART_BAUDRATE
|
||||
const uint32_t uart_baudrate = CONFIG_CONSOLE_UART_BAUDRATE;
|
||||
#else
|
||||
const uint32_t uart_baudrate = 74880; // ROM default baudrate
|
||||
#endif
|
||||
uint8_t *local_init_data = calloc(1, 256);
|
||||
|
||||
memcpy(local_init_data, init_data->params, 128);
|
||||
|
||||
@ -89,9 +84,16 @@ esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data, esp_phy_calibrat
|
||||
}
|
||||
|
||||
esp_efuse_mac_get_default(sta_mac);
|
||||
chip_init(local_init_data, sta_mac, uart_baudrate);
|
||||
ESP_LOGI(TAG, "phy ver: %d_%d", (READ_PERI_REG(0x6000107C) >> 16) & 0xFFF, READ_PERI_REG(0x6000107C) >> 28);
|
||||
get_data_from_rtc((uint8_t*)calibration_data);
|
||||
|
||||
int ret = register_chipv6_phy(local_init_data);
|
||||
if (ret) {
|
||||
ESP_LOGI(TAG, "phy register error, ret:%d", ret);
|
||||
}
|
||||
|
||||
phy_disable_agc();
|
||||
|
||||
ESP_LOGI(TAG, "phy ver: %d_%d", (READ_PERI_REG(0x6000107C)>>16)&0xFFF, READ_PERI_REG(0x6000107C)>>28);
|
||||
get_data_from_rtc((uint8_t *)calibration_data);
|
||||
|
||||
memcpy(rx_gain_dc_table, calibration_data->rx_gain_dc_table, 4 * 125);
|
||||
phy_rx_gain_dc_table = rx_gain_dc_table;
|
||||
|
Reference in New Issue
Block a user