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
custom_helper.h
00001 /* mbed Microcontroller Library 00002 * Copyright (c) 2006-2013 ARM Limited 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _CUSTOM_HELPER_H_ 00018 #define _CUSTOM_HELPER_H_ 00019 00020 #include "common/common.h " 00021 #include "ble.h" 00022 #include "ble/UUID.h" 00023 #include "ble/GattCharacteristic.h" 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 uint8_t custom_add_uuid_base(uint8_t const *const p_uuid_base); 00030 error_t custom_decode_uuid(uint8_t const *const p_uuid_base, 00031 ble_uuid_t *p_uuid); 00032 ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid); 00033 00034 error_t custom_add_in_characteristic(uint16_t service_handle, 00035 ble_uuid_t *p_uuid, 00036 uint8_t properties, 00037 SecurityManager::SecurityMode_t requiredSecurity, 00038 uint8_t *p_data, 00039 uint16_t length, 00040 uint16_t max_length, 00041 bool has_variable_len, 00042 const uint8_t *userDescriptionDescriptorValuePtr, 00043 uint16_t userDescriptionDescriptorValueLen, 00044 bool readAuthorization, 00045 bool writeAuthorization, 00046 ble_gatts_char_handles_t *p_char_handle); 00047 00048 error_t custom_add_in_descriptor(uint16_t char_handle, 00049 ble_uuid_t *p_uuid, 00050 uint8_t *p_data, 00051 uint16_t length, 00052 uint16_t max_length, 00053 bool has_variable_len, 00054 uint16_t *p_desc_handle); 00055 00056 #ifdef __cplusplus 00057 } 00058 #endif 00059 00060 #endif // ifndef _CUSTOM_HELPER_H_
Generated on Tue Jul 12 2022 15:23:08 by 1.7.2