Previous version which works for my stm32f401 Nucleo board
Fork of X_NUCLEO_IDB0XA1 by
BlueNRGDevice.h@45:1fff7d7d5ce7, 2014-09-05 (annotated)
- Committer:
- mridup
- Date:
- Fri Sep 05 06:41:21 2014 +0000
- Revision:
- 45:1fff7d7d5ce7
- Parent:
- 39:af09d274257b
- Child:
- 58:027c65a54097
get/setDeviceName. Removing device name characteristic update in set advertise data.Platform independent BLE_BlueNRG library.
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); |
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 |