Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/cmsis/TARGET_NXP/TARGET_LPC23XX/core_arm7.h
- Revision:
- 15:4892fe388435
- Parent:
- 13:0645d8841f51
--- a/targets/cmsis/TARGET_NXP/TARGET_LPC23XX/core_arm7.h Mon Aug 05 14:54:27 2013 +0000
+++ b/targets/cmsis/TARGET_NXP/TARGET_LPC23XX/core_arm7.h Wed Aug 07 16:43:59 2013 +0300
@@ -8,6 +8,8 @@
#ifndef __ARM7_CORE_H__
#define __ARM7_CORE_H__
+#include "vector_defns.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -255,6 +257,15 @@
NVIC->IntEnClr = 1 << (uint32_t)IRQn;
}
+static __INLINE uint32_t __get_IPSR(void)
+{
+ unsigned i;
+
+ for(i = 0; i < 32; i ++)
+ if(NVIC->Address == NVIC->VectAddr[i])
+ return i;
+ return 1; // 1 is an invalid entry in the interrupt table on LPC2368
+}
#ifdef __cplusplus
}
