Support user_rf_pre_init() for SDK v3.0 #8888
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For SDK v3.0+, early system calls that were called from user_rf_pre_init (SDK v2.2) need to be called from user_pre_init.
Moved call to
user_rf_pre_init()
, fromuser_init()
to the end ofuser_pre_init()
, so we can still perform early calls like system_phy_set_rfoption(rf_mode), system_phy_set_powerup_option(2), etc.The hint for where to place
user_rf_pre_init()
came from ESP-FAQ : 2.2.4 How to modify the default method of RF calibration in ESP8266? (Side note, I think the FAQ has a typo. When they refer to byte 115, I think they meant 114.)The specific sentence of interest: "Call system_phy_set_powerup_option(3) in function user_pre_init or user_rf_pre_init"
Edited for clarity