Description
I have a Hal class that I have made the flush method pure virtual. I also have a non-virtual instance method called run that does my display driver setup and is supposed to assign the c callback to the flush_cb property of the display driver.
How would you C++'ers go about making this assignment?
What MCU/Processor/Board and compiler are you using?
nodemcu32s
What LVGL version are you using?
7.9.1
What do you want to achieve?
Assign a member instance to the flush_cb.
What have you tried so far?
I’ve tried reinterpret_cast() and std::bind() to no avail.
Code to reproduce
The base class code: https://github.com/9ae8sdf76/dbuddy/blob/cpp-rewrite/src/hal.cpp
The concrete implementation: https://github.com/9ae8sdf76/dbuddy/blob/cpp-rewrite/src/nodemcu32s.cpp
Screenshot and/or video
N/A