AndroidのBLEラジコンプロポアプリ「BLEPropo」と接続し、RCサーボとDCモータを制御するプログラムです。 BLE Nanoで動作を確認しています。 BLEPropo → https://github.com/lipoyang/BLEPropo
BLEを使ったAndroid用ラジコンプロポアプリ「BLEPropo」に対応するBLE Nano用ファームウェアです。
BLEPropoは、GitHubにて公開中。
https://github.com/lipoyang/BLEPropo
ラジコンは、mbed HRM1017とRCサーボやDCモータを組み合わせて作ります。
回路図
/media/uploads/lipoyang/ministeer3.pdf
nRF51822/nordic/nrf-sdk/s110/softdevice_assert.h@5:7f89fca19a9e, 2015-03-14 (annotated)
- Committer:
- lipoyang
- Date:
- Sat Mar 14 12:02:48 2015 +0000
- Revision:
- 5:7f89fca19a9e
-convert nRF51822 library to a folder
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lipoyang | 5:7f89fca19a9e | 1 | /* |
lipoyang | 5:7f89fca19a9e | 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
lipoyang | 5:7f89fca19a9e | 3 | * |
lipoyang | 5:7f89fca19a9e | 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, |
lipoyang | 5:7f89fca19a9e | 5 | * copying, transfer or disclosure of such information is prohibited except by express written |
lipoyang | 5:7f89fca19a9e | 6 | * agreement with Nordic Semiconductor. |
lipoyang | 5:7f89fca19a9e | 7 | * |
lipoyang | 5:7f89fca19a9e | 8 | */ |
lipoyang | 5:7f89fca19a9e | 9 | |
lipoyang | 5:7f89fca19a9e | 10 | /** @brief Utilities for verifying program logic |
lipoyang | 5:7f89fca19a9e | 11 | */ |
lipoyang | 5:7f89fca19a9e | 12 | |
lipoyang | 5:7f89fca19a9e | 13 | #ifndef SOFTDEVICE_ASSERT_H_ |
lipoyang | 5:7f89fca19a9e | 14 | #define SOFTDEVICE_ASSERT_H_ |
lipoyang | 5:7f89fca19a9e | 15 | |
lipoyang | 5:7f89fca19a9e | 16 | #include <stdint.h> |
lipoyang | 5:7f89fca19a9e | 17 | |
lipoyang | 5:7f89fca19a9e | 18 | /** @brief This function handles assertions. |
lipoyang | 5:7f89fca19a9e | 19 | * |
lipoyang | 5:7f89fca19a9e | 20 | * |
lipoyang | 5:7f89fca19a9e | 21 | * @note |
lipoyang | 5:7f89fca19a9e | 22 | * This function is called when an assertion has triggered. |
lipoyang | 5:7f89fca19a9e | 23 | * |
lipoyang | 5:7f89fca19a9e | 24 | * |
lipoyang | 5:7f89fca19a9e | 25 | * @param line_num The line number where the assertion is called |
lipoyang | 5:7f89fca19a9e | 26 | * @param file_name Pointer to the file name |
lipoyang | 5:7f89fca19a9e | 27 | */ |
lipoyang | 5:7f89fca19a9e | 28 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); |
lipoyang | 5:7f89fca19a9e | 29 | |
lipoyang | 5:7f89fca19a9e | 30 | |
lipoyang | 5:7f89fca19a9e | 31 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ |
lipoyang | 5:7f89fca19a9e | 32 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ |
lipoyang | 5:7f89fca19a9e | 33 | /** @brief Check intended for production code |
lipoyang | 5:7f89fca19a9e | 34 | * |
lipoyang | 5:7f89fca19a9e | 35 | * Check passes if "expr" evaluates to true. */ |
lipoyang | 5:7f89fca19a9e | 36 | #define ASSERT(expr) \ |
lipoyang | 5:7f89fca19a9e | 37 | if (expr) \ |
lipoyang | 5:7f89fca19a9e | 38 | { \ |
lipoyang | 5:7f89fca19a9e | 39 | } \ |
lipoyang | 5:7f89fca19a9e | 40 | else \ |
lipoyang | 5:7f89fca19a9e | 41 | { \ |
lipoyang | 5:7f89fca19a9e | 42 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ |
lipoyang | 5:7f89fca19a9e | 43 | /*lint -unreachable */ \ |
lipoyang | 5:7f89fca19a9e | 44 | } |
lipoyang | 5:7f89fca19a9e | 45 | |
lipoyang | 5:7f89fca19a9e | 46 | #endif /* SOFTDEVICE_ASSERT_H_ */ |