Nordic stack and drivers for the mbed BLE API

Dependents:   BLE_Health_Thermometer2

Fork of nRF51822 by Nordic Semiconductor

Committer:
Rohit Grover
Date:
Mon Jul 07 13:43:31 2014 +0100
Revision:
37:c29c330d942c
Parent:
0:eff01767de02
changes required to upgrade to V7 of the soft-device

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 0:eff01767de02 1 #ifndef NRF_SVC__
bogdanm 0:eff01767de02 2 #define NRF_SVC__
bogdanm 0:eff01767de02 3
bogdanm 0:eff01767de02 4 #ifdef SVCALL_AS_NORMAL_FUNCTION
bogdanm 0:eff01767de02 5 #define SVCALL(number, return_type, signature) return_type signature
bogdanm 0:eff01767de02 6 #else
bogdanm 0:eff01767de02 7
bogdanm 0:eff01767de02 8 #ifndef SVCALL
bogdanm 0:eff01767de02 9 #if defined (__CC_ARM)
bogdanm 0:eff01767de02 10 #define SVCALL(number, return_type, signature) return_type __svc(number) signature
bogdanm 0:eff01767de02 11 #elif defined (__GNUC__)
bogdanm 0:eff01767de02 12 #define SVCALL(number, return_type, signature) \
bogdanm 0:eff01767de02 13 _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
bogdanm 0:eff01767de02 14 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
bogdanm 0:eff01767de02 15 __attribute__((naked)) static return_type signature \
bogdanm 0:eff01767de02 16 { \
bogdanm 0:eff01767de02 17 __asm( \
bogdanm 0:eff01767de02 18 "svc %0\n" \
bogdanm 0:eff01767de02 19 "bx r14" : : "I" (number) : "r0" \
bogdanm 0:eff01767de02 20 ); \
bogdanm 0:eff01767de02 21 }
bogdanm 0:eff01767de02 22 #elif defined (__ICCARM__)
bogdanm 0:eff01767de02 23 #define PRAGMA(x) _Pragma(#x)
bogdanm 0:eff01767de02 24 #define SVCALL(number, return_type, signature) \
bogdanm 0:eff01767de02 25 PRAGMA(swi_number = number) \
bogdanm 0:eff01767de02 26 __swi return_type signature;
bogdanm 0:eff01767de02 27 #else
bogdanm 0:eff01767de02 28 #define SVCALL(number, return_type, signature) return_type signature
bogdanm 0:eff01767de02 29 #endif
bogdanm 0:eff01767de02 30 #endif // SVCALL
bogdanm 0:eff01767de02 31
bogdanm 0:eff01767de02 32 #endif // SVCALL_AS_NORMAL_FUNCTION
bogdanm 0:eff01767de02 33 #endif // NRF_SVC__