aboutsummaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/include/stm32/chip.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-22 01:25:40 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-22 01:25:40 +0000
commit4742f55507b6e1392f459a2c228efb75b567b62e (patch)
treea1914fb5c45a61232078c98064198ac8818f07b4 /nuttx/arch/arm/include/stm32/chip.h
parente504d643fc23cefe61340e4d3a75d6e80f4b76fb (diff)
downloadpx4-firmware-4742f55507b6e1392f459a2c228efb75b567b62e.tar.gz
px4-firmware-4742f55507b6e1392f459a2c228efb75b567b62e.tar.bz2
px4-firmware-4742f55507b6e1392f459a2c228efb75b567b62e.zip
Add option to use BASEPRI instead of PRIMASK to disable interrupts in all ARMv7-M architectures
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5546 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/include/stm32/chip.h')
-rw-r--r--nuttx/arch/arm/include/stm32/chip.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/nuttx/arch/arm/include/stm32/chip.h b/nuttx/arch/arm/include/stm32/chip.h
index b7ec7dbba..14d92ea3d 100644
--- a/nuttx/arch/arm/include/stm32/chip.h
+++ b/nuttx/arch/arm/include/stm32/chip.h
@@ -692,5 +692,15 @@
# error "Unsupported STM32 chip"
#endif
+/* NVIC priority levels *************************************************************/
+
+#define NVIC_SYSH_PRIORITY_MIN 0xf0 /* All bits set in minimum priority */
+#define NVIC_SYSH_PRIORITY_DEFAULT 0x80 /* Midpoint is the default */
+#define NVIC_SYSH_PRIORITY_MAX 0x00 /* Zero is maximum priority */
+#define NVIC_SYSH_PRIORITY_STEP 0x10 /* Four bits of interrupt priority used */
+
+#define NVIC_SYSH_DISABLE_PRIORITY (NVIC_SYSH_PRIORITY_MAX + NVIC_SYSH_PRIORITY_STEP)
+#define NVIC_SYSH_SVCALL_PRIORITY NVIC_SYSH_PRIORITY_MAX
+
#endif /* __ARCH_ARM_INCLUDE_STM32_CHIP_H */