テスト用

Fork of nRF51822 by Nordic Semiconductor

Committer:
Rohit Grover
Date:
Fri Sep 26 14:46:19 2014 +0100
Revision:
69:936d81c963fe
Parent:
63:708b23889028
Release 0.2.1
=============

Features
~~~~~~~~

- Turn on the service-changed characteristic by default.

Bugfixes
~~~~~~~~

- Raised the maximum number of supported characteristics/descriptors to 24
(was 10 previously). We're beginning to find services like Device-
Information with several characteristics populated.

Compatibility
~~~~~~~~~~~~~

Works with 0.2.0 of BLE_API.

Who changed what in which revision?

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