Previous version which works for my stm32f401 Nucleo board
Fork of X_NUCLEO_IDB0XA1 by
BlueNRGDevice.h@39:af09d274257b, 2014-08-26 (annotated)
- Committer:
- hemddabral
- Date:
- Tue Aug 26 06:53:47 2014 +0000
- Revision:
- 39:af09d274257b
- Parent:
- 37:07487777d9c6
- Child:
- 45:1fff7d7d5ce7
implement BlueNRGDevice::getVersion and BlueNRGDevice::setTxPower
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mridup | 2:a2b623661316 | 1 | /* mbed Microcontroller Library |
mridup | 2:a2b623661316 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mridup | 2:a2b623661316 | 3 | * |
mridup | 2:a2b623661316 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mridup | 2:a2b623661316 | 5 | * you may not use this file except in compliance with the License. |
mridup | 2:a2b623661316 | 6 | * You may obtain a copy of the License at |
mridup | 2:a2b623661316 | 7 | * |
mridup | 2:a2b623661316 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mridup | 2:a2b623661316 | 9 | * |
mridup | 2:a2b623661316 | 10 | * Unless required by applicable law or agreed to in writing, software |
mridup | 2:a2b623661316 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mridup | 2:a2b623661316 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mridup | 2:a2b623661316 | 13 | * See the License for the specific language governing permissions and |
mridup | 2:a2b623661316 | 14 | * limitations under the License. |
mridup | 2:a2b623661316 | 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); |
hemddabral | 37:07487777d9c6 | 38 | /* |
mridup | 2:a2b623661316 | 39 | virtual Gap &getGap() { |
mridup | 2:a2b623661316 | 40 | return BlueNRGGap::getInstance(); |
mridup | 2:a2b623661316 | 41 | }; |
mridup | 2:a2b623661316 | 42 | virtual GattServer &getGattServer() { |
mridup | 2:a2b623661316 | 43 | return BlueNRGGattServer::getInstance(); |
mridup | 2:a2b623661316 | 44 | }; |
hemddabral | 37:07487777d9c6 | 45 | */ |
hemddabral | 37:07487777d9c6 | 46 | virtual Gap &getGap(); |
hemddabral | 37:07487777d9c6 | 47 | virtual GattServer &getGattServer(); |
hemddabral | 37:07487777d9c6 | 48 | virtual const char *getVersion(void); |
mridup | 2:a2b623661316 | 49 | virtual ble_error_t init(void); |
mridup | 2:a2b623661316 | 50 | virtual ble_error_t reset(void); |
hemddabral | 37:07487777d9c6 | 51 | virtual ble_error_t setTxPower(int8_t txPower); |
hemddabral | 37:07487777d9c6 | 52 | virtual void waitForEvent(void); |
mridup | 2:a2b623661316 | 53 | }; |
mridup | 2:a2b623661316 | 54 | |
mridup | 2:a2b623661316 | 55 | #endif |