aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-07-20 13:48:30 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-07-20 14:02:30 -0400
commitf5016b15bef56bbdfd187f9b623177ef6dde7ace (patch)
treeab24d8530d74fefaa543abd242418339fc488680 /examples
parentf362c91d2fc2773d517a368a11c469faf20f76fb (diff)
timer.c: Optimize IRQ dispatch routines.
Remove dispatch_irq() and dispatch_cc_irqs(). For IRQs which handle exactly one timer interrupt, add new dispatch_single_irq(). The mere fact that the IRQ has been called suffices to prove that its interrupt enable bit (in TIMx_DIER) and interrupt flag (in TIMx_SR) are set. These facts are combined in dispatch_single_irq(), which only needs to check if the timer_dev handler is non-null before calling it and clearing the SR flag. For IRQs which serve multiple timer interrupts, replace the composition of calls to dispatch_irq() and dispatch_cc_irqs() with individualized routines. These eliminate unnecessary timer register reads/writes, and, in the case of capture/compare interrupts, have a loop unrolling performed.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions