aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/include
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-04-09 16:05:50 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-11 16:56:57 -0400
commit378a766ec86694a6be0f8e38976473646c82702c (patch)
tree8e6727dd9d5d97043e16a7b3831ee93521e986ba /libmaple/include
parent42059788b4fff74fddfc7d391e82c316b6901211 (diff)
downloadlibrambutan-378a766ec86694a6be0f8e38976473646c82702c.tar.gz
librambutan-378a766ec86694a6be0f8e38976473646c82702c.zip
libmaple/timer_private.h: Update to support TIM9-TIM14.
Add DECLARE_RESTRICTED_GENERAL_TIMER(), for declaring general-purpose timers with limited interrupt support -- that is, for declaring timers 9 through 14. This helps avoid wasting space on pointers to user handlers for interrupts that don't exist. Add dispatch_tim_9_12() and dispatch_tim_10_11_13_14(), which are special purpose dispatch routines for these "restricted" general purpose timers, which only try to dispatch interrupts supported by these timers. Change dispatch_single_irq() to check the logical and of the DIER and SR registers for the timer whose interrupt it's dispatching. This is necessary due to increased muxing on the timer IRQ lines caused by the new timers. See the comment in the patch for more details. This does add overhead on medium- and high-density STM32F1s, where the extra check is unnecessary, but it doesn't change dispatch_single_irq()'s semantics, and keeps the implementation simple, so we'll live with it. These changes will also work on F2 (and F4 AFAIK), which is why they're part of the global private timer API, as opposed to libmaple/stm32f1/timer.c. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/include')
0 files changed, 0 insertions, 0 deletions