Nordic stack and drivers for the mbed BLE API

Fork of nRF51822 by Nordic Semiconductor

Committer:
amithy
Date:
Thu Nov 09 22:13:54 2017 +0000
Revision:
639:4794dfdc59c0
Parent:
638:c90ae1400bf2
for testing export

Who changed what in which revision?

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