I'm writing a code in C++ for Xtensa virtual platform. I want to use the functionality of the simcall_callback, to return data from the internal FW code. My C++ is a little bit rusty.
- How do I build the callback function for the following typedef of the callback:
typedef int(∗ simcall_callback)(xtsc_core &core, void ∗callback_arg, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
- The function used for setting this callback is:
simcall_callback set_simcall_callback (simcall_callback callback, void ∗callback_arg, void ∗∗ previous_arg = NULL)
How should I invoke the set_simcall_callback correctly, and what should be the second and third arguments?
Documentation about the Xtensa callback functions can be found at the following link (Pg.282, 309)