Fix compilation on ESP32-S3

This commit is contained in:
Jackson Ming Hu 2021-10-14 22:50:38 +11:00 committed by h2zero
parent d47cf59ba9
commit ea6e2101e3

View file

@ -822,7 +822,7 @@ void NimBLEDevice::init(const std::string &deviceName) {
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
#ifdef CONFIG_IDF_TARGET_ESP32C3 #if defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE; bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE;
#else #else
bt_cfg.mode = ESP_BT_MODE_BLE; bt_cfg.mode = ESP_BT_MODE_BLE;