The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Oct 29 11:02:04 2014 +0000
Revision:
91:031413cf7a89
Child:
97:433970e64889
Release 91 of the mbed library

Changes:

- RBLAB_NANO - new target addition
- NRF51_DK - new target addition
- NRF51_DONGLE - new target addition

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 91:031413cf7a89 1 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
Kojto 91:031413cf7a89 2 *
Kojto 91:031413cf7a89 3 * The information contained herein is confidential property of Nordic
Kojto 91:031413cf7a89 4 * Semiconductor ASA.Terms and conditions of usage are described in detail
Kojto 91:031413cf7a89 5 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
Kojto 91:031413cf7a89 6 *
Kojto 91:031413cf7a89 7 * Licensees are granted free, non-transferable use of the information. NO
Kojto 91:031413cf7a89 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
Kojto 91:031413cf7a89 9 * the file.
Kojto 91:031413cf7a89 10 *
Kojto 91:031413cf7a89 11 */
Kojto 91:031413cf7a89 12
Kojto 91:031413cf7a89 13 #ifndef _COMPILER_ABSTRACTION_H
Kojto 91:031413cf7a89 14 #define _COMPILER_ABSTRACTION_H
Kojto 91:031413cf7a89 15
Kojto 91:031413cf7a89 16 /*lint ++flb "Enter library region" */
Kojto 91:031413cf7a89 17
Kojto 91:031413cf7a89 18 #if defined ( __CC_ARM )
Kojto 91:031413cf7a89 19 #define __ASM __asm /*!< asm keyword for ARM Compiler */
Kojto 91:031413cf7a89 20 #define __INLINE __inline /*!< inline keyword for ARM Compiler */
Kojto 91:031413cf7a89 21 #define __STATIC_INLINE static __inline
Kojto 91:031413cf7a89 22
Kojto 91:031413cf7a89 23 #elif defined ( __ICCARM__ )
Kojto 91:031413cf7a89 24 #define __ASM __asm /*!< asm keyword for IAR Compiler */
Kojto 91:031413cf7a89 25 #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
Kojto 91:031413cf7a89 26 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 27 #define __current_sp() __get_SP()
Kojto 91:031413cf7a89 28
Kojto 91:031413cf7a89 29 #elif defined ( __GNUC__ )
Kojto 91:031413cf7a89 30 #define __ASM __asm /*!< asm keyword for GNU Compiler */
Kojto 91:031413cf7a89 31 #define __INLINE inline /*!< inline keyword for GNU Compiler */
Kojto 91:031413cf7a89 32 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 33
Kojto 91:031413cf7a89 34 static __INLINE unsigned int __current_sp(void)
Kojto 91:031413cf7a89 35 {
Kojto 91:031413cf7a89 36 register unsigned sp asm("sp");
Kojto 91:031413cf7a89 37 return sp;
Kojto 91:031413cf7a89 38 }
Kojto 91:031413cf7a89 39
Kojto 91:031413cf7a89 40 #elif defined ( __TASKING__ )
Kojto 91:031413cf7a89 41 #define __ASM __asm /*!< asm keyword for TASKING Compiler */
Kojto 91:031413cf7a89 42 #define __INLINE inline /*!< inline keyword for TASKING Compiler */
Kojto 91:031413cf7a89 43 #define __STATIC_INLINE static inline
Kojto 91:031413cf7a89 44
Kojto 91:031413cf7a89 45 #endif
Kojto 91:031413cf7a89 46
Kojto 91:031413cf7a89 47 /*lint --flb "Leave library region" */
Kojto 91:031413cf7a89 48
Kojto 91:031413cf7a89 49 #endif