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