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.
crash has been fixed, that was related to telemetry UART. pull latest code,
or just update drv serial
On Oct 5, 2014 3:40 AM, "Chris Nisbet" <notifications@github.com> wrote:

> In src/drv_timer.c:
>
> > @@ -72,15 +72,31 @@ const timerHardware_t timerHardware[] = {
> >  };
> >  #endif
> >
> > -#define MAX_TIMERS 4 // TIM1..TIM4
> > +enum {
> > +    tim1 = 0,
> > +    tim2,
> > +    tim3,
> > +    tim4,
> > +    MAX_TIMERS
> > +};
>
> Well, I've built and run this branch (drv_timer). I've also merged this
> work into a different branch that includes a pile of other changes, which
> is based from a baseflight commit from a few weeks ago. I would base it
> from the most current baseflight commit, but I find that the latest code
> appears to crash (with or without my changes) for some reason after arming
> the board. I haven't tried to debug this.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/multiwii/baseflight/pull/146/files#r18430871>.
>