Function esp_idf_sys::esp_wifi_start

source ·
pub unsafe extern "C" fn esp_wifi_start() -> esp_err_t
Expand description

@brief Start WiFi according to current configuration If mode is WIFI_MODE_STA, it creates station control block and starts station If mode is WIFI_MODE_AP, it creates soft-AP control block and starts soft-AP If mode is WIFI_MODE_APSTA, it creates soft-AP and station control block and starts soft-AP and station If mode is WIFI_MODE_NAN, it creates NAN control block and starts NAN

@return

  • ESP_OK: succeed
  • ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  • ESP_ERR_INVALID_ARG: It doesn’t normally happen, the function called inside the API was passed invalid argument, user should check if the wifi related config is correct
  • ESP_ERR_NO_MEM: out of memory
  • ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
  • ESP_FAIL: other WiFi internal errors