arduino-esp32/libraries/BLE
Sylvain Quendez 6ce43695d2
BLECharacteristic optimization (#10665)
* BLECharacteristic::notify() optimization

GeneralUtils::hexDump() doesn't output anything if the log level is not "VERBOSE". Additionally, it is very CPU intensive, even when it doesn't output anything. So it is much better to *not* call it at all if not needed. 

In a simple program which calls BLECharacteristic::notify() every 50 ms, the performance gain of this little optimization is 37% in release mode (-O3) and 57% in debug mode. 

Of course, the "#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE" guard could also be put inside the GeneralUtils::hexDump() function itself. But it's better to put it here also, as it is clearer (indicating a verbose log thing) and it allows to remove the "m_value.getValue().c_str()" call, which is in itself quite CPU intensive.

* BLECharacteristic optimization

Calls to BLEUtils::buildHexData() don't output anything when the log level is not "VERBOSE" or "DEBUG". As this function is quite CPU intensive, it is better to not call it when not needed.
2024-12-03 11:10:51 -03:00
..
examples Update BLE5_periodic_advertising.ino (#10538) 2024-11-04 23:43:07 +02:00
src BLECharacteristic optimization (#10665) 2024-12-03 11:10:51 -03:00
library.properties Update core version to 3.0.5 2024-09-18 14:54:00 +03:00
LICENSE restore apache-2.0 licence to to BLE library (#5261) 2021-06-09 12:41:19 +03:00
README.md docs(vale): Enable vale and fix errors (#10231) 2024-08-28 15:48:18 +03:00

ESP32 BLE for Arduino

The Arduino IDE provides an excellent library package manager where versions of libraries can be downloaded and installed. This Github project provides the repository for the ESP32 BLE support for Arduino.

The original source of the project, which is not maintained anymore, can be found here: https://github.com/nkolban/esp32-snippets

Issues and questions should be raised here: https://github.com/espressif/arduino-esp32/issues
(please don't use https://github.com/nkolban/esp32-snippets/issues!)

Documentation for using the library can be found here: https://github.com/nkolban/esp32-snippets/tree/master/Documentation