[][src]Function esp_idf_bindgen::esp_wifi_set_country

pub unsafe extern "C" fn esp_wifi_set_country(
    country: *const wifi_country_t
) -> esp_err_t

@brief configure country info

@attention 1. The default country is {.cc="CN", .schan=1, .nchan=13, policy=WIFI_COUNTRY_POLICY_AUTO} @attention 2. When the country policy is WIFI_COUNTRY_POLICY_AUTO, the country info of the AP to which the station is connected is used. E.g. if the configured country info is {.cc="USA", .schan=1, .nchan=11} and the country info of the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14} then the country info that will be used is {.cc="JP", .schan=1, .nchan=14}. If the station disconnected from the AP the country info is set back back to the country info of the station automatically, {.cc="US", .schan=1, .nchan=11} in the example. @attention 3. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, always use the configured country info. @attention 4. When the country info is changed because of configuration or because the station connects to a different external AP, the country IE in probe response/beacon of the soft-AP is changed also. @attention 5. The country configuration is stored into flash. @attention 6. This API doesn't validate the per-country rules, it's up to the user to fill in all fields according to local regulations. @attention 7. When this API is called, the PHY init data will switch to the PHY init data type corresponding to the country info.

@param country the configured country info

@return