8000 Delay of 200msecs for Arduino environment · EdWeller/esp32-snippets@d6cd7dd · GitHub
[go: up one dir, main page]

Skip to content

Commit d6cd7dd

Browse files
committed
Delay of 200msecs for Arduino environment
1 parent e2996a4 commit d6cd7dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp_utils/BLEDevice.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
#include "sdkconfig.h"
88
#if defined(CONFIG_BT_ENABLED)
9+
#include <freertos/FreeRTOS.h>
10+
#include <freertos/task.h>
911
#include <esp_err.h>
1012
#include <nvs_flash.h>
1113
#include <freertos/FreeRTOS.h>
@@ -199,6 +201,7 @@ void BLEDevice::init(std::string deviceName) {
199201
return;
200202
};
201203

204+
vTaskDelay(200/portTICK_PERIOD_MS); // Delay for 200 msecs as a workaround to an apparent Arduino environment issue.
202205
} // init
203206

204207

0 commit comments

Comments
 (0)
0