Nordic stack and drivers for the mbed BLE API

Dependents:   idd_hw5_bleFanProto

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers custom_helper.h Source File

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 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 #include "common/common.h "
00025 #include "ble.h"
00026 #include "UUID.h"
00027 
00028 uint8_t custom_add_uuid_base(uint8_t const *const p_uuid_base);
00029 error_t custom_decode_uuid(uint8_t const *const p_uuid_base,
00030                            ble_uuid_t          *p_uuid);
00031 ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid);
00032 
00033 error_t custom_add_in_characteristic(uint16_t                  service_handle,
00034                                      ble_uuid_t               *p_uuid,
00035                                      uint8_t                   properties,
00036                                      uint8_t                  *p_data,
00037                                      uint16_t                  min_length,
00038                                      uint16_t                  max_length,
00039                                      ble_gatts_char_handles_t *p_char_handle);
00040 
00041 error_t custom_add_in_descriptor(uint16_t                      char_handle,
00042                                      ble_uuid_t               *p_uuid,
00043                                      uint8_t                  *p_data,
00044                                      uint16_t                  min_length,
00045                                      uint16_t                  max_length,
00046                                      uint16_t                 *p_desc_handle);
00047 
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051 
00052 #endif // ifndef _CUSTOM_HELPER_H_