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:
mridup
Date:
Wed Apr 01 09:02:51 2015 +0000
Revision:
65:f9958b8f2548
Parent:
64:6d7b775c3f6d
1. GapAdvertisingParams constants usage update; 2. Gap::getAddress() function; 3. BlueNRGGattServer Class update; 4. BlueNRGGap class update; 5. HandleDataWrittenEvent function update from btle.cpp

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 64:6d7b775c3f6d 17 /**
mridup 64:6d7b775c3f6d 18 ******************************************************************************
mridup 64:6d7b775c3f6d 19 * @file BlueNRGDevice.h
mridup 64:6d7b775c3f6d 20 * @author STMicroelectronics
mridup 64:6d7b775c3f6d 21 * @brief Header file for BLEDeviceInstanceBase based BlueNRGDevice
mridup 64:6d7b775c3f6d 22 ******************************************************************************
mridup 64:6d7b775c3f6d 23 * @copy
mridup 64:6d7b775c3f6d 24 *
mridup 64:6d7b775c3f6d 25 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
mridup 64:6d7b775c3f6d 26 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
mridup 64:6d7b775c3f6d 27 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
mridup 64:6d7b775c3f6d 28 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
mridup 64:6d7b775c3f6d 29 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
mridup 64:6d7b775c3f6d 30 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
mridup 64:6d7b775c3f6d 31 *
mridup 64:6d7b775c3f6d 32 * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
mridup 64:6d7b775c3f6d 33 */
mridup 64:6d7b775c3f6d 34
mridup 2:a2b623661316 35 #ifndef __BLUENRG_H__
mridup 2:a2b623661316 36 #define __BLUENRG_H__
mridup 2:a2b623661316 37
mridup 2:a2b623661316 38 #define BLUENRG
mridup 2:a2b623661316 39 #define DEBUG_BLUENRG_USER
mridup 2:a2b623661316 40
mridup 2:a2b623661316 41 #include "btle.h"
mridup 2:a2b623661316 42
mridup 2:a2b623661316 43 #include "mbed.h"
mridup 2:a2b623661316 44 #include "blecommon.h"
mridup 2:a2b623661316 45 #include "BLEDevice.h"
mridup 2:a2b623661316 46 #include "BlueNRGGap.h"
mridup 2:a2b623661316 47 #include "BlueNRGGattServer.h"
mridup 2:a2b623661316 48
mridup 2:a2b623661316 49
mridup 2:a2b623661316 50 class BlueNRGDevice : public BLEDeviceInstanceBase
mridup 2:a2b623661316 51 {
hemddabral 39:af09d274257b 52
mridup 2:a2b623661316 53 public:
mridup 2:a2b623661316 54 BlueNRGDevice(void);
mridup 2:a2b623661316 55 virtual ~BlueNRGDevice(void);
mridup 65:f9958b8f2548 56
hemddabral 37:07487777d9c6 57 virtual Gap &getGap();
hemddabral 37:07487777d9c6 58 virtual GattServer &getGattServer();
hemddabral 37:07487777d9c6 59 virtual const char *getVersion(void);
mridup 2:a2b623661316 60 virtual ble_error_t init(void);
mridup 65:f9958b8f2548 61 virtual ble_error_t shutdown(void);
mridup 2:a2b623661316 62 virtual ble_error_t reset(void);
hemddabral 37:07487777d9c6 63 virtual ble_error_t setTxPower(int8_t txPower);
mridup 65:f9958b8f2548 64 virtual void getPermittedTxPowerValues(const int8_t **, size_t *);
hemddabral 37:07487777d9c6 65 virtual void waitForEvent(void);
mridup 45:1fff7d7d5ce7 66
mridup 45:1fff7d7d5ce7 67 bool getIsInitialized(void);
mridup 45:1fff7d7d5ce7 68
mridup 45:1fff7d7d5ce7 69 private:
mridup 45:1fff7d7d5ce7 70 bool isInitialized;
mridup 2:a2b623661316 71 };
mridup 2:a2b623661316 72
mridup 2:a2b623661316 73 #endif