BLE lib

Fork of Nucleo_BLE_BlueNRG by STM32 eKairn

Committer:
vijaynvr
Date:
Sun Feb 08 14:25:58 2015 +0000
Revision:
5:beb2c7544ce4
Parent:
0:a948f5f3904c
working;

Who changed what in which revision?

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