mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_API/include/nrf_svc.h
- Committer:
- mbed_official
- Date:
- 2014-08-08
- Revision:
- 277:0dffe5d9e928
- Child:
- 307:e2f2e83d7c41
File content as of revision 277:0dffe5d9e928:
#ifndef NRF_SVC__ #define NRF_SVC__ #ifdef SVCALL_AS_NORMAL_FUNCTION #define SVCALL(number, return_type, signature) return_type signature #else #ifndef SVCALL #if defined (__CC_ARM) #define SVCALL(number, return_type, signature) return_type __svc(number) signature #elif defined (__GNUC__) #define SVCALL(number, return_type, signature) \ _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ __attribute__((naked)) static return_type signature \ { \ __asm( \ "svc %0\n" \ "bx r14" : : "I" (number) : "r0" \ ); \ } #elif defined (__ICCARM__) #define PRAGMA(x) _Pragma(#x) #define SVCALL(number, return_type, signature) \ PRAGMA(swi_number = number) \ __swi return_type signature; #else #define SVCALL(number, return_type, signature) return_type signature #endif #endif // SVCALL #endif // SVCALL_AS_NORMAL_FUNCTION #endif // NRF_SVC__