At this point in time, C++11 is available on most Arduino platforms and not just on ESP8266 and ESP32.
With this pull request, the ability to supply lambdas (including object methods) to setCallback() instead of plain function pointers is extended automatically to all the platforms which provide support for std::function. :)
Hi, faced the issue with the same reason, on Arduino Nano Connect, based on RP2040.
@knolleary, please add ability to use std::function as callbacks not just for ESP-based boards.
At this point in time, C++11 is available on most Arduino platforms and not just on ESP8266 and ESP32. With this pull request, the ability to supply lambdas (including object methods) to
setCallback()
instead of plain function pointers is extended automatically to all the platforms which provide support for std::function. :)