changed low freq. clock source to IRC

Dependents:   BLE_ANCS_SDAPI_IRC

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nrf_svc.h Source File

nrf_svc.h

00001 #ifndef NRF_SVC__
00002 #define NRF_SVC__
00003 
00004 #include "nordic_global.h"
00005 
00006 #ifdef SVCALL_AS_NORMAL_FUNCTION
00007 #define SVCALL(number, return_type, signature) return_type signature
00008 #else
00009 
00010 #ifndef SVCALL
00011 #if defined (__CC_ARM)
00012 #define SVCALL(number, return_type, signature) return_type __svc(number) signature
00013 #elif defined (__GNUC__)
00014 #define SVCALL(number, return_type, signature) \
00015   _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
00016   _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
00017   __attribute__((naked)) static return_type signature \
00018   { \
00019     __asm( \
00020         "svc %0\n" \
00021         "bx r14" : : "I" (number) : "r0" \
00022     ); \
00023   }
00024 #elif defined (__ICCARM__)
00025 #define PRAGMA(x) _Pragma(#x)
00026 #define SVCALL(number, return_type, signature) \
00027 PRAGMA(swi_number = number) \
00028  __swi return_type signature;
00029 #else
00030 #define SVCALL(number, return_type, signature) return_type signature  
00031 #endif
00032 #endif  // SVCALL
00033 
00034 #endif  // SVCALL_AS_NORMAL_FUNCTION
00035 #endif  // NRF_SVC__