5.6 TIMER_APP_CALL

If this macro is defined, it is the name of an application defined function that attaches to the timer ISR. If this macro is not defined, timer.S assumes there is no application defined logic to execute in the timer ISR. Note that the application defined function executes at the same frequency as the ISR itself. Also, the application defined function should be marked as a signal as follows:

void __attribute__ ((signal)) timerAppCall(void)

This ensures that the registers are saved and restored correctly.

The matching definition in the makefile should look like the following:

-DTIMER_APP_CALL=timerAppCall

This macro is only useful if timer.S is used.



Copyright © 2008-10-25 by Tak Auyeung