summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/str71x/str71x_timerisr.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-06 01:54:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-06 01:54:11 +0000
commit81597afb0f0c3ea5912387db506f86d2989b2ad2 (patch)
tree2f194e11c1167456abc1c7779009b800eebab1ee /nuttx/arch/arm/src/str71x/str71x_timerisr.c
parent3f38e3b45ef0d6f4290b9ad7166481e31a73269c (diff)
downloadpx4-nuttx-81597afb0f0c3ea5912387db506f86d2989b2ad2.tar.gz
px4-nuttx-81597afb0f0c3ea5912387db506f86d2989b2ad2.tar.bz2
px4-nuttx-81597afb0f0c3ea5912387db506f86d2989b2ad2.zip
Need to set UART interrupt priority
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1854 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/str71x/str71x_timerisr.c')
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_timerisr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/str71x/str71x_timerisr.c b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
index ad4565cb9..1777be159 100644
--- a/nuttx/arch/arm/src/str71x/str71x_timerisr.c
+++ b/nuttx/arch/arm/src/str71x/str71x_timerisr.c
@@ -55,6 +55,14 @@
* Definitions
****************************************************************************/
+/* Configuration */
+
+#ifndef CONFIG_TIM_PRI
+# define CONFIG_TIM_PRI 1
+#elif CONFIG_TIM_PRI <= 1 && CONFIG_TIM_PRI >15
+# error "CONFIG_TIM_PRI is out of range"
+#endif
+
/* The desired timer interrupt frequency is provided by the definition
* CLK_TCK (see include/time.h). CLK_TCK defines the desired number of
* system clock ticks per second. That value is a user configurable setting
@@ -189,9 +197,9 @@ void up_timerinit(void)
putreg16(OCAR_VALUE, STR71X_TIMER0_OCAR);
putreg16(0xfffc, STR71X_TIMER0_CNTR);
- /* Set the IRQ interrupt priority */
+ /* Set the timer interrupt priority */
- up_prioritize_irq(STR71X_IRQ_SYSTIMER, 1);
+ up_prioritize_irq(STR71X_IRQ_SYSTIMER, CONFIG_TIM_PRI);
/* Attach the timer interrupt vector */