HW layer for the Nucleo board, it only work with old BLE_API

Dependents:   Hello_BLE F446RE-BLE

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
hemddabral
Date:
Tue Oct 07 10:13:02 2014 +0000
Revision:
58:027c65a54097
Parent:
45:1fff7d7d5ce7
Child:
64:6d7b775c3f6d
code cleanup and indentation.

Who changed what in which revision?

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