Microbug / BLE_API_FOTA

Fork of BLE_API by Bluetooth Low Energy

Committer:
Rohit Grover
Date:
Wed Jun 11 14:42:08 2014 +0100
Revision:
92:3781dc6f8c18
Parent:
91:311bde45b251
GattService constructor now takes a statically initialized array of pointers to Characteristics

Who changed what in which revision?

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