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:
JonnyA
Date:
Fri Apr 08 16:40:16 2016 +0000
Revision:
622:b84f72a53341
Parent:
616:a8f9b022d8fd
Update to the latest version of nrf51-sdk

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 616:a8f9b022d8fd 39 uint16_t length,
LancasterUniversity 615:65ea2acfc6a2 40 uint16_t max_length,
LancasterUniversity 616:a8f9b022d8fd 41 bool has_variable_len,
LancasterUniversity 615:65ea2acfc6a2 42 const uint8_t *userDescriptionDescriptorValuePtr,
LancasterUniversity 615:65ea2acfc6a2 43 uint16_t userDescriptionDescriptorValueLen,
LancasterUniversity 615:65ea2acfc6a2 44 bool readAuthorization,
LancasterUniversity 615:65ea2acfc6a2 45 bool writeAuthorization,
LancasterUniversity 615:65ea2acfc6a2 46 ble_gatts_char_handles_t *p_char_handle);
LancasterUniversity 615:65ea2acfc6a2 47
LancasterUniversity 615:65ea2acfc6a2 48 error_t custom_add_in_descriptor(uint16_t char_handle,
LancasterUniversity 615:65ea2acfc6a2 49 ble_uuid_t *p_uuid,
LancasterUniversity 615:65ea2acfc6a2 50 uint8_t *p_data,
LancasterUniversity 616:a8f9b022d8fd 51 uint16_t length,
LancasterUniversity 615:65ea2acfc6a2 52 uint16_t max_length,
LancasterUniversity 616:a8f9b022d8fd 53 bool has_variable_len,
LancasterUniversity 615:65ea2acfc6a2 54 uint16_t *p_desc_handle);
LancasterUniversity 615:65ea2acfc6a2 55
LancasterUniversity 615:65ea2acfc6a2 56 #ifdef __cplusplus
LancasterUniversity 615:65ea2acfc6a2 57 }
LancasterUniversity 615:65ea2acfc6a2 58 #endif
LancasterUniversity 615:65ea2acfc6a2 59
rgrover1 82:6c51cbe4bc12 60 #endif // ifndef _CUSTOM_HELPER_H_