This fork captures the mbed lib v125 for ease of integration into older projects.

Fork of mbed-dev by mbed official

Committer:
apluscw
Date:
Fri Jul 20 21:24:42 2018 +0000
Revision:
187:92cbb9eec47b
Mbed library with source code from mbed lib v125. Posted to ease integration with some older projects.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
apluscw 187:92cbb9eec47b 1 /* mbed Microcontroller Library
apluscw 187:92cbb9eec47b 2 * Copyright (C) 2008-2015 ARM Limited. All rights reserved.
apluscw 187:92cbb9eec47b 3 *
apluscw 187:92cbb9eec47b 4 * ARM7 version of CMSIS-like functionality - not advised for use outside mbed!
apluscw 187:92cbb9eec47b 5 * based on core_cm3.h, V1.20
apluscw 187:92cbb9eec47b 6 */
apluscw 187:92cbb9eec47b 7
apluscw 187:92cbb9eec47b 8 #include <stdint.h>
apluscw 187:92cbb9eec47b 9
apluscw 187:92cbb9eec47b 10
apluscw 187:92cbb9eec47b 11 /* define compiler specific symbols */
apluscw 187:92cbb9eec47b 12 #if defined ( __CC_ARM )
apluscw 187:92cbb9eec47b 13 #define __ASM __asm /*!< asm keyword for armcc */
apluscw 187:92cbb9eec47b 14 #define __INLINE __inline /*!< inline keyword for armcc */
apluscw 187:92cbb9eec47b 15
apluscw 187:92cbb9eec47b 16 #elif defined ( __ICCARM__ )
apluscw 187:92cbb9eec47b 17 #define __ASM __asm /*!< asm keyword for iarcc */
apluscw 187:92cbb9eec47b 18 #define __INLINE inline /*!< inline keyword for iarcc. Only avaiable in High optimization mode! */
apluscw 187:92cbb9eec47b 19
apluscw 187:92cbb9eec47b 20 #elif defined ( __GNUC__ )
apluscw 187:92cbb9eec47b 21 #define __ASM __asm /*!< asm keyword for gcc */
apluscw 187:92cbb9eec47b 22 #define __INLINE inline /*!< inline keyword for gcc */
apluscw 187:92cbb9eec47b 23
apluscw 187:92cbb9eec47b 24 #elif defined ( __TASKING__ )
apluscw 187:92cbb9eec47b 25 #define __ASM __asm /*!< asm keyword for TASKING Compiler */
apluscw 187:92cbb9eec47b 26 #define __INLINE inline /*!< inline keyword for TASKING Compiler */
apluscw 187:92cbb9eec47b 27
apluscw 187:92cbb9eec47b 28 #endif
apluscw 187:92cbb9eec47b 29
apluscw 187:92cbb9eec47b 30 #if defined ( __CC_ARM )
apluscw 187:92cbb9eec47b 31 /**
apluscw 187:92cbb9eec47b 32 * @brief Return the Main Stack Pointer (return current ARM7 stack)
apluscw 187:92cbb9eec47b 33 *
apluscw 187:92cbb9eec47b 34 * @param none
apluscw 187:92cbb9eec47b 35 * @return uint32_t Main Stack Pointer
apluscw 187:92cbb9eec47b 36 *
apluscw 187:92cbb9eec47b 37 * Return the current value of the MSP (main stack pointer)
apluscw 187:92cbb9eec47b 38 * Cortex processor register
apluscw 187:92cbb9eec47b 39 */
apluscw 187:92cbb9eec47b 40 uint32_t __get_MSP(void)
apluscw 187:92cbb9eec47b 41 {
apluscw 187:92cbb9eec47b 42 return __current_sp();
apluscw 187:92cbb9eec47b 43 }
apluscw 187:92cbb9eec47b 44 #endif