Closed hippiefm closed 1 year ago
Hi @hippiefm,
Hi @jrahlf,
Thank you for your contribution. Your request has been communicated to the development team. We will come back to you as soon as we get their feedback.
Thank you again for your contribution.
With regards,
ST Internal Reference: 145785
Hi @hippiefm,
Unfortunately, there is no plan to deploy this in the near future. We will keep you informed, should there be any update in this plan.
Please allow me to close this issue. Thank you for your comprehension and thank you again for your report.
With regards,
Hello,
I am writing a C++ wrapper on the top of ST's HAL and I have encountered a problem connected with interrupt callbacks and member functions.
Introduction
Registering interrupt callbacks is really cool thing in HAL, but it is not possible to assign a class member function as a callback function (it needs to be static). This problem is solved inside FreeRTOS, as it is possible to pass a user context to a task and then wrap handler function like this:
Same thing is not possible inside HAL, but adding simple user context inside peripheral handler would fix the issue and make C++ developer's life easier.
Proposed solution
Add user context inside peripheral handlers (UART as example, but all other peripherals should be handled the same way).
After change: