I am wondering whether it is safe to call a function via a function pointer while inside a event handler on a STM32. The event handler is for I2C and has the highest priority. The function to be called can be assumed to be fast (just some byte reordering).
Thanks for any hints or comments.
Arne
If the function pointer is initialized, should work fine. The only issue I can think of the usual one with interrupt-handlers – if the ‘byte reordering’ involves removing/adding bytes from tx/rx buffers, the buffer-management has to be safely interruptable.