Openwear requires RC oscillator to be used

Fork of nRF51822 by Nordic Semiconductor

Committer:
bogdanm
Date:
Wed Mar 26 14:38:17 2014 +0000
Revision:
0:eff01767de02
Child:
37:c29c330d942c
Initial import of the nRF51822 code

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