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