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
source/btle/custom/custom_helper.h@553:2a413611e569, 2016-01-11 (annotated)
- Committer:
- vcoubard
- Date:
- Mon Jan 11 10:19:11 2016 +0000
- Revision:
- 553:2a413611e569
- Parent:
- 552:20b282c26f96
- Child:
- 615:65ea2acfc6a2
Synchronized with git rev 9620c7a1
Author: Rohit Grover
Release 2.1.2
=============
Minor update around GattCharacteristics having variable length.
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 | 552:20b282c26f96 | 39 | uint16_t length, |
vcoubard | 541:884f95bf5351 | 40 | uint16_t max_length, |
vcoubard | 553:2a413611e569 | 41 | bool has_variable_len, |
vcoubard | 541:884f95bf5351 | 42 | const uint8_t *userDescriptionDescriptorValuePtr, |
vcoubard | 541:884f95bf5351 | 43 | uint16_t userDescriptionDescriptorValueLen, |
vcoubard | 541:884f95bf5351 | 44 | bool readAuthorization, |
vcoubard | 541:884f95bf5351 | 45 | bool writeAuthorization, |
vcoubard | 541:884f95bf5351 | 46 | ble_gatts_char_handles_t *p_char_handle); |
vcoubard | 541:884f95bf5351 | 47 | |
vcoubard | 541:884f95bf5351 | 48 | error_t custom_add_in_descriptor(uint16_t char_handle, |
vcoubard | 541:884f95bf5351 | 49 | ble_uuid_t *p_uuid, |
vcoubard | 541:884f95bf5351 | 50 | uint8_t *p_data, |
vcoubard | 552:20b282c26f96 | 51 | uint16_t length, |
vcoubard | 541:884f95bf5351 | 52 | uint16_t max_length, |
vcoubard | 553:2a413611e569 | 53 | bool has_variable_len, |
vcoubard | 541:884f95bf5351 | 54 | uint16_t *p_desc_handle); |
vcoubard | 541:884f95bf5351 | 55 | |
vcoubard | 541:884f95bf5351 | 56 | #ifdef __cplusplus |
vcoubard | 541:884f95bf5351 | 57 | } |
vcoubard | 541:884f95bf5351 | 58 | #endif |
vcoubard | 541:884f95bf5351 | 59 | |
rgrover1 | 82:6c51cbe4bc12 | 60 | #endif // ifndef _CUSTOM_HELPER_H_ |