BLE temperature profile using digital DS1820 or analog LM35 sensors
mbed/TARGET_NRF51822/compiler_abstraction.h@0:637031152314, 2015-03-07 (annotated)
- Committer:
- gkroussos
- Date:
- Sat Mar 07 16:23:41 2015 +0000
- Revision:
- 0:637031152314
Working version 1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gkroussos | 0:637031152314 | 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. |
gkroussos | 0:637031152314 | 2 | * |
gkroussos | 0:637031152314 | 3 | * The information contained herein is confidential property of Nordic |
gkroussos | 0:637031152314 | 4 | * Semiconductor ASA.Terms and conditions of usage are described in detail |
gkroussos | 0:637031152314 | 5 | * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. |
gkroussos | 0:637031152314 | 6 | * |
gkroussos | 0:637031152314 | 7 | * Licensees are granted free, non-transferable use of the information. NO |
gkroussos | 0:637031152314 | 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
gkroussos | 0:637031152314 | 9 | * the file. |
gkroussos | 0:637031152314 | 10 | * |
gkroussos | 0:637031152314 | 11 | */ |
gkroussos | 0:637031152314 | 12 | |
gkroussos | 0:637031152314 | 13 | #ifndef _COMPILER_ABSTRACTION_H |
gkroussos | 0:637031152314 | 14 | #define _COMPILER_ABSTRACTION_H |
gkroussos | 0:637031152314 | 15 | |
gkroussos | 0:637031152314 | 16 | /*lint ++flb "Enter library region" */ |
gkroussos | 0:637031152314 | 17 | |
gkroussos | 0:637031152314 | 18 | #if defined ( __CC_ARM ) |
gkroussos | 0:637031152314 | 19 | #define __ASM __asm /*!< asm keyword for ARM Compiler */ |
gkroussos | 0:637031152314 | 20 | #define __INLINE __inline /*!< inline keyword for ARM Compiler */ |
gkroussos | 0:637031152314 | 21 | #define __STATIC_INLINE static __inline |
gkroussos | 0:637031152314 | 22 | |
gkroussos | 0:637031152314 | 23 | #elif defined ( __ICCARM__ ) |
gkroussos | 0:637031152314 | 24 | #define __ASM __asm /*!< asm keyword for IAR Compiler */ |
gkroussos | 0:637031152314 | 25 | #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */ |
gkroussos | 0:637031152314 | 26 | #define __STATIC_INLINE static inline |
gkroussos | 0:637031152314 | 27 | #define __current_sp() __get_SP() |
gkroussos | 0:637031152314 | 28 | |
gkroussos | 0:637031152314 | 29 | #elif defined ( __GNUC__ ) |
gkroussos | 0:637031152314 | 30 | #define __ASM __asm /*!< asm keyword for GNU Compiler */ |
gkroussos | 0:637031152314 | 31 | #define __INLINE inline /*!< inline keyword for GNU Compiler */ |
gkroussos | 0:637031152314 | 32 | #define __STATIC_INLINE static inline |
gkroussos | 0:637031152314 | 33 | |
gkroussos | 0:637031152314 | 34 | static __INLINE unsigned int __current_sp(void) |
gkroussos | 0:637031152314 | 35 | { |
gkroussos | 0:637031152314 | 36 | register unsigned sp asm("sp"); |
gkroussos | 0:637031152314 | 37 | return sp; |
gkroussos | 0:637031152314 | 38 | } |
gkroussos | 0:637031152314 | 39 | |
gkroussos | 0:637031152314 | 40 | #elif defined ( __TASKING__ ) |
gkroussos | 0:637031152314 | 41 | #define __ASM __asm /*!< asm keyword for TASKING Compiler */ |
gkroussos | 0:637031152314 | 42 | #define __INLINE inline /*!< inline keyword for TASKING Compiler */ |
gkroussos | 0:637031152314 | 43 | #define __STATIC_INLINE static inline |
gkroussos | 0:637031152314 | 44 | |
gkroussos | 0:637031152314 | 45 | #endif |
gkroussos | 0:637031152314 | 46 | |
gkroussos | 0:637031152314 | 47 | /*lint --flb "Leave library region" */ |
gkroussos | 0:637031152314 | 48 | |
gkroussos | 0:637031152314 | 49 | #endif |