TAP_SystemProc

Topfield Documentation

void TAP_SystemProc(void)

It SHOULD be called continuously to get the system resources in application mode.

It should be called repeatedly to process the RS232 data or remote controllers that are firmware's resources. If it is not called in application mode, the TAP application cannot use the RS232 data or remote controller.

It is HIGHLY recommended NOT to call this function in TSR mode because all the resources can be available even without this function in TSR mode.

Additional Documentation

It is legitimate to call this function in a TAP in TSR mode and doing so will not (by itself) cause problems.

If you do this you must be particularly careful to avoid infinite recursion (a call to TAP_SystemProc will re-enter your TAP via TAP_EventHandler, and if that in turn calls TAP_SystemProc and the cycle repeats the Toppy will crash due to a stack overflow).

Calling TAP_SystemProc in TSR mode is useful to allow easier coding of modal messages to the user - it is possible to create an equivalent of the MessageBox() function that will return the user choice rather than having to show the UI, return, handle events and eventually route the choice to the code that needs it. YesNoBox in libc++utils? works this way.