Skip to content

Commit

Permalink
Merge branch 'bugfix/check_blufi_enable' into 'master'
Browse files Browse the repository at this point in the history
esp_peripherals: Check if blufi enabled around call to ble_config_start or ble_config_stop

See merge request adf/esp-adf-internal!1248
  • Loading branch information
jason-mao committed Aug 8, 2024
2 parents 501921b + ac653aa commit 06dbc14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/esp_peripherals/periph_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ esp_err_t periph_wifi_wait_for_connected(esp_periph_handle_t periph, TickType_t
if (connected_bit & CONNECTED_BIT) {
return ESP_OK;
}
#if defined(CONFIG_BTDM_CTRL_MODE_BLE_ONLY) || defined(CONFIG_BTDM_CTRL_MODE_BTDM)
#if defined(CONFIG_BT_BLE_BLUFI_ENABLE)
if (periph_wifi->config_mode == WIFI_CONFIG_BLUEFI) {
ble_config_stop();
}
Expand Down Expand Up @@ -235,7 +235,7 @@ esp_err_t periph_wifi_config_start(esp_periph_handle_t periph, periph_wifi_confi
}
periph_wifi->wifi_state = PERIPH_WIFI_SETTING;
if (mode >= WIFI_CONFIG_ESPTOUCH && mode <= WIFI_CONFIG_ESPTOUCH_AIRKISS) {
err = ESP_OK; //0;
err = ESP_OK; // 0;
// esp_wifi_start();
err |= esp_smartconfig_set_type(mode);
err |= esp_smartconfig_fast_mode(true);
Expand All @@ -250,10 +250,10 @@ esp_err_t periph_wifi_config_start(esp_periph_handle_t periph, periph_wifi_confi
xEventGroupClearBits(periph_wifi->state_event, SMARTCONFIG_ERROR_BIT);

} else if (mode == WIFI_CONFIG_WPS) {
//todo : add wps
// todo : add wps
return ESP_OK;
} else if (mode == WIFI_CONFIG_BLUEFI) {
#if defined(CONFIG_BTDM_CTRL_MODE_BLE_ONLY) || defined(CONFIG_BTDM_CTRL_MODE_BTDM)
#if defined(CONFIG_BT_BLE_BLUFI_ENABLE)
ble_config_start(periph);
#endif
return ESP_OK;
Expand Down

0 comments on commit 06dbc14

Please sign in to comment.