meh

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Fri Sep 12 16:41:52 2014 +0100
Revision:
89:552587b429a1
Parent:
88:9327015d4013
Release 89 of the mbed library

Main changes:

- low power optimizations for Nordic targets
- code structure changes for Freescale K64F targets
- bug fixes in various backends

Who changed what in which revision?

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