iOSのBLEコントローラアプリ「RCBController」とmbed HRM1017を接続し、RCサーボモータを操作するテストプログラムです。

Dependencies:   BLE_API_Native_IRC Servo mbed

Fork of BLE_RCBController by Junichi Katsu

  • 古いBLEライブラリを使っているのでプラットフォームは”Nordic nRF51822”を選択してください。
  • ライブラリ類はUpdateしないでください。コンパイルエラーになります。

うまく接続できない時は、iPhone/iPadのBluetoothをOFF->ONしてキャッシュをクリアしてみてください。

/media/uploads/robo8080/img_1560.jpg

Committer:
jksoft
Date:
Thu Jul 10 14:21:52 2014 +0000
Revision:
0:8c643bfe55b7
??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8c643bfe55b7 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8c643bfe55b7 2 *
jksoft 0:8c643bfe55b7 3 * The information contained herein is confidential property of Nordic
jksoft 0:8c643bfe55b7 4 * Semiconductor ASA.Terms and conditions of usage are described in detail
jksoft 0:8c643bfe55b7 5 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8c643bfe55b7 6 *
jksoft 0:8c643bfe55b7 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8c643bfe55b7 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8c643bfe55b7 9 * the file.
jksoft 0:8c643bfe55b7 10 *
jksoft 0:8c643bfe55b7 11 * $LastChangedRevision: 13999 $
jksoft 0:8c643bfe55b7 12 */
jksoft 0:8c643bfe55b7 13
jksoft 0:8c643bfe55b7 14 /**
jksoft 0:8c643bfe55b7 15 * @file
jksoft 0:8c643bfe55b7 16 * @brief ECB driver API.
jksoft 0:8c643bfe55b7 17 */
jksoft 0:8c643bfe55b7 18
jksoft 0:8c643bfe55b7 19 #ifndef NRF_ECB_H__
jksoft 0:8c643bfe55b7 20 #define NRF_ECB_H__
jksoft 0:8c643bfe55b7 21
jksoft 0:8c643bfe55b7 22 /**
jksoft 0:8c643bfe55b7 23 * @defgroup nrf_ecb AES ECB encryption
jksoft 0:8c643bfe55b7 24 * @{
jksoft 0:8c643bfe55b7 25 * @ingroup nrf_drivers
jksoft 0:8c643bfe55b7 26 * @brief Driver for the nRF51 AES Electronic Code Book (ECB) peripheral.
jksoft 0:8c643bfe55b7 27 *
jksoft 0:8c643bfe55b7 28 * In order to encrypt and decrypt data the peripheral must be powered on
jksoft 0:8c643bfe55b7 29 * using nrf_ecb_init() and then the key set using nrf_ecb_set_key.
jksoft 0:8c643bfe55b7 30 */
jksoft 0:8c643bfe55b7 31
jksoft 0:8c643bfe55b7 32 #include <stdint.h>
jksoft 0:8c643bfe55b7 33 #include "nordic_global.h"
jksoft 0:8c643bfe55b7 34
jksoft 0:8c643bfe55b7 35 /**
jksoft 0:8c643bfe55b7 36 * Initialize and power on the ECB peripheral.
jksoft 0:8c643bfe55b7 37 *
jksoft 0:8c643bfe55b7 38 * Allocates memory for the ECBDATAPTR.
jksoft 0:8c643bfe55b7 39 * @retval true Initialization was successful.
jksoft 0:8c643bfe55b7 40 * @retval false Powering up failed.
jksoft 0:8c643bfe55b7 41 */
jksoft 0:8c643bfe55b7 42 bool nrf_ecb_init(void);
jksoft 0:8c643bfe55b7 43
jksoft 0:8c643bfe55b7 44 /**
jksoft 0:8c643bfe55b7 45 * Encrypt/decrypt 16-byte data using current key.
jksoft 0:8c643bfe55b7 46 *
jksoft 0:8c643bfe55b7 47 * The function avoids unnecessary copying of data if the point to the
jksoft 0:8c643bfe55b7 48 * correct locations in the ECB data structure.
jksoft 0:8c643bfe55b7 49 *
jksoft 0:8c643bfe55b7 50 * @param dst Result of encryption/decryption. 16 bytes will be written.
jksoft 0:8c643bfe55b7 51 * @param src Source with 16-byte data to be encrypted/decrypted.
jksoft 0:8c643bfe55b7 52 *
jksoft 0:8c643bfe55b7 53 * @retval true If the encryption operation completed.
jksoft 0:8c643bfe55b7 54 * @retval false If the encryption operation did not complete.
jksoft 0:8c643bfe55b7 55 */
jksoft 0:8c643bfe55b7 56 bool nrf_ecb_crypt(uint8_t * dst, const uint8_t * src);
jksoft 0:8c643bfe55b7 57
jksoft 0:8c643bfe55b7 58 /**
jksoft 0:8c643bfe55b7 59 * Set the key to be used for encryption/decryption.
jksoft 0:8c643bfe55b7 60 *
jksoft 0:8c643bfe55b7 61 * @param key Pointer to key. 16 bytes will be read.
jksoft 0:8c643bfe55b7 62 */
jksoft 0:8c643bfe55b7 63 void nrf_ecb_set_key(const uint8_t * key);
jksoft 0:8c643bfe55b7 64
jksoft 0:8c643bfe55b7 65 #endif // NRF_ECB_H__
jksoft 0:8c643bfe55b7 66
jksoft 0:8c643bfe55b7 67 /** @} */