library for BLE_GAP_backpack

Dependencies:   nrf51-sdk

Fork of nRF51822 by Nordic Semiconductor

Committer:
Siemen
Date:
Wed Nov 02 14:11:43 2016 +0000
Revision:
638:6307ad2949a7
Parent:
631:e613866d34ba
bug fixed advertisement interval indication

Who changed what in which revision?

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