High level Bluetooth Low Energy API and radio abstraction layer

Dependents:   BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate BLE_ANCS_SDAPI_IRC ... more

Overview

The BLE_API is a high level abstraction for using Bluetooth Low Energy on multiple platforms. For details and examples using the BLE_API please see the BLE_API Summary Page. Or click on the API Documentation tab above.

Supported Services

Supported services can be found in the BLE_API/services folder.

Committer:
rgrover1
Date:
Wed Jan 21 09:32:49 2015 +0000
Revision:
260:ea7f9f14cc15
Parent:
106:a20be740075d
Synchronized with git rev bec9560c
Author: Rohit Grover
fix all line endings to be Unix style

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 260:ea7f9f14cc15 1 /* mbed Microcontroller Library
rgrover1 260:ea7f9f14cc15 2 * Copyright (c) 2006-2013 ARM Limited
rgrover1 260:ea7f9f14cc15 3 *
rgrover1 260:ea7f9f14cc15 4 * Licensed under the Apache License, Version 2.0 (the "License");
rgrover1 260:ea7f9f14cc15 5 * you may not use this file except in compliance with the License.
rgrover1 260:ea7f9f14cc15 6 * You may obtain a copy of the License at
rgrover1 260:ea7f9f14cc15 7 *
rgrover1 260:ea7f9f14cc15 8 * http://www.apache.org/licenses/LICENSE-2.0
rgrover1 260:ea7f9f14cc15 9 *
rgrover1 260:ea7f9f14cc15 10 * Unless required by applicable law or agreed to in writing, software
rgrover1 260:ea7f9f14cc15 11 * distributed under the License is distributed on an "AS IS" BASIS,
rgrover1 260:ea7f9f14cc15 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rgrover1 260:ea7f9f14cc15 13 * See the License for the specific language governing permissions and
rgrover1 260:ea7f9f14cc15 14 * limitations under the License.
rgrover1 260:ea7f9f14cc15 15 */
rgrover1 260:ea7f9f14cc15 16
rgrover1 260:ea7f9f14cc15 17
rgrover1 260:ea7f9f14cc15 18 #include <stdio.h>
rgrover1 260:ea7f9f14cc15 19 #include <string.h>
rgrover1 260:ea7f9f14cc15 20
rgrover1 260:ea7f9f14cc15 21 #include "GattService.h"
rgrover1 260:ea7f9f14cc15 22
rgrover1 260:ea7f9f14cc15 23 /**************************************************************************/
rgrover1 260:ea7f9f14cc15 24 /*!
rgrover1 260:ea7f9f14cc15 25 @brief Creates a new GattService using the specified 128-bit UUID
rgrover1 260:ea7f9f14cc15 26
rgrover1 260:ea7f9f14cc15 27 @note The UUID value must be unique on the device
rgrover1 260:ea7f9f14cc15 28
rgrover1 260:ea7f9f14cc15 29 @param[in] uuid
rgrover1 260:ea7f9f14cc15 30 The 16 byte (128-bit) UUID to use for this characteristic
rgrover1 260:ea7f9f14cc15 31
rgrover1 260:ea7f9f14cc15 32 @section EXAMPLE
rgrover1 260:ea7f9f14cc15 33
rgrover1 260:ea7f9f14cc15 34 @code
rgrover1 260:ea7f9f14cc15 35
rgrover1 260:ea7f9f14cc15 36 @endcode
rgrover1 260:ea7f9f14cc15 37 */
rgrover1 260:ea7f9f14cc15 38 /**************************************************************************/
rgrover1 260:ea7f9f14cc15 39 GattService::GattService(const UUID &uuid, GattCharacteristic *characteristics[], unsigned numCharacteristics) :
rgrover1 260:ea7f9f14cc15 40 _primaryServiceID(uuid), _characteristicCount(numCharacteristics), _characteristics(characteristics), _handle(0)
rgrover1 260:ea7f9f14cc15 41 {
rgrover1 260:ea7f9f14cc15 42 /* empty */
rgrover1 260:ea7f9f14cc15 43 }