High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Committer:
rgrover1
Date:
Fri Nov 28 14:11:25 2014 +0000
Revision:
198:933961a2ac6f
Parent:
146:543877bb1f52
Child:
199:6b57874115f6
Synchronized with git rev 1c37781d
Author: Rohit Grover
Release 0.2.5
=============

Features
~~~~~~~~

* Introduce the URIBeacon2 service.

* Add helper API Gap::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(); this can then be
used in calls to setAdvertisingInterval().

* Remove Stream as a base class for UARTService. Instantiating Stream() was
causing the C library to initialize the serial console UART implicitly;
which caused a constant drain of around 1mA. This change means that we can
no longer benefit from the APIs offered by Stream, and we can no longer re-
target STDOUT to UARTService like before; but that's not worth losing 1mA.

* Remove some un-necessary header files from BLEDevice.h.

Bugfixes
~~~~~~~~

Compatibility
~~~~~~~~~~~~~

This release is backward compatible with 0.2.4.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rohit Grover 106:a20be740075d 1 /* mbed Microcontroller Library
Rohit Grover 106:a20be740075d 2 * Copyright (c) 2006-2013 ARM Limited
Rohit Grover 106:a20be740075d 3 *
Rohit Grover 106:a20be740075d 4 * Licensed under the Apache License, Version 2.0 (the "License");
Rohit Grover 106:a20be740075d 5 * you may not use this file except in compliance with the License.
Rohit Grover 106:a20be740075d 6 * You may obtain a copy of the License at
Rohit Grover 106:a20be740075d 7 *
Rohit Grover 106:a20be740075d 8 * http://www.apache.org/licenses/LICENSE-2.0
Rohit Grover 106:a20be740075d 9 *
Rohit Grover 106:a20be740075d 10 * Unless required by applicable law or agreed to in writing, software
Rohit Grover 106:a20be740075d 11 * distributed under the License is distributed on an "AS IS" BASIS,
Rohit Grover 106:a20be740075d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Rohit Grover 106:a20be740075d 13 * See the License for the specific language governing permissions and
Rohit Grover 106:a20be740075d 14 * limitations under the License.
Rohit Grover 106:a20be740075d 15 */
Rohit Grover 106:a20be740075d 16
Rohit Grover 106:a20be740075d 17 #ifndef __GAP_EVENTS_H__
Rohit Grover 106:a20be740075d 18 #define __GAP_EVENTS_H__
Rohit Grover 106:a20be740075d 19
Rohit Grover 106:a20be740075d 20 #include "blecommon.h"
Rohit Grover 106:a20be740075d 21
Rohit Grover 106:a20be740075d 22 /**************************************************************************/
Rohit Grover 106:a20be740075d 23 /*!
Rohit Grover 106:a20be740075d 24 \brief
Rohit Grover 106:a20be740075d 25 The base class used to abstract away the callback events that can be
Rohit Grover 106:a20be740075d 26 triggered with the GAP.
Rohit Grover 106:a20be740075d 27 */
Rohit Grover 106:a20be740075d 28 /**************************************************************************/
Rohit Grover 106:a20be740075d 29 class GapEvents
Rohit Grover 106:a20be740075d 30 {
Rohit Grover 106:a20be740075d 31 public:
Rohit Grover 106:a20be740075d 32 /******************************************************************/
Rohit Grover 106:a20be740075d 33 /*!
Rohit Grover 106:a20be740075d 34 \brief
Rohit Grover 106:a20be740075d 35 Identifies GAP events generated by the radio HW when an event
Rohit Grover 106:a20be740075d 36 callback occurs
Rohit Grover 106:a20be740075d 37 */
Rohit Grover 106:a20be740075d 38 /******************************************************************/
Rohit Grover 106:a20be740075d 39 typedef enum gapEvent_e {
Rohit Grover 116:ca826083980e 40 GAP_EVENT_TIMEOUT = 1, /**< Advertising timed out before a connection was established */
Rohit Grover 116:ca826083980e 41 GAP_EVENT_CONNECTED = 2, /**< A connection was established with a central device */
Rohit Grover 116:ca826083980e 42 GAP_EVENT_DISCONNECTED = 3 /**< A connection was closed or lost with a central device */
Rohit Grover 106:a20be740075d 43 } gapEvent_t;
Rohit Grover 106:a20be740075d 44 };
Rohit Grover 106:a20be740075d 45
rgrover1 126:fdebe4d5d62f 46 #endif // ifndef __GAP_EVENTS_H__