Clone of the nRF51822 repository from github The correct home is https://github.com/lancaster-university/nRF51822

Dependencies:   nrf51-sdk

Dependents:   microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more

Committer:
LancasterUniversity
Date:
Wed Apr 06 22:38:43 2016 +0100
Revision:
615:65ea2acfc6a2
Parent:
553:2a413611e569
Child:
616:a8f9b022d8fd
Synchronized with git rev 60a7c0c0
Author: Rohit Grover
bring in the latest changes for BLE::init() where we allow <object, member> tuples for init callback.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
LancasterUniversity 615:65ea2acfc6a2 1 /* mbed Microcontroller Library
LancasterUniversity 615:65ea2acfc6a2 2 * Copyright (c) 2006-2013 ARM Limited
LancasterUniversity 615:65ea2acfc6a2 3 *
LancasterUniversity 615:65ea2acfc6a2 4 * Licensed under the Apache License, Version 2.0 (the "License");
LancasterUniversity 615:65ea2acfc6a2 5 * you may not use this file except in compliance with the License.
LancasterUniversity 615:65ea2acfc6a2 6 * You may obtain a copy of the License at
LancasterUniversity 615:65ea2acfc6a2 7 *
LancasterUniversity 615:65ea2acfc6a2 8 * http://www.apache.org/licenses/LICENSE-2.0
LancasterUniversity 615:65ea2acfc6a2 9 *
LancasterUniversity 615:65ea2acfc6a2 10 * Unless required by applicable law or agreed to in writing, software
LancasterUniversity 615:65ea2acfc6a2 11 * distributed under the License is distributed on an "AS IS" BASIS,
LancasterUniversity 615:65ea2acfc6a2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
LancasterUniversity 615:65ea2acfc6a2 13 * See the License for the specific language governing permissions and
LancasterUniversity 615:65ea2acfc6a2 14 * limitations under the License.
LancasterUniversity 615:65ea2acfc6a2 15 */
LancasterUniversity 615:65ea2acfc6a2 16
LancasterUniversity 615:65ea2acfc6a2 17 #ifndef _CUSTOM_HELPER_H_
LancasterUniversity 615:65ea2acfc6a2 18 #define _CUSTOM_HELPER_H_
LancasterUniversity 615:65ea2acfc6a2 19
LancasterUniversity 615:65ea2acfc6a2 20 #include "common/common.h"
LancasterUniversity 615:65ea2acfc6a2 21 #include "ble.h"
LancasterUniversity 615:65ea2acfc6a2 22 #include "ble/UUID.h"
LancasterUniversity 615:65ea2acfc6a2 23 #include "ble/GattCharacteristic.h"
LancasterUniversity 615:65ea2acfc6a2 24
LancasterUniversity 615:65ea2acfc6a2 25 #ifdef __cplusplus
LancasterUniversity 615:65ea2acfc6a2 26 extern "C" {
LancasterUniversity 615:65ea2acfc6a2 27 #endif
LancasterUniversity 615:65ea2acfc6a2 28
LancasterUniversity 615:65ea2acfc6a2 29 uint8_t custom_add_uuid_base(uint8_t const *const p_uuid_base);
LancasterUniversity 615:65ea2acfc6a2 30 error_t custom_decode_uuid(uint8_t const *const p_uuid_base,
LancasterUniversity 615:65ea2acfc6a2 31 ble_uuid_t *p_uuid);
LancasterUniversity 615:65ea2acfc6a2 32 ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid);
LancasterUniversity 615:65ea2acfc6a2 33
LancasterUniversity 615:65ea2acfc6a2 34 error_t custom_add_in_characteristic(uint16_t service_handle,
LancasterUniversity 615:65ea2acfc6a2 35 ble_uuid_t *p_uuid,
LancasterUniversity 615:65ea2acfc6a2 36 uint8_t properties,
LancasterUniversity 615:65ea2acfc6a2 37 SecurityManager::SecurityMode_t requiredSecurity,
LancasterUniversity 615:65ea2acfc6a2 38 uint8_t *p_data,
LancasterUniversity 615:65ea2acfc6a2 39 uint16_t min_length,
LancasterUniversity 615:65ea2acfc6a2 40 uint16_t max_length,
LancasterUniversity 615:65ea2acfc6a2 41 const uint8_t *userDescriptionDescriptorValuePtr,
LancasterUniversity 615:65ea2acfc6a2 42 uint16_t userDescriptionDescriptorValueLen,
LancasterUniversity 615:65ea2acfc6a2 43 bool readAuthorization,
LancasterUniversity 615:65ea2acfc6a2 44 bool writeAuthorization,
LancasterUniversity 615:65ea2acfc6a2 45 ble_gatts_char_handles_t *p_char_handle);
LancasterUniversity 615:65ea2acfc6a2 46
LancasterUniversity 615:65ea2acfc6a2 47 error_t custom_add_in_descriptor(uint16_t char_handle,
LancasterUniversity 615:65ea2acfc6a2 48 ble_uuid_t *p_uuid,
LancasterUniversity 615:65ea2acfc6a2 49 uint8_t *p_data,
LancasterUniversity 615:65ea2acfc6a2 50 uint16_t min_length,
LancasterUniversity 615:65ea2acfc6a2 51 uint16_t max_length,
LancasterUniversity 615:65ea2acfc6a2 52 uint16_t *p_desc_handle);
LancasterUniversity 615:65ea2acfc6a2 53
LancasterUniversity 615:65ea2acfc6a2 54 #ifdef __cplusplus
LancasterUniversity 615:65ea2acfc6a2 55 }
LancasterUniversity 615:65ea2acfc6a2 56 #endif
LancasterUniversity 615:65ea2acfc6a2 57
rgrover1 82:6c51cbe4bc12 58 #endif // ifndef _CUSTOM_HELPER_H_