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: 17685 $
jksoft 0:8c643bfe55b7 12 */
jksoft 0:8c643bfe55b7 13
jksoft 0:8c643bfe55b7 14 /**
jksoft 0:8c643bfe55b7 15 * @file
jksoft 0:8c643bfe55b7 16 * @brief NMVC driver API.
jksoft 0:8c643bfe55b7 17 */
jksoft 0:8c643bfe55b7 18
jksoft 0:8c643bfe55b7 19 #ifndef NRF_NVMC_H__
jksoft 0:8c643bfe55b7 20 #define NRF_NVMC_H__
jksoft 0:8c643bfe55b7 21
jksoft 0:8c643bfe55b7 22 #include <stdint.h>
jksoft 0:8c643bfe55b7 23 #include "nordic_global.h"
jksoft 0:8c643bfe55b7 24
jksoft 0:8c643bfe55b7 25
jksoft 0:8c643bfe55b7 26 /**
jksoft 0:8c643bfe55b7 27 * @defgroup nrf_nvmc Non-volatile memory controller
jksoft 0:8c643bfe55b7 28 * @{
jksoft 0:8c643bfe55b7 29 * @ingroup nrf_drivers
jksoft 0:8c643bfe55b7 30 * @brief Driver for the nRF51 NVMC peripheral.
jksoft 0:8c643bfe55b7 31 *
jksoft 0:8c643bfe55b7 32 * This driver allows writing to the non-volatile memory (NVM) regions
jksoft 0:8c643bfe55b7 33 * of the nRF51. In order to write to NVM the controller must be powered
jksoft 0:8c643bfe55b7 34 * on and the relevant page must be erased.
jksoft 0:8c643bfe55b7 35 *
jksoft 0:8c643bfe55b7 36 */
jksoft 0:8c643bfe55b7 37
jksoft 0:8c643bfe55b7 38
jksoft 0:8c643bfe55b7 39 /**
jksoft 0:8c643bfe55b7 40 * @brief Erase a page in flash. This is required before writing to any
jksoft 0:8c643bfe55b7 41 * address in the page.
jksoft 0:8c643bfe55b7 42 *
jksoft 0:8c643bfe55b7 43 * @param address Start address of the page.
jksoft 0:8c643bfe55b7 44 */
jksoft 0:8c643bfe55b7 45 void nrf_nvmc_page_erase(uint32_t address);
jksoft 0:8c643bfe55b7 46
jksoft 0:8c643bfe55b7 47
jksoft 0:8c643bfe55b7 48 /**
jksoft 0:8c643bfe55b7 49 * @brief Write a single byte to flash.
jksoft 0:8c643bfe55b7 50 *
jksoft 0:8c643bfe55b7 51 * The function reads the word containing the byte, and then
jksoft 0:8c643bfe55b7 52 * rewrites the entire word.
jksoft 0:8c643bfe55b7 53 *
jksoft 0:8c643bfe55b7 54 * @param address Address to write to.
jksoft 0:8c643bfe55b7 55 * @param value Value to write.
jksoft 0:8c643bfe55b7 56 */
jksoft 0:8c643bfe55b7 57 void nrf_nvmc_write_byte(uint32_t address , uint8_t value);
jksoft 0:8c643bfe55b7 58
jksoft 0:8c643bfe55b7 59
jksoft 0:8c643bfe55b7 60 /**
jksoft 0:8c643bfe55b7 61 * @brief Write a 32-bit word to flash.
jksoft 0:8c643bfe55b7 62 * @param address Address to write to.
jksoft 0:8c643bfe55b7 63 * @param value Value to write.
jksoft 0:8c643bfe55b7 64 */
jksoft 0:8c643bfe55b7 65 void nrf_nvmc_write_word(uint32_t address, uint32_t value);
jksoft 0:8c643bfe55b7 66
jksoft 0:8c643bfe55b7 67
jksoft 0:8c643bfe55b7 68 /**
jksoft 0:8c643bfe55b7 69 * @brief Write consecutive bytes to flash.
jksoft 0:8c643bfe55b7 70 *
jksoft 0:8c643bfe55b7 71 * @param address Address to write to.
jksoft 0:8c643bfe55b7 72 * @param src Pointer to data to copy from.
jksoft 0:8c643bfe55b7 73 * @param num_bytes Number of bytes in src to write.
jksoft 0:8c643bfe55b7 74 */
jksoft 0:8c643bfe55b7 75 void nrf_nvmc_write_bytes(uint32_t address, const uint8_t * src, uint32_t num_bytes);
jksoft 0:8c643bfe55b7 76
jksoft 0:8c643bfe55b7 77
jksoft 0:8c643bfe55b7 78 /**
jksoft 0:8c643bfe55b7 79 @ @brief Write consecutive words to flash.
jksoft 0:8c643bfe55b7 80 *
jksoft 0:8c643bfe55b7 81 * @param address Address to write to.
jksoft 0:8c643bfe55b7 82 * @param src Pointer to data to copy from.
jksoft 0:8c643bfe55b7 83 * @param num_words Number of bytes in src to write.
jksoft 0:8c643bfe55b7 84 */
jksoft 0:8c643bfe55b7 85 void nrf_nvmc_write_words(uint32_t address, const uint32_t * src, uint32_t num_words);
jksoft 0:8c643bfe55b7 86
jksoft 0:8c643bfe55b7 87
jksoft 0:8c643bfe55b7 88 #endif // NRF_NVMC_H__
jksoft 0:8c643bfe55b7 89 /** @} */
jksoft 0:8c643bfe55b7 90
jksoft 0:8c643bfe55b7 91