konashi/SBBLEのテスト

Dependencies:   BLE_API mbed

Fork of BLE_LoopbackUART by Bluetooth Low Energy

Committer:
robo8080
Date:
Sun Aug 17 00:53:23 2014 +0000
Revision:
8:a62b8f7d5dcf
Parent:
5:61109bce11fe
DeviceName??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
robo8080 5:61109bce11fe 1 /* mbed Microcontroller Library
robo8080 5:61109bce11fe 2 * Copyright (c) 2006-2013 ARM Limited
robo8080 5:61109bce11fe 3 *
robo8080 5:61109bce11fe 4 * Licensed under the Apache License, Version 2.0 (the "License");
robo8080 5:61109bce11fe 5 * you may not use this file except in compliance with the License.
robo8080 5:61109bce11fe 6 * You may obtain a copy of the License at
robo8080 5:61109bce11fe 7 *
robo8080 5:61109bce11fe 8 * http://www.apache.org/licenses/LICENSE-2.0
robo8080 5:61109bce11fe 9 *
robo8080 5:61109bce11fe 10 * Unless required by applicable law or agreed to in writing, software
robo8080 5:61109bce11fe 11 * distributed under the License is distributed on an "AS IS" BASIS,
robo8080 5:61109bce11fe 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
robo8080 5:61109bce11fe 13 * See the License for the specific language governing permissions and
robo8080 5:61109bce11fe 14 * limitations under the License.
robo8080 5:61109bce11fe 15 */
robo8080 5:61109bce11fe 16
robo8080 5:61109bce11fe 17 #ifndef __NRF51822_H__
robo8080 5:61109bce11fe 18 #define __NRF51822_H__
robo8080 5:61109bce11fe 19
robo8080 5:61109bce11fe 20 #define NRF51
robo8080 5:61109bce11fe 21 #define DEBUG_NRF_USER
robo8080 5:61109bce11fe 22 #define BLE_STACK_SUPPORT_REQD
robo8080 5:61109bce11fe 23 #define BOARD_PCA10001
robo8080 5:61109bce11fe 24
robo8080 5:61109bce11fe 25 #include "mbed.h"
robo8080 5:61109bce11fe 26 #include "blecommon.h"
robo8080 5:61109bce11fe 27 #include "BLEDevice.h"
robo8080 5:61109bce11fe 28 #include "nRF51Gap.h"
robo8080 5:61109bce11fe 29 #include "nRF51GattServer.h"
robo8080 5:61109bce11fe 30
robo8080 5:61109bce11fe 31 class nRF51822n : public BLEDeviceInstanceBase
robo8080 5:61109bce11fe 32 {
robo8080 5:61109bce11fe 33 public:
robo8080 5:61109bce11fe 34 nRF51822n(void);
robo8080 5:61109bce11fe 35 virtual ~nRF51822n(void);
robo8080 5:61109bce11fe 36
robo8080 5:61109bce11fe 37 virtual const char *getVersion(void);
robo8080 5:61109bce11fe 38
robo8080 5:61109bce11fe 39 virtual Gap &getGap() {
robo8080 5:61109bce11fe 40 return nRF51Gap::getInstance();
robo8080 5:61109bce11fe 41 };
robo8080 5:61109bce11fe 42 virtual GattServer &getGattServer() {
robo8080 5:61109bce11fe 43 return nRF51GattServer::getInstance();
robo8080 5:61109bce11fe 44 };
robo8080 5:61109bce11fe 45
robo8080 5:61109bce11fe 46 virtual ble_error_t setTxPower(int8_t txPower);
robo8080 5:61109bce11fe 47
robo8080 5:61109bce11fe 48 virtual ble_error_t init(void);
robo8080 5:61109bce11fe 49 virtual ble_error_t reset(void);
robo8080 5:61109bce11fe 50 virtual void waitForEvent(void);
robo8080 5:61109bce11fe 51 };
robo8080 5:61109bce11fe 52
robo8080 5:61109bce11fe 53 #endif