HM_IOT_Demo / nrf51-sdk

Fork of nrf51-sdk by Nordic Semiconductor

Committer:
vcoubard
Date:
Thu Apr 07 17:37:17 2016 +0100
Revision:
1:ebc0e0ef0a11
Child:
10:233fefd8162b
Synchronized with git rev d1170b61
Author: Liyou Zhou
Pull the files we need directly out of the nordic-sdk
without modifications preserving the folder structure in
the sdk. nRF51_SDK_8.1.0_b6ed55f.zip from:
https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 1:ebc0e0ef0a11 1 /* Copyright (c) 2015, Nordic Semiconductor ASA
vcoubard 1:ebc0e0ef0a11 2 * All rights reserved.
vcoubard 1:ebc0e0ef0a11 3 *
vcoubard 1:ebc0e0ef0a11 4 * Redistribution and use in source and binary forms, with or without
vcoubard 1:ebc0e0ef0a11 5 * modification, are permitted provided that the following conditions are met:
vcoubard 1:ebc0e0ef0a11 6 *
vcoubard 1:ebc0e0ef0a11 7 * * Redistributions of source code must retain the above copyright notice, this
vcoubard 1:ebc0e0ef0a11 8 * list of conditions and the following disclaimer.
vcoubard 1:ebc0e0ef0a11 9 *
vcoubard 1:ebc0e0ef0a11 10 * * Redistributions in binary form must reproduce the above copyright notice,
vcoubard 1:ebc0e0ef0a11 11 * this list of conditions and the following disclaimer in the documentation
vcoubard 1:ebc0e0ef0a11 12 * and/or other materials provided with the distribution.
vcoubard 1:ebc0e0ef0a11 13 *
vcoubard 1:ebc0e0ef0a11 14 * * Neither the name of Nordic Semiconductor ASA nor the names of its
vcoubard 1:ebc0e0ef0a11 15 * contributors may be used to endorse or promote products derived from
vcoubard 1:ebc0e0ef0a11 16 * this software without specific prior written permission.
vcoubard 1:ebc0e0ef0a11 17 *
vcoubard 1:ebc0e0ef0a11 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
vcoubard 1:ebc0e0ef0a11 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
vcoubard 1:ebc0e0ef0a11 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
vcoubard 1:ebc0e0ef0a11 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
vcoubard 1:ebc0e0ef0a11 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
vcoubard 1:ebc0e0ef0a11 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
vcoubard 1:ebc0e0ef0a11 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
vcoubard 1:ebc0e0ef0a11 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
vcoubard 1:ebc0e0ef0a11 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
vcoubard 1:ebc0e0ef0a11 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vcoubard 1:ebc0e0ef0a11 28 *
vcoubard 1:ebc0e0ef0a11 29 */
vcoubard 1:ebc0e0ef0a11 30 #ifndef _COMPILER_ABSTRACTION_H
vcoubard 1:ebc0e0ef0a11 31 #define _COMPILER_ABSTRACTION_H
vcoubard 1:ebc0e0ef0a11 32
vcoubard 1:ebc0e0ef0a11 33 /*lint ++flb "Enter library region" */
vcoubard 1:ebc0e0ef0a11 34
vcoubard 1:ebc0e0ef0a11 35 #if defined ( __CC_ARM )
vcoubard 1:ebc0e0ef0a11 36
vcoubard 1:ebc0e0ef0a11 37 #ifndef __ASM
vcoubard 1:ebc0e0ef0a11 38 #define __ASM __asm
vcoubard 1:ebc0e0ef0a11 39 #endif
vcoubard 1:ebc0e0ef0a11 40
vcoubard 1:ebc0e0ef0a11 41 #ifndef __INLINE
vcoubard 1:ebc0e0ef0a11 42 #define __INLINE __inline
vcoubard 1:ebc0e0ef0a11 43 #endif
vcoubard 1:ebc0e0ef0a11 44
vcoubard 1:ebc0e0ef0a11 45 #ifndef __WEAK
vcoubard 1:ebc0e0ef0a11 46 #define __WEAK __weak
vcoubard 1:ebc0e0ef0a11 47 #endif
vcoubard 1:ebc0e0ef0a11 48
vcoubard 1:ebc0e0ef0a11 49 #ifndef __ALIGN
vcoubard 1:ebc0e0ef0a11 50 #define __ALIGN(n) __align(n)
vcoubard 1:ebc0e0ef0a11 51 #endif
vcoubard 1:ebc0e0ef0a11 52
vcoubard 1:ebc0e0ef0a11 53 #define GET_SP() __current_sp()
vcoubard 1:ebc0e0ef0a11 54
vcoubard 1:ebc0e0ef0a11 55 #elif defined ( __ICCARM__ )
vcoubard 1:ebc0e0ef0a11 56
vcoubard 1:ebc0e0ef0a11 57 #ifndef __ASM
vcoubard 1:ebc0e0ef0a11 58 #define __ASM __asm
vcoubard 1:ebc0e0ef0a11 59 #endif
vcoubard 1:ebc0e0ef0a11 60
vcoubard 1:ebc0e0ef0a11 61 #ifndef __INLINE
vcoubard 1:ebc0e0ef0a11 62 #define __INLINE inline
vcoubard 1:ebc0e0ef0a11 63 #endif
vcoubard 1:ebc0e0ef0a11 64
vcoubard 1:ebc0e0ef0a11 65 #ifndef __WEAK
vcoubard 1:ebc0e0ef0a11 66 #define __WEAK __weak
vcoubard 1:ebc0e0ef0a11 67 #endif
vcoubard 1:ebc0e0ef0a11 68
vcoubard 1:ebc0e0ef0a11 69 /* Not defined for IAR since it requires a new line to work, and C preprocessor does not allow that. */
vcoubard 1:ebc0e0ef0a11 70 #ifndef __ALIGN
vcoubard 1:ebc0e0ef0a11 71 #define __ALIGN(n)
vcoubard 1:ebc0e0ef0a11 72 #endif
vcoubard 1:ebc0e0ef0a11 73
vcoubard 1:ebc0e0ef0a11 74 #define GET_SP() __get_SP()
vcoubard 1:ebc0e0ef0a11 75
vcoubard 1:ebc0e0ef0a11 76 #elif defined ( __GNUC__ )
vcoubard 1:ebc0e0ef0a11 77
vcoubard 1:ebc0e0ef0a11 78 #ifndef __ASM
vcoubard 1:ebc0e0ef0a11 79 #define __ASM __asm
vcoubard 1:ebc0e0ef0a11 80 #endif
vcoubard 1:ebc0e0ef0a11 81
vcoubard 1:ebc0e0ef0a11 82 #ifndef __INLINE
vcoubard 1:ebc0e0ef0a11 83 #define __INLINE inline
vcoubard 1:ebc0e0ef0a11 84 #endif
vcoubard 1:ebc0e0ef0a11 85
vcoubard 1:ebc0e0ef0a11 86 #ifndef __WEAK
vcoubard 1:ebc0e0ef0a11 87 #define __WEAK __attribute__((weak))
vcoubard 1:ebc0e0ef0a11 88 #endif
vcoubard 1:ebc0e0ef0a11 89
vcoubard 1:ebc0e0ef0a11 90 #ifndef __ALIGN
vcoubard 1:ebc0e0ef0a11 91 #define __ALIGN(n) __attribute__((aligned(n)))
vcoubard 1:ebc0e0ef0a11 92 #endif
vcoubard 1:ebc0e0ef0a11 93
vcoubard 1:ebc0e0ef0a11 94 #define GET_SP() gcc_current_sp()
vcoubard 1:ebc0e0ef0a11 95
vcoubard 1:ebc0e0ef0a11 96 static inline unsigned int gcc_current_sp(void)
vcoubard 1:ebc0e0ef0a11 97 {
vcoubard 1:ebc0e0ef0a11 98 register unsigned sp __ASM("sp");
vcoubard 1:ebc0e0ef0a11 99 return sp;
vcoubard 1:ebc0e0ef0a11 100 }
vcoubard 1:ebc0e0ef0a11 101
vcoubard 1:ebc0e0ef0a11 102 #elif defined ( __TASKING__ )
vcoubard 1:ebc0e0ef0a11 103
vcoubard 1:ebc0e0ef0a11 104 #ifndef __ASM
vcoubard 1:ebc0e0ef0a11 105 #define __ASM __asm
vcoubard 1:ebc0e0ef0a11 106 #endif
vcoubard 1:ebc0e0ef0a11 107
vcoubard 1:ebc0e0ef0a11 108 #ifndef __INLINE
vcoubard 1:ebc0e0ef0a11 109 #define __INLINE inline
vcoubard 1:ebc0e0ef0a11 110 #endif
vcoubard 1:ebc0e0ef0a11 111
vcoubard 1:ebc0e0ef0a11 112 #ifndef __WEAK
vcoubard 1:ebc0e0ef0a11 113 #define __WEAK __attribute__((weak))
vcoubard 1:ebc0e0ef0a11 114 #endif
vcoubard 1:ebc0e0ef0a11 115
vcoubard 1:ebc0e0ef0a11 116 #ifndef __ALIGN
vcoubard 1:ebc0e0ef0a11 117 #define __ALIGN(n) __align(n)
vcoubard 1:ebc0e0ef0a11 118 #endif
vcoubard 1:ebc0e0ef0a11 119
vcoubard 1:ebc0e0ef0a11 120 #define GET_SP() __get_MSP()
vcoubard 1:ebc0e0ef0a11 121
vcoubard 1:ebc0e0ef0a11 122 #endif
vcoubard 1:ebc0e0ef0a11 123
vcoubard 1:ebc0e0ef0a11 124 /*lint --flb "Leave library region" */
vcoubard 1:ebc0e0ef0a11 125
vcoubard 1:ebc0e0ef0a11 126 #endif