CN - drv_timer.c changes.

Reduces the time spent in the timer interrupt handler.
Some variable types also changed from uint8_t to int or unsigned int to help improve code size/speed.
Rudimentary measurement of time spent in the handler seems to indicate a reduction from ~8us down to ~5us (excluding time spent in callbacks).

Note that although I've done some fairly rudimentary tests to ensure that the firmware still works, I'm not at all familiar with the code, and I don't have any test equipment available (e.g. scope), so don't know how to go about doing more rigorous testing. If you plan on taking this pull request, I would recommend doing some testing of your own to ensure I haven't broken anything.
Note that I have made use of some designated initialisers in one of the arrays. I don't know if you're happy about using them as I haven't spotted them being used anywhere else in the code.
Also... what is "some firmware that includes these changes"?