mbed library sources for GR-PEACH rev.B.
Fork of mbed-src by
vendor/NXP/LPC2368/cmsis/core_arm7.c@10:3bc89ef62ce7, 2013-06-14 (annotated)
- Committer:
- emilmont
- Date:
- Fri Jun 14 17:49:17 2013 +0100
- Revision:
- 10:3bc89ef62ce7
Unify mbed library sources
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 10:3bc89ef62ce7 | 1 | /* mbed Microcontroller Library |
emilmont | 10:3bc89ef62ce7 | 2 | * Copyright (C) 2008-2009 ARM Limited. All rights reserved. |
emilmont | 10:3bc89ef62ce7 | 3 | * |
emilmont | 10:3bc89ef62ce7 | 4 | * ARM7 version of CMSIS-like functionality - not advised for use outside mbed! |
emilmont | 10:3bc89ef62ce7 | 5 | * based on core_cm3.h, V1.20 |
emilmont | 10:3bc89ef62ce7 | 6 | */ |
emilmont | 10:3bc89ef62ce7 | 7 | |
emilmont | 10:3bc89ef62ce7 | 8 | #include <stdint.h> |
emilmont | 10:3bc89ef62ce7 | 9 | |
emilmont | 10:3bc89ef62ce7 | 10 | |
emilmont | 10:3bc89ef62ce7 | 11 | /* define compiler specific symbols */ |
emilmont | 10:3bc89ef62ce7 | 12 | #if defined ( __CC_ARM ) |
emilmont | 10:3bc89ef62ce7 | 13 | #define __ASM __asm /*!< asm keyword for armcc */ |
emilmont | 10:3bc89ef62ce7 | 14 | #define __INLINE __inline /*!< inline keyword for armcc */ |
emilmont | 10:3bc89ef62ce7 | 15 | |
emilmont | 10:3bc89ef62ce7 | 16 | #elif defined ( __ICCARM__ ) |
emilmont | 10:3bc89ef62ce7 | 17 | #define __ASM __asm /*!< asm keyword for iarcc */ |
emilmont | 10:3bc89ef62ce7 | 18 | #define __INLINE inline /*!< inline keyword for iarcc. Only avaiable in High optimization mode! */ |
emilmont | 10:3bc89ef62ce7 | 19 | |
emilmont | 10:3bc89ef62ce7 | 20 | #elif defined ( __GNUC__ ) |
emilmont | 10:3bc89ef62ce7 | 21 | #define __ASM __asm /*!< asm keyword for gcc */ |
emilmont | 10:3bc89ef62ce7 | 22 | #define __INLINE inline /*!< inline keyword for gcc */ |
emilmont | 10:3bc89ef62ce7 | 23 | |
emilmont | 10:3bc89ef62ce7 | 24 | #elif defined ( __TASKING__ ) |
emilmont | 10:3bc89ef62ce7 | 25 | #define __ASM __asm /*!< asm keyword for TASKING Compiler */ |
emilmont | 10:3bc89ef62ce7 | 26 | #define __INLINE inline /*!< inline keyword for TASKING Compiler */ |
emilmont | 10:3bc89ef62ce7 | 27 | |
emilmont | 10:3bc89ef62ce7 | 28 | #endif |
emilmont | 10:3bc89ef62ce7 | 29 | |
emilmont | 10:3bc89ef62ce7 | 30 | #if defined ( __CC_ARM ) |
emilmont | 10:3bc89ef62ce7 | 31 | /** |
emilmont | 10:3bc89ef62ce7 | 32 | * @brief Return the Main Stack Pointer (return current ARM7 stack) |
emilmont | 10:3bc89ef62ce7 | 33 | * |
emilmont | 10:3bc89ef62ce7 | 34 | * @param none |
emilmont | 10:3bc89ef62ce7 | 35 | * @return uint32_t Main Stack Pointer |
emilmont | 10:3bc89ef62ce7 | 36 | * |
emilmont | 10:3bc89ef62ce7 | 37 | * Return the current value of the MSP (main stack pointer) |
emilmont | 10:3bc89ef62ce7 | 38 | * Cortex processor register |
emilmont | 10:3bc89ef62ce7 | 39 | */ |
emilmont | 10:3bc89ef62ce7 | 40 | uint32_t __get_MSP(void) |
emilmont | 10:3bc89ef62ce7 | 41 | { |
emilmont | 10:3bc89ef62ce7 | 42 | return __current_sp(); |
emilmont | 10:3bc89ef62ce7 | 43 | } |
emilmont | 10:3bc89ef62ce7 | 44 | #endif |