To get started with Seeed Tiny BLE, include detecting motion, button and battery level.

Dependencies:   BLE_API eMPL_MPU6050 mbed nRF51822

Committer:
yihui
Date:
Wed Apr 22 07:47:17 2015 +0000
Revision:
1:fc2f9d636751
update libraries; ; delete nRF51822/nordic-sdk/components/gpiote/app_gpiote.c to solve GPIOTE_IRQHandler multiply defined issue. temperarily change nRF51822 library to folder

Who changed what in which revision?

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