iOSのBLEコントローラアプリ「RCBController」とmbed HRM1017を接続し、RCサーボモータを操作するテストプログラムです。
Dependencies: BLE_API_Native_IRC Servo mbed
Fork of BLE_RCBController by
- 古いBLEライブラリを使っているのでプラットフォームは”Nordic nRF51822”を選択してください。
- ライブラリ類はUpdateしないでください。コンパイルエラーになります。
うまく接続できない時は、iPhone/iPadのBluetoothをOFF->ONしてキャッシュをクリアしてみてください。
BLE_API_Native_IRC/hw/nRF51822n/nordic/nrf-sdk/s110/nrf_svc.h@0:8c643bfe55b7, 2014-07-10 (annotated)
- Committer:
- jksoft
- Date:
- Thu Jul 10 14:21:52 2014 +0000
- Revision:
- 0:8c643bfe55b7
??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:8c643bfe55b7 | 1 | #ifndef NRF_SVC__ |
jksoft | 0:8c643bfe55b7 | 2 | #define NRF_SVC__ |
jksoft | 0:8c643bfe55b7 | 3 | |
jksoft | 0:8c643bfe55b7 | 4 | #include "nordic_global.h" |
jksoft | 0:8c643bfe55b7 | 5 | |
jksoft | 0:8c643bfe55b7 | 6 | #ifdef SVCALL_AS_NORMAL_FUNCTION |
jksoft | 0:8c643bfe55b7 | 7 | #define SVCALL(number, return_type, signature) return_type signature |
jksoft | 0:8c643bfe55b7 | 8 | #else |
jksoft | 0:8c643bfe55b7 | 9 | |
jksoft | 0:8c643bfe55b7 | 10 | #ifndef SVCALL |
jksoft | 0:8c643bfe55b7 | 11 | #if defined (__CC_ARM) |
jksoft | 0:8c643bfe55b7 | 12 | #define SVCALL(number, return_type, signature) return_type __svc(number) signature |
jksoft | 0:8c643bfe55b7 | 13 | #elif defined (__GNUC__) |
jksoft | 0:8c643bfe55b7 | 14 | #define SVCALL(number, return_type, signature) \ |
jksoft | 0:8c643bfe55b7 | 15 | _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ |
jksoft | 0:8c643bfe55b7 | 16 | _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ |
jksoft | 0:8c643bfe55b7 | 17 | __attribute__((naked)) static return_type signature \ |
jksoft | 0:8c643bfe55b7 | 18 | { \ |
jksoft | 0:8c643bfe55b7 | 19 | __asm( \ |
jksoft | 0:8c643bfe55b7 | 20 | "svc %0\n" \ |
jksoft | 0:8c643bfe55b7 | 21 | "bx r14" : : "I" (number) : "r0" \ |
jksoft | 0:8c643bfe55b7 | 22 | ); \ |
jksoft | 0:8c643bfe55b7 | 23 | } |
jksoft | 0:8c643bfe55b7 | 24 | #elif defined (__ICCARM__) |
jksoft | 0:8c643bfe55b7 | 25 | #define PRAGMA(x) _Pragma(#x) |
jksoft | 0:8c643bfe55b7 | 26 | #define SVCALL(number, return_type, signature) \ |
jksoft | 0:8c643bfe55b7 | 27 | PRAGMA(swi_number = number) \ |
jksoft | 0:8c643bfe55b7 | 28 | __swi return_type signature; |
jksoft | 0:8c643bfe55b7 | 29 | #else |
jksoft | 0:8c643bfe55b7 | 30 | #define SVCALL(number, return_type, signature) return_type signature |
jksoft | 0:8c643bfe55b7 | 31 | #endif |
jksoft | 0:8c643bfe55b7 | 32 | #endif // SVCALL |
jksoft | 0:8c643bfe55b7 | 33 | |
jksoft | 0:8c643bfe55b7 | 34 | #endif // SVCALL_AS_NORMAL_FUNCTION |
jksoft | 0:8c643bfe55b7 | 35 | #endif // NRF_SVC__ |