Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
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__
Generated on Tue Jul 12 2022 19:00:52 by
