You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"payload":{"allShortcutsEnabled":false,"path":"cpp_utils","repo":{"id":255036853,"defaultBranch":"master","name":"esp32-snippets","ownerLogin":"muhammedfurkan","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2020-04-12T08:07:32.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/9547040?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"arduino","listCacheKey":"v0:1631728410.6693828","canEdit":false,"refType":"branch","currentOid":"5e180707f0fb0ddc13e02baae8234f804dbc7266"},"tree":{"items":[{"name":"BLEXML","path":"cpp_utils/BLEXML","contentType":"directory"},{"name":"DesignNotes","path":"cpp_utils/DesignNotes","contentType":"directory"},{"name":"tests","path":"cpp_utils/tests","contentType":"directory"},{"name":".gitignore","path":"cpp_utils/.gitignore","contentType":"file"},{"name":"AWS.cpp","path":"cpp_utils/AWS.cpp","contentType":"file"},{"name":"AWS.h","path":"cpp_utils/AWS.h","contentType":"file"},{"name":"Apa102.cpp","path":"cpp_utils/Apa102.cpp","contentType":"file"},{"name":"Apa102.h","path":"cpp_utils/Apa102.h","contentType":"file"},{"name":"ArduinoBLE.md","path":"cpp_utils/ArduinoBLE.md","contentType":"file"},{"name":"Arduino_ESP32_BLE.library.properties","path":"cpp_utils/Arduino_ESP32_BLE.library.properties","contentType":"file"},{"name":"BLE2902.cpp","path":"cpp_utils/BLE2902.cpp","contentType":"file"},{"name":"BLE2902.h","path":"cpp_utils/BLE2902.h","contentType":"file"},{"name":"BLE2904.cpp","path":"cpp_utils/BLE2904.cpp","contentType":"file"},{"name":"BLE2904.h","path":"cpp_utils/BLE2904.h","contentType":"file"},{"name":"BLEAddress.cpp","path":"cpp_utils/BLEAddress.cpp","contentType":"file"},{"name":"BLEAddress.h","path":"cpp_utils/BLEAddress.h","contentType":"file"},{"name":"BLEAdvertisedDevice.cpp","path":"cpp_utils/BLEAdvertisedDevice.cpp","contentType":"file"},{"name":"BLEAdvertisedDevice.h","path":"cpp_utils/BLEAdvertisedDevice.h","contentType":"file"},{"name":"BLEAdvertising.cpp","path":"cpp_utils/BLEAdvertising.cpp","contentType":"file"},{"name":"BLEAdvertising.h","path":"cpp_utils/BLEAdvertising.h","contentType":"file"},{"name":"BLEBeacon.cpp","path":"cpp_utils/BLEBeacon.cpp","contentType":"file"},{"name":"BLEBeacon.h","path":"cpp_utils/BLEBeacon.h","contentType":"file"},{"name":"BLECharacteristic.cpp","path":"cpp_utils/BLECharacteristic.cpp","contentType":"file"},{"name":"BLECharacteristic.h","path":"cpp_utils/BLECharacteristic.h","contentType":"file"},{"name":"BLECharacteristicMap.cpp","path":"cpp_utils/BLECharacteristicMap.cpp","contentType":"file"},{"name":"BLEClient.cpp","path":"cpp_utils/BLEClient.cpp","contentType":"file"},{"name":"BLEClient.h","path":"cpp_utils/BLEClient.h","contentType":"file"},{"name":"BLEDescriptor.cpp","path":"cpp_utils/BLEDescriptor.cpp","contentType":"file"},{"name":"BLEDescriptor.h","path":"cpp_utils/BLEDescriptor.h","contentType":"file"},{"name":"BLEDescriptorMap.cpp","path":"cpp_utils/BLEDescriptorMap.cpp","contentType":"file"},{"name":"BLEDevice.cpp","path":"cpp_utils/BLEDevice.cpp","contentType":"file"},{"name":"BLEDevice.h","path":"cpp_utils/BLEDevice.h","contentType":"file"},{"name":"BLEEddystoneTLM.cpp","path":"cpp_utils/BLEEddystoneTLM.cpp","contentType":"file"},{"name":"BLEEddystoneTLM.h","path":"cpp_utils/BLEEddystoneTLM.h","contentType":"file"},{"name":"BLEEddystoneURL.cpp","path":"cpp_utils/BLEEddystoneURL.cpp","contentType":"file"},{"name":"BLEEddystoneURL.h","path":"cpp_utils/BLEEddystoneURL.h","contentType":"file"},{"name":"BLEExceptions.cpp","path":"cpp_utils/BLEExceptions.cpp","contentType":"file"},{"name":"BLEExceptions.h","path":"cpp_utils/BLEExceptions.h","contentType":"file"},{"name":"BLEHIDDevice.cpp","path":"cpp_utils/BLEHIDDevice.cpp","contentType":"file"},{"name":"BLEHIDDevice.h","path":"cpp_utils/BLEHIDDevice.h","contentType":"file"},{"name":"BLERemoteCharacteristic.cpp","path":"cpp_utils/BLERemoteCharacteristic.cpp","contentType":"file"},{"name":"BLERemoteCharacteristic.h","path":"cpp_utils/BLERemoteCharacteristic.h","contentType":"file"},{"name":"BLERemoteDescriptor.cpp","path":"cpp_utils/BLERemoteDescriptor.cpp","contentType":"file"},{"name":"BLERemoteDescriptor.h","path":"cpp_utils/BLERemoteDescriptor.h","contentType":"file"},{"name":"BLERemoteService.cpp","path":"cpp_utils/BLERemoteService.cpp","contentType":"file"},{"name":"BLERemoteService.h","path":"cpp_utils/BLERemoteService.h","contentType":"file"},{"name":"BLEScan.cpp","path":"cpp_utils/BLEScan.cpp","contentType":"file"},{"name":"BLEScan.h","path":"cpp_utils/BLEScan.h","contentType":"file"},{"name":"BLESecurity.cpp","path":"cpp_utils/BLESecurity.cpp","contentType":"file"},{"name":"BLESecurity.h","path":"cpp_utils/BLESecurity.h","contentType":"file"},{"name":"BLEServer.cpp","path":"cpp_utils/BLEServer.cpp","contentType":"file"},{"name":"BLEServer.h","path":"cpp_utils/BLEServer.h","contentType":"file"},{"name":"BLEService.cpp","path":"cpp_utils/BLEService.cpp","contentType":"file"},{"name":"BLEService.h","path":"cpp_utils/BLEService.h","contentType":"file"},{"name":"BLEServiceMap.cpp","path":"cpp_utils/BLEServiceMap.cpp","contentType":"file"},{"name":"BLEUUID.cpp","path":"cpp_utils/BLEUUID.cpp","contentType":"file"},{"name":"BLEUUID.h","path":"cpp_utils/BLEUUID.h","contentType":"file"},{"name":"BLEUtils.cpp","path":"cpp_utils/BLEUtils.cpp","contentType":"file"},{"name":"BLEUtils.h","path":"cpp_utils/BLEUtils.h","contentType":"file"},{"name":"BLEValue.cpp","path":"cpp_utils/BLEValue.cpp","contentType":"file"},{"name":"BLEValue.h","path":"cpp_utils/BLEValue.h","contentType":"file"},{"name":"CPPNVS.cpp","path":"cpp_utils/CPPNVS.cpp","contentType":"file"},{"name":"CPPNVS.h","path":"cpp_utils/CPPNVS.h","contentType":"file"},{"name":"Console.cpp","path":"cpp_utils/Console.cpp","contentType":"file"},{"name":"Console.h","path":"cpp_utils/Console.h","contentType":"file"},{"name":"Doxyfile","path":"cpp_utils/Doxyfile","contentType":"file"},{"name":"FATFS_VFS.cpp","path":"cpp_utils/FATFS_VFS.cpp","contentType":"file"},{"name":"FATFS_VFS.h","path":"cpp_utils/FATFS_VFS.h","contentType":"file"},{"name":"FTPCallbacks.cpp","path":"cpp_utils/FTPCallbacks.cpp","contentType":"file"},{"name":"FTPServer.cpp","path":"cpp_utils/FTPServer.cpp","contentType":"file"},{"name":"FTPServer.h","path":"cpp_utils/FTPServer.h","contentType":"file"},{"name":"File.cpp","path":"cpp_utils/File.cpp","contentType":"file"},{"name":"File.h","path":"cpp_utils/File.h","contentType":"file"},{"name":"FileSystem.cpp","path":"cpp_utils/FileSystem.cpp","contentType":"file"},{"name":"FileSystem.h","path":"cpp_utils/FileSystem.h","contentType":"file"},{"name":"FreeRTOS.cpp","path":"cpp_utils/FreeRTOS.cpp","contentType":"file"},{"name":"FreeRTOS.h","path":"cpp_utils/FreeRTOS.h","contentType":"file"},{"name":"FreeRTOSTimer.cpp","path":"cpp_utils/FreeRTOSTimer.cpp","contentType":"file"},{"name":"FreeRTOSTimer.h","path":"cpp_utils/FreeRTOSTimer.h","contentType":"file"},{"name":"GPIO.cpp","path":"cpp_utils/GPIO.cpp","contentType":"file"},{"name":"GPIO.h","path":"cpp_utils/GPIO.h","contentType":"file"},{"name":"GeneralUtils.cpp","path":"cpp_utils/GeneralUtils.cpp","contentType":"file"},{"name":"GeneralUtils.h","path":"cpp_utils/GeneralUtils.h","contentType":"file"},{"name":"HIDKeyboardTypes.h","path":"cpp_utils/HIDKeyboardTypes.h","contentType":"file"},{"name":"HIDTypes.h","path":"cpp_utils/HIDTypes.h","contentType":"file"},{"name":"HttpParser.cpp","path":"cpp_utils/HttpParser.cpp","contentType":"file"},{"name":"HttpParser.h","path":"cpp_utils/HttpParser.h","contentType":"file"},{"name":"HttpRequest.cpp","path":"cpp_utils/HttpRequest.cpp","contentType":"file"},{"name":"HttpRequest.h","path":"cpp_utils/HttpRequest.h","contentType":"file"},{"name":"HttpResponse.cpp","path":"cpp_utils/HttpResponse.cpp","contentType":"file"},{"name":"HttpResponse.h","path":"cpp_utils/HttpResponse.h","contentType":"file"},{"name":"HttpServer.cpp","path":"cpp_utils/HttpServer.cpp","contentType":"file"},{"name":"HttpServer.h","path":"cpp_utils/HttpServer.h","contentType":"file"},{"name":"I2C.cpp","path":"cpp_utils/I2C.cpp","contentType":"file"},{"name":"I2C.h","path":"cpp_utils/I2C.h","contentType":"file"},{"name":"I2S.cpp","path":"cpp_utils/I2S.cpp","contentType":"file"},{"name":"I2S.h","path":"cpp_utils/I2S.h","contentType":"file"},{"name":"IFTTT.cpp","path":"cpp_utils/IFTTT.cpp","contentType":"file"},{"name":"IFTTT.h","path":"cpp_utils/IFTTT.h","contentType":"file"},{"name":"JSON.cpp","path":"cpp_utils/JSON.cpp","contentType":"file"},{"name":"JSON.h","path":"cpp_utils/JSON.h","contentType":"file"},{"name":"Kconfig","path":"cpp_utils/Kconfig","contentType":"file"},{"name":"MAX7219.cpp","path":"cpp_utils/MAX7219.cpp","contentType":"file"},{"name":"MAX7219.h","path":"cpp_utils/MAX7219.h","contentType":"file"},{"name":"MFRC522.cpp","path":"cpp_utils/MFRC522.cpp","contentType":"file"},{"name":"MFRC522.h","path":"cpp_utils/MFRC522.h","contentType":"file"},{"name":"MFRC522Debug.h","path":"cpp_utils/MFRC522Debug.h","contentType":"file"},{"name":"MMU.cpp","path":"cpp_utils/MMU.cpp","contentType":"file"},{"name":"MMU.h","path":"cpp_utils/MMU.h","contentType":"file"},{"name":"MPU6050.cpp","path":"cpp_utils/MPU6050.cpp","contentType":"file"},{"name":"MPU6050.h","path":"cpp_utils/MPU6050.h","contentType":"file"},{"name":"MRFC522Debug.cpp","path":"cpp_utils/MRFC522Debug.cpp","contentType":"file"},{"name":"Makefile.arduino","path":"cpp_utils/Makefile.arduino","contentType":"file"},{"name":"Memory.cpp","path":"cpp_utils/Memory.cpp","contentType":"file"},{"name":"Memory.h","path":"cpp_utils/Memory.h","contentType":"file"},{"name":"NeoPixelWiFiEventHandler.cpp","path":"cpp_utils/NeoPixelWiFiEventHandler.cpp","contentType":"file"},{"name":"NeoPixelWiFiEventHandler.h","path":"cpp_utils/NeoPixelWiFiEventHandler.h","contentType":"file"},{"name":"OV7670.cpp","path":"cpp_utils/OV7670.cpp","contentType":"file"},{"name":"OV7670.h","path":"cpp_utils/OV7670.h","contentType":"file"},{"name":"PCF8574.cpp","path":"cpp_utils/PCF8574.cpp","contentType":"file"},{"name":"PCF8574.h","path":"cpp_utils/PCF8574.h","contentType":"file"},{"name":"PCF8575.cpp","path":"cpp_utils/PCF8575.cpp","contentType":"file"},{"name":"PCF8575.h","path":"cpp_utils/PCF8575.h","contentType":"file"},{"name":"PWM.cpp","path":"cpp_utils/PWM.cpp","contentType":"file"},{"name":"PWM.h","path":"cpp_utils/PWM.h","contentType":"file"},{"name":"PubSubClient.cpp","path":"cpp_utils/PubSubClient.cpp","contentType":"file"},{"name":"PubSubClient.h","path":"cpp_utils/PubSubClient.h","contentType":"file"},{"name":"README.md","path":"cpp_utils/README.md","contentType":"file"},{"name":"RESTClient.cpp","path":"cpp_utils/RESTClient.cpp","contentType":"file"},{"name":"RESTClient.h","path":"cpp_utils/RESTClient.h","contentType":"file"},{"name":"RMT.cpp","path":"cpp_utils/RMT.cpp","contentType":"file"},{"name":"RMT.h","path":"cpp_utils/RMT.h","contentType":"file"},{"name":"SOC.cpp","path":"cpp_utils/SOC.cpp","contentType":"file"},{"name":"SOC.h","path":"cpp_utils/SOC.h","contentType":"file"},{"name":"SPI.cpp","path":"cpp_utils/SPI.cpp","contentType":"file"},{"name":"SPI.h","path":"cpp_utils/SPI.h","contentType":"file"},{"name":"SSLUtils.cpp","path":"cpp_utils/SSLUtils.cpp","contentType":"file"},{"name":"SSLUtils.h","path":"cpp_utils/SSLUtils.h","contentType":"file"},{"name":"SmartLED.cpp","path":"cpp_utils/SmartLED.cpp","contentType":"file"},{"name":"SmartLED.h","path":"cpp_utils/SmartLED.h","contentType":"file"},{"name":"SockServ.cpp","path":"cpp_utils/SockServ.cpp","contentType":"file"},{"name":"SockServ.h","path":"cpp_utils/SockServ.h","contentType":"file"},{"name":"Socket.cpp","path":"cpp_utils/Socket.cpp","contentType":"file"},{"name":"Socket.h","path":"cpp_utils/Socket.h","contentType":"file"},{"name":"System.cpp","path":"cpp_utils/System.cpp","contentType":"file"},{"name":"System.h","path":"cpp_utils/System.h","contentType":"file"},{"name":"TFTP.cpp","path":"cpp_utils/TFTP.cpp","contentType":"file"},{"name":"TFTP.h","path":"cpp_utils/TFTP.h","contentType":"file"},{"name":"Task.cpp","path":"cpp_utils/Task.cpp","contentType":"file"},{"name":"Task.h","path":"cpp_utils/Task.h","contentType":"file"},{"name":"U8G2.cpp","path":"cpp_utils/U8G2.cpp","contentType":"file"},{"name":"U8G2.h","path":"cpp_utils/U8G2.h","contentType":"file"},{"name":"WS2812.cpp","path":"cpp_utils/WS2812.cpp","contentType":"file"},{"name":"WS2812.h","path":"cpp_utils/WS2812.h","contentType":"file"},{"name":"WebServer.cpp","path":"cpp_utils/WebServer.cpp","contentType":"file"},{"name":"WebServer.h","path":"cpp_utils/WebServer.h","contentType":"file"},{"name":"WebSocket.cpp","path":"cpp_utils/WebSocket.cpp","contentType":"file"},{"name":"WebSocket.h","path":"cpp_utils/WebSocket.h","contentType":"file"},{"name":"WebSocketFileTransfer.cpp","path":"cpp_utils/WebSocketFileTransfer.cpp","contentType":"file"},{"name":"WebSocketFileTransfer.h","path":"cpp_utils/WebSocketFileTransfer.h","contentType":"file"},{"name":"WiFi.cpp","path":"cpp_utils/WiFi.cpp","contentType":"file"},{"name":"WiFi.h","path":"cpp_utils/WiFi.h","contentType":"file"},{"name":"WiFiEventHandler.cpp","path":"cpp_utils/WiFiEventHandler.cpp","contentType":"file"},{"name":"WiFiEventHandler.h","path":"cpp_utils/WiFiEventHandler.h","contentType":"file"},{"name":"component.mk","path":"cpp_utils/component.mk","contentType":"file"},{"name":"library.properties","path":"cpp_utils/library.properties","contentType":"file"},{"name":"mainpage.dox","path":"cpp_utils/mainpage.dox","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCPP Utils\u003c/h1\u003e\u003ca id=\"user-content-cpp-utils\" class=\"anchor\" aria-label=\"Permalink: CPP Utils\" href=\"#cpp-utils\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis directory contains a wealth of C++ classes that have been found useful when working in C++ in conjunction\nwith the ESP-IDF. The classes have been documented using \u003ccode\u003edoxygen\u003c/code\u003e so one can run a doxygen processor over them\nto create the user guides and programming references.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCompiling the C++ classes\u003c/h1\u003e\u003ca id=\"user-content-compiling-the-c-classes\" class=\"anchor\" aria-label=\"Permalink: Compiling the C++ classes\" href=\"#compiling-the-c-classes\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe C++ classes found here exist as an ESP-IDF component. To build the classes and then use them in your project perform the following\nsteps:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eCreate an ESP-IDF project.\u003c/li\u003e\n\u003cli\u003eCreate a directory called \u003ccode\u003ecomponents\u003c/code\u003e in the root of your ESP-IDF project.\u003c/li\u003e\n\u003cli\u003eCopy this directory (\u003ccode\u003ecpp_utils\u003c/code\u003e) into your new \u003ccode\u003ecomponents\u003c/code\u003e directory. The result will be \u003ccode\u003e\u0026lt;project\u0026gt;/components/cpp_utils/\u0026lt;files\u0026gt;\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eIn your ESP-IDF project build as normal.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp dir=\"auto\"\u003eThe C++ classes will be compiled and available to be used in your own code.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eAdding a main function\u003c/h1\u003e\u003ca id=\"user-content-adding-a-main-function\" class=\"anchor\" aria-label=\"Permalink: Adding a main function\" href=\"#adding-a-main-function\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eWhen working with C++, your calling function should also be written in C++. Consider replacing your \u003ccode\u003emain.c\u003c/code\u003e with the following\n\u003ccode\u003emain.cpp\u003c/code\u003e file:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"extern \u0026quot;C\u0026quot; {\n void app_main();\n}\n\nvoid app_main() {\n // Your code goes here\n}\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003eextern \"C\" {\n void app_main();\n}\n\nvoid app_main() {\n // Your code goes here\n}\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe way to read the above is that we are defining a global function called \u003ccode\u003eapp_main\u003c/code\u003e but we are saying that its external\nlinkage (i.e. how it is found and called) is using the C language convention. However, since the source file is \u003ccode\u003emain.cpp\u003c/code\u003e and\nhence compiled by the C++ compiler, you can utilize C++ classes and language features within and, since it has C linkage, it will\nsatisfy the ESP-IDF environment as the entry point into your own code.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBLE Functions\u003c/h2\u003e\u003ca id=\"user-content-ble-functions\" class=\"anchor\" aria-label=\"Permalink: BLE Functions\" href=\"#ble-functions\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe Bluetooth BLE functions are only compiled if Bluetooth is enabled in \u003ccode\u003emake menuconfig\u003c/code\u003e. This is primarily because\nthe ESP-IDF build system has chosen to only compile the underlying BLE functions if Bluetooth is enabled.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBuilding the Documentation\u003c/h2\u003e\u003ca id=\"user-content-building-the-documentation\" class=\"anchor\" aria-label=\"Permalink: Building the Documentation\" href=\"#building-the-documentation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe code is commented using the Doxygen tags. As such we can run Doxygen to generate the data. I use \u003ccode\u003edoxywizard\u003c/code\u003e using\nthe \u003ccode\u003eDoxyfile\u003c/code\u003e located in this directory.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBuilding the Arduino libraries\u003c/h2\u003e\u003ca id=\"user-content-building-the-arduino-libraries\" class=\"anchor\" aria-label=\"Permalink: Building the Arduino libraries\" href=\"#building-the-arduino-libraries\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eSome of the classes in this package also have applicability in an Arduino environment. A \u003ccode\u003eMakefile\u003c/code\u003e called \u003ccode\u003eMakefile.arduino\u003c/code\u003e is provided to build the libraries. For example:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"$ make -f Makefile.arduino\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e$ make -f Makefile.arduino\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe results of this will be ZIP files found in the \u003ccode\u003eArduino\u003c/code\u003e directory relative to this one. Targets include:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003ebuild_ble\u003c/code\u003e - Build the BLE libraries. See also: \u003ca href=\"/muhammedfurkan/esp32-snippets/blob/arduino/cpp_utils/ArduinoBLE.md\"\u003eArduino BLE Support\u003c/a\u003e .\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"CPP Utils","anchor":"cpp-utils","htmlText":"CPP Utils"},{"level":1,"text":"Compiling the C++ classes","anchor":"compiling-the-c-classes","htmlText":"Compiling the C++ classes"},{"level":1,"text":"Adding a main function","anchor":"adding-a-main-function","htmlText":"Adding a main function"},{"level":2,"text":"BLE Functions","anchor":"ble-functions","htmlText":"BLE Functions"},{"level":2,"text":"Building the Documentation","anchor":"building-the-documentation","htmlText":"Building the Documentation"},{"level":2,"text":"Building the Arduino libraries","anchor":"building-the-arduino-libraries","htmlText":"Building the Arduino libraries"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmuhammedfurkan%2Fesp32-snippets%2Ftree%2Farduino%2Fcpp_utils"}},"totalCount":167,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":"BLE","path":"BLE","contentType":"directory"},{"name":"Documentation","path":"Documentation","contentType":"directory"},{"name":"VisualStudioCode","path":"VisualStudioCode","contentType":"directory"},{"name":"arduino","path":"arduino","contentType":"directory"},{"name":"c-utils","path":"c-utils","contentType":"directory"},{"name":"cloud","path":"cloud","contentType":"directory"},{"name":"console","path":"console","contentType":"directory"},{"name":"cpp_utils","path":"cpp_utils","contentType":"directory"},{"name":"curl","path":"curl","contentType":"directory"},{"name":"eclipse","path":"eclipse","contentType":"directory"},{"name":"error handling","path":"error handling","contentType":"directory"},{"name":"filesystems","path":"filesystems","contentType":"directory"},{"name":"gpio","path":"gpio","contentType":"directory"},{"name":"hardware","path":"hardware","contentType":"directory"},{"name":"i2c","path":"i2c","contentType":"directory"},{"name":"memory","path":"memory","contentType":"directory"},{"name":"mongoose","path":"mongoose","contentType":"directory"},{"name":"networking","path":"networking","contentType":"directory"},{"name":"nvs","path":"nvs","contentType":"directory"},{"name":"partitions","path":"partitions","contentType":"directory"},{"name":"posix","path":"posix","contentType":"directory"},{"name":"pwm","path":"pwm","contentType":"directory"},{"name":"rmt","path":"rmt","contentType":"directory"},{"name":"skeletons","path":"skeletons","contentType":"directory"},{"name":"sntp","path":"sntp","contentType":"directory"},{"name":"sockets","path":"sockets","contentType":"directory"},{"name":"spi","path":"spi","contentType":"directory"},{"name":"tasks","path":"tasks","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"uart","path":"uart","contentType":"directory"},{"name":"vfs","path":"vfs","contentType":"directory"},{"name":"wifi","path":"wifi","contentType":"directory"},{"name":".DS_Store","path":".DS_Store","contentType":"file"},{"name":".cproject","path":".cproject","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".project","path":".project","contentType":"file"},{"name":"Kconfig","path":"Kconfig","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"component.mk","path":"component.mk","contentType":"file"}],"totalCount":40}},"fileTreeProcessingTime":2.06247,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/muhammedfurkan/esp32-snippets/branches":{"post":"r3avu73VW4DjKOcXrn2JEYSa3Z2ure2qZy396bj903lbLfx67xkzYG80Mvg6aSDpUK50BiBQ1PTExKy2RsPdVw"},"/muhammedfurkan/esp32-snippets/branches/fetch_and_merge/arduino":{"post":"jMgg5vftZLZZSidvsrGPKhxZPU9NG5bd3oJv1VEZwsHR35_enU77aLV905kAY3Tjgvp545lrU0PAMgMw_i-U-Q"},"/muhammedfurkan/esp32-snippets/branches/fetch_and_merge/arduino?discard_changes=true":{"post":"RaxsksbqxXM8trw6RPlt2IGOqqE5xCD6ijvMqBDrZb4Yu9OqrElardCBSMz2K5YRHy3uDe205WSUi6BNv90zhg"}}},"title":"esp32-snippets/cpp_utils at arduino · muhammedfurkan/esp32-snippets","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}