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してキャッシュをクリアしてみてください。
Diff: BLE_API_Native_IRC/hw/nRF51822n/nordic/nrf-sdk/ble/rpc/ble_rpc_cmd_decoder_gatts.h
- Revision:
- 0:8c643bfe55b7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BLE_API_Native_IRC/hw/nRF51822n/nordic/nrf-sdk/ble/rpc/ble_rpc_cmd_decoder_gatts.h Thu Jul 10 14:21:52 2014 +0000 @@ -0,0 +1,53 @@ +/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. + * + * The information contained herein is property of Nordic Semiconductor ASA. + * Terms and conditions of usage are described in detail in NORDIC + * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. + * + * Licensees are granted free, non-transferable use of the information. NO + * WARRANTY of ANY KIND is provided. This heading must NOT be removed from + * the file. + * + */ + +/** @file + * + * @defgroup ble_rpc_cmd_decoder_gatts GATTS Command Decoder + * @{ + * @ingroup ble_sdk_lib_serialization + * + * @brief Decoder for serialized GATTS commands from Application Chip. + * + * @details This file contains the declaration of the function that decodes the serialized GATTS + * commands from Application Chip and calls the appropriate BLE stack API. + */ + +#ifndef BLE_RPC_CMD_DECODER_GATTS_H__ +#define BLE_RPC_CMD_DECODER_GATTS_H__ + +#include <stdint.h> + +/**@brief Function for processing the encoded GATTS command from application chip. + * + * @details This function will decode the encoded command and call the appropriate BLE Stack + * API. It will then create a Command Response packet with the return value from the + * stack API encoded in it and will send it to the transport layer for transmission to + * the application controller chip. + + * @param[in] p_command The encoded command. + * @param[in] op_code Operation code of the command. + * @param[in] command_len Length of the encoded command. + * + * @retval NRF_SUCCESS If the decoding of the command was successful, the soft device API + * was called, and the command response was sent to peer, otherwise an + * error code. + * If the transport layer returns an error code while sending + * the Command Response, the same error code will be returned by this + * function (see @ref hci_transport_pkt_write for the list of + * error codes). + */ +uint32_t ble_rpc_cmd_gatts_decode(uint8_t * p_command, uint8_t op_code, uint32_t command_len); + +#endif // BLE_RPC_CMD_DECODER_GATTS_H__ + +/** @} */