meh

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Fri Aug 15 15:28:31 2014 +0100
Revision:
88:9327015d4013
Parent:
TARGET_NRF51822/TARGET_NORDIC/TARGET_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_API/include/nrf_svc.h@87:6213f644d804
Child:
89:552587b429a1
Release 88 of the mbed library

Main changes:

- changed "error.h" to "mbed_error.h" to avoid conflicts with 3rd party code
- LPC1549 SPI driver fixes
- K64F Ethernet TX buffer reclaim mechanism fix
- STDIO initialization fix
- NUCLEO_F334R8 I2C clock fix
- various other fixes

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 82:6473597d706e 19 "bx r14" : : "I" (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__