mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/compiler_abstraction.h@308:59cc78a25982, 2014-09-05 (annotated)
- Committer:
- todotani
- Date:
- Fri Sep 05 14:20:33 2014 +0000
- Revision:
- 308:59cc78a25982
- Parent:
- 270:e2babe29baf8
BLE_Health_Thermometer for mbed HRM1017 with BLE library 0.1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 85:e1a8e879a6a9 | 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. |
mbed_official | 85:e1a8e879a6a9 | 2 | * |
mbed_official | 85:e1a8e879a6a9 | 3 | * The information contained herein is confidential property of Nordic |
mbed_official | 85:e1a8e879a6a9 | 4 | * Semiconductor ASA.Terms and conditions of usage are described in detail |
mbed_official | 85:e1a8e879a6a9 | 5 | * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. |
mbed_official | 85:e1a8e879a6a9 | 6 | * |
mbed_official | 85:e1a8e879a6a9 | 7 | * Licensees are granted free, non-transferable use of the information. NO |
mbed_official | 85:e1a8e879a6a9 | 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
mbed_official | 85:e1a8e879a6a9 | 9 | * the file. |
mbed_official | 85:e1a8e879a6a9 | 10 | * |
mbed_official | 85:e1a8e879a6a9 | 11 | */ |
mbed_official | 85:e1a8e879a6a9 | 12 | |
mbed_official | 85:e1a8e879a6a9 | 13 | #ifndef _COMPILER_ABSTRACTION_H |
mbed_official | 85:e1a8e879a6a9 | 14 | #define _COMPILER_ABSTRACTION_H |
mbed_official | 85:e1a8e879a6a9 | 15 | |
mbed_official | 85:e1a8e879a6a9 | 16 | /*lint ++flb "Enter library region" */ |
mbed_official | 85:e1a8e879a6a9 | 17 | |
mbed_official | 85:e1a8e879a6a9 | 18 | #if defined ( __CC_ARM ) |
mbed_official | 85:e1a8e879a6a9 | 19 | #define __ASM __asm /*!< asm keyword for ARM Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 20 | #define __INLINE __inline /*!< inline keyword for ARM Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 21 | #define __STATIC_INLINE static __inline |
mbed_official | 85:e1a8e879a6a9 | 22 | |
mbed_official | 85:e1a8e879a6a9 | 23 | #elif defined ( __ICCARM__ ) |
mbed_official | 85:e1a8e879a6a9 | 24 | #define __ASM __asm /*!< asm keyword for IAR Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 25 | #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */ |
mbed_official | 85:e1a8e879a6a9 | 26 | #define __STATIC_INLINE static inline |
mbed_official | 85:e1a8e879a6a9 | 27 | #define __current_sp() __get_SP() |
mbed_official | 85:e1a8e879a6a9 | 28 | |
mbed_official | 85:e1a8e879a6a9 | 29 | #elif defined ( __GNUC__ ) |
mbed_official | 85:e1a8e879a6a9 | 30 | #define __ASM __asm /*!< asm keyword for GNU Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 31 | #define __INLINE inline /*!< inline keyword for GNU Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 32 | #define __STATIC_INLINE static inline |
mbed_official | 85:e1a8e879a6a9 | 33 | |
mbed_official | 85:e1a8e879a6a9 | 34 | static __INLINE unsigned int __current_sp(void) |
mbed_official | 85:e1a8e879a6a9 | 35 | { |
mbed_official | 85:e1a8e879a6a9 | 36 | register unsigned sp asm("sp"); |
mbed_official | 85:e1a8e879a6a9 | 37 | return sp; |
mbed_official | 85:e1a8e879a6a9 | 38 | } |
mbed_official | 85:e1a8e879a6a9 | 39 | |
mbed_official | 85:e1a8e879a6a9 | 40 | #elif defined ( __TASKING__ ) |
mbed_official | 85:e1a8e879a6a9 | 41 | #define __ASM __asm /*!< asm keyword for TASKING Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 42 | #define __INLINE inline /*!< inline keyword for TASKING Compiler */ |
mbed_official | 85:e1a8e879a6a9 | 43 | #define __STATIC_INLINE static inline |
mbed_official | 85:e1a8e879a6a9 | 44 | |
mbed_official | 85:e1a8e879a6a9 | 45 | #endif |
mbed_official | 85:e1a8e879a6a9 | 46 | |
mbed_official | 85:e1a8e879a6a9 | 47 | /*lint --flb "Leave library region" */ |
mbed_official | 85:e1a8e879a6a9 | 48 | |
mbed_official | 85:e1a8e879a6a9 | 49 | #endif |