【これは旧バージョンです】 AndroidのBLEラジコンプロポアプリ「BLEPropo」と接続し、RCサーボとDCモータを制御するプログラムです。 mbed HRM1017で動作を確認しています。 BLEPropo → https://github.com/lipoyang/BLEPropo

Dependencies:   BLE_API mbed

Fork of BLE_RCBController2 by Junichi Katsu

BLEを使ったAndroid用ラジコンプロポアプリ「BLEPropo」に対応するmbed HRM1017用ファームウェアです。
BLEPropoは、GitHubにて公開中。
https://github.com/lipoyang/BLEPropo
/media/uploads/lipoyang/blepropo_ui.png
ラジコンは、mbed HRM1017とRCサーボやDCモータを組み合わせて作ります。
/media/uploads/lipoyang/ble_wiring.png

Committer:
lipoyang
Date:
Thu Sep 18 04:47:00 2014 +0000
Revision:
13:2075c4878557
Parent:
4:ebda47d22091
Servo????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 1:48f6e08a3ac2 1 /*
jksoft 1:48f6e08a3ac2 2 * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
jksoft 1:48f6e08a3ac2 3 *
jksoft 1:48f6e08a3ac2 4 * The information contained herein is confidential property of Nordic Semiconductor. The use,
jksoft 1:48f6e08a3ac2 5 * copying, transfer or disclosure of such information is prohibited except by express written
jksoft 1:48f6e08a3ac2 6 * agreement with Nordic Semiconductor.
jksoft 1:48f6e08a3ac2 7 *
jksoft 1:48f6e08a3ac2 8 */
jksoft 1:48f6e08a3ac2 9
jksoft 1:48f6e08a3ac2 10 /** @file
jksoft 1:48f6e08a3ac2 11 * @brief Utilities for verifying program logic
jksoft 1:48f6e08a3ac2 12 */
jksoft 1:48f6e08a3ac2 13
jksoft 1:48f6e08a3ac2 14 #ifndef NRF_ASSERT_H_
jksoft 1:48f6e08a3ac2 15 #define NRF_ASSERT_H_
jksoft 1:48f6e08a3ac2 16
jksoft 1:48f6e08a3ac2 17 #include <stdint.h>
jksoft 1:48f6e08a3ac2 18
jksoft 1:48f6e08a3ac2 19 #ifdef __cplusplus
jksoft 1:48f6e08a3ac2 20 extern "C" {
jksoft 1:48f6e08a3ac2 21 #endif
jksoft 1:48f6e08a3ac2 22
jksoft 1:48f6e08a3ac2 23 #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER)
jksoft 1:48f6e08a3ac2 24
jksoft 1:48f6e08a3ac2 25 /** @brief Function for handling assertions.
jksoft 1:48f6e08a3ac2 26 *
jksoft 1:48f6e08a3ac2 27 *
jksoft 1:48f6e08a3ac2 28 * @note
jksoft 1:48f6e08a3ac2 29 * This function is called when an assertion has triggered.
jksoft 1:48f6e08a3ac2 30 *
jksoft 1:48f6e08a3ac2 31 *
jksoft 1:48f6e08a3ac2 32 * @post
jksoft 1:48f6e08a3ac2 33 * All hardware is put into an idle non-emitting state (in particular the radio is highly
jksoft 1:48f6e08a3ac2 34 * important to switch off since the radio might be in a state that makes it send
jksoft 1:48f6e08a3ac2 35 * packets continiously while a typical final infinit ASSERT loop is executing).
jksoft 1:48f6e08a3ac2 36 *
jksoft 1:48f6e08a3ac2 37 *
jksoft 1:48f6e08a3ac2 38 * @param line_num The line number where the assertion is called
jksoft 1:48f6e08a3ac2 39 * @param file_name Pointer to the file name
jksoft 1:48f6e08a3ac2 40 */
jksoft 1:48f6e08a3ac2 41 void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name);
jksoft 1:48f6e08a3ac2 42
jksoft 1:48f6e08a3ac2 43 /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */
jksoft 1:48f6e08a3ac2 44 /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \
jksoft 1:48f6e08a3ac2 45
jksoft 1:48f6e08a3ac2 46 /** @brief Function for checking intended for production code.
jksoft 1:48f6e08a3ac2 47 *
jksoft 1:48f6e08a3ac2 48 * Check passes if "expr" evaluates to true. */
jksoft 1:48f6e08a3ac2 49 #define ASSERT(expr) \
jksoft 1:48f6e08a3ac2 50 if (expr) \
jksoft 1:48f6e08a3ac2 51 { \
jksoft 1:48f6e08a3ac2 52 } \
jksoft 1:48f6e08a3ac2 53 else \
jksoft 1:48f6e08a3ac2 54 { \
jksoft 1:48f6e08a3ac2 55 assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \
jksoft 1:48f6e08a3ac2 56 }
jksoft 1:48f6e08a3ac2 57 #else
jksoft 1:48f6e08a3ac2 58 #define ASSERT(expr) //!< Assert empty when disabled
jksoft 1:48f6e08a3ac2 59 void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name);
jksoft 1:48f6e08a3ac2 60
jksoft 1:48f6e08a3ac2 61 #endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */
jksoft 1:48f6e08a3ac2 62
jksoft 1:48f6e08a3ac2 63 #ifdef __cplusplus
jksoft 1:48f6e08a3ac2 64 }
jksoft 1:48f6e08a3ac2 65 #endif
jksoft 1:48f6e08a3ac2 66
jksoft 1:48f6e08a3ac2 67 #endif /* NRF_ASSERT_H_ */