The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_TY51822R3/TOOLCHAIN_ARM_STD/ble_srv_common.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Parent:
- TARGET_VBLUNO51/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/ble/common/ble_srv_common.h@169:a7c7b631e539
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 143:86740a56073b | 1 | /* |
AnnaBridge | 143:86740a56073b | 2 | * Copyright (c) 2012 Nordic Semiconductor ASA |
AnnaBridge | 143:86740a56073b | 3 | * All rights reserved. |
AnnaBridge | 143:86740a56073b | 4 | * |
AnnaBridge | 143:86740a56073b | 5 | * Redistribution and use in source and binary forms, with or without modification, |
AnnaBridge | 143:86740a56073b | 6 | * are permitted provided that the following conditions are met: |
AnnaBridge | 143:86740a56073b | 7 | * |
AnnaBridge | 143:86740a56073b | 8 | * 1. Redistributions of source code must retain the above copyright notice, this list |
AnnaBridge | 143:86740a56073b | 9 | * of conditions and the following disclaimer. |
AnnaBridge | 143:86740a56073b | 10 | * |
AnnaBridge | 143:86740a56073b | 11 | * 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA |
AnnaBridge | 143:86740a56073b | 12 | * integrated circuit in a product or a software update for such product, must reproduce |
AnnaBridge | 143:86740a56073b | 13 | * the above copyright notice, this list of conditions and the following disclaimer in |
AnnaBridge | 143:86740a56073b | 14 | * the documentation and/or other materials provided with the distribution. |
AnnaBridge | 143:86740a56073b | 15 | * |
AnnaBridge | 143:86740a56073b | 16 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be |
AnnaBridge | 143:86740a56073b | 17 | * used to endorse or promote products derived from this software without specific prior |
AnnaBridge | 143:86740a56073b | 18 | * written permission. |
AnnaBridge | 143:86740a56073b | 19 | * |
AnnaBridge | 143:86740a56073b | 20 | * 4. This software, with or without modification, must only be used with a |
AnnaBridge | 143:86740a56073b | 21 | * Nordic Semiconductor ASA integrated circuit. |
AnnaBridge | 143:86740a56073b | 22 | * |
AnnaBridge | 143:86740a56073b | 23 | * 5. Any software provided in binary or object form under this license must not be reverse |
AnnaBridge | 143:86740a56073b | 24 | * engineered, decompiled, modified and/or disassembled. |
AnnaBridge | 143:86740a56073b | 25 | * |
AnnaBridge | 143:86740a56073b | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
AnnaBridge | 143:86740a56073b | 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
AnnaBridge | 143:86740a56073b | 28 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 143:86740a56073b | 29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
AnnaBridge | 143:86740a56073b | 30 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
AnnaBridge | 143:86740a56073b | 31 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
AnnaBridge | 143:86740a56073b | 32 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
AnnaBridge | 143:86740a56073b | 33 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
AnnaBridge | 143:86740a56073b | 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
AnnaBridge | 143:86740a56073b | 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 143:86740a56073b | 36 | * |
AnnaBridge | 143:86740a56073b | 37 | */ |
AnnaBridge | 143:86740a56073b | 38 | |
AnnaBridge | 143:86740a56073b | 39 | |
AnnaBridge | 143:86740a56073b | 40 | /** @file |
AnnaBridge | 143:86740a56073b | 41 | * |
AnnaBridge | 143:86740a56073b | 42 | * @defgroup ble_sdk_srv_common Common service definitions |
AnnaBridge | 143:86740a56073b | 43 | * @{ |
AnnaBridge | 143:86740a56073b | 44 | * @ingroup ble_sdk_srv |
AnnaBridge | 143:86740a56073b | 45 | * @brief Constants, type definitions, and functions that are common to all services. |
AnnaBridge | 143:86740a56073b | 46 | */ |
AnnaBridge | 143:86740a56073b | 47 | |
AnnaBridge | 143:86740a56073b | 48 | #ifndef BLE_SRV_COMMON_H__ |
AnnaBridge | 143:86740a56073b | 49 | #define BLE_SRV_COMMON_H__ |
AnnaBridge | 143:86740a56073b | 50 | |
AnnaBridge | 143:86740a56073b | 51 | #include <stdint.h> |
AnnaBridge | 143:86740a56073b | 52 | #include <stdbool.h> |
AnnaBridge | 143:86740a56073b | 53 | #include "nrf_ble_types.h" |
AnnaBridge | 143:86740a56073b | 54 | #include "app_util.h" |
AnnaBridge | 143:86740a56073b | 55 | #include "nrf_ble.h" |
AnnaBridge | 143:86740a56073b | 56 | #include "nrf_ble_gap.h" |
AnnaBridge | 143:86740a56073b | 57 | #include "nrf_ble_gatt.h" |
AnnaBridge | 143:86740a56073b | 58 | |
AnnaBridge | 143:86740a56073b | 59 | /** @defgroup UUID_SERVICES Service UUID definitions |
AnnaBridge | 143:86740a56073b | 60 | * @{ */ |
AnnaBridge | 143:86740a56073b | 61 | #define BLE_UUID_ALERT_NOTIFICATION_SERVICE 0x1811 /**< Alert Notification service UUID. */ |
AnnaBridge | 143:86740a56073b | 62 | #define BLE_UUID_BATTERY_SERVICE 0x180F /**< Battery service UUID. */ |
AnnaBridge | 143:86740a56073b | 63 | #define BLE_UUID_BLOOD_PRESSURE_SERVICE 0x1810 /**< Blood Pressure service UUID. */ |
AnnaBridge | 143:86740a56073b | 64 | #define BLE_UUID_CURRENT_TIME_SERVICE 0x1805 /**< Current Time service UUID. */ |
AnnaBridge | 143:86740a56073b | 65 | #define BLE_UUID_CYCLING_SPEED_AND_CADENCE 0x1816 /**< Cycling Speed and Cadence service UUID. */ |
AnnaBridge | 143:86740a56073b | 66 | #define BLE_UUID_LOCATION_AND_NAVIGATION_SERVICE 0x1819 /**< Location and Navigation service UUID. */ |
AnnaBridge | 143:86740a56073b | 67 | #define BLE_UUID_DEVICE_INFORMATION_SERVICE 0x180A /**< Device Information service UUID. */ |
AnnaBridge | 143:86740a56073b | 68 | #define BLE_UUID_GLUCOSE_SERVICE 0x1808 /**< Glucose service UUID. */ |
AnnaBridge | 143:86740a56073b | 69 | #define BLE_UUID_HEALTH_THERMOMETER_SERVICE 0x1809 /**< Health Thermometer service UUID. */ |
AnnaBridge | 143:86740a56073b | 70 | #define BLE_UUID_HEART_RATE_SERVICE 0x180D /**< Heart Rate service UUID. */ |
AnnaBridge | 143:86740a56073b | 71 | #define BLE_UUID_HUMAN_INTERFACE_DEVICE_SERVICE 0x1812 /**< Human Interface Device service UUID. */ |
AnnaBridge | 143:86740a56073b | 72 | #define BLE_UUID_IMMEDIATE_ALERT_SERVICE 0x1802 /**< Immediate Alert service UUID. */ |
AnnaBridge | 143:86740a56073b | 73 | #define BLE_UUID_LINK_LOSS_SERVICE 0x1803 /**< Link Loss service UUID. */ |
AnnaBridge | 143:86740a56073b | 74 | #define BLE_UUID_NEXT_DST_CHANGE_SERVICE 0x1807 /**< Next Dst Change service UUID. */ |
AnnaBridge | 143:86740a56073b | 75 | #define BLE_UUID_PHONE_ALERT_STATUS_SERVICE 0x180E /**< Phone Alert Status service UUID. */ |
AnnaBridge | 143:86740a56073b | 76 | #define BLE_UUID_REFERENCE_TIME_UPDATE_SERVICE 0x1806 /**< Reference Time Update service UUID. */ |
AnnaBridge | 143:86740a56073b | 77 | #define BLE_UUID_RUNNING_SPEED_AND_CADENCE 0x1814 /**< Running Speed and Cadence service UUID. */ |
AnnaBridge | 143:86740a56073b | 78 | #define BLE_UUID_SCAN_PARAMETERS_SERVICE 0x1813 /**< Scan Parameters service UUID. */ |
AnnaBridge | 143:86740a56073b | 79 | #define BLE_UUID_TX_POWER_SERVICE 0x1804 /**< TX Power service UUID. */ |
AnnaBridge | 143:86740a56073b | 80 | #define BLE_UUID_IPSP_SERVICE 0x1820 /**< Internet Protocol Support service UUID. */ |
AnnaBridge | 143:86740a56073b | 81 | #define BLE_UUID_BMS_SERVICE 0x181E /**< BOND MANAGEMENT service UUID*/ |
AnnaBridge | 143:86740a56073b | 82 | #define BLE_UUID_CGM_SERVICE 0x181F /**< Contiunous Glucose Monitoring service UUID*/ |
AnnaBridge | 143:86740a56073b | 83 | #define BLE_UUID_PLX_SERVICE 0x1822 /**< Pulse Oximeter Service UUID*/ |
AnnaBridge | 143:86740a56073b | 84 | |
AnnaBridge | 143:86740a56073b | 85 | |
AnnaBridge | 143:86740a56073b | 86 | /** @} */ |
AnnaBridge | 143:86740a56073b | 87 | |
AnnaBridge | 143:86740a56073b | 88 | /** @defgroup UUID_CHARACTERISTICS Characteristic UUID definitions |
AnnaBridge | 143:86740a56073b | 89 | * @{ */ |
AnnaBridge | 143:86740a56073b | 90 | #define BLE_UUID_REMOVABLE_CHAR 0x2A3A /**< Removable characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 91 | #define BLE_UUID_SERVICE_REQUIRED_CHAR 0x2A3B /**< Service Required characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 92 | #define BLE_UUID_ALERT_CATEGORY_ID_CHAR 0x2A43 /**< Alert Category Id characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 93 | #define BLE_UUID_ALERT_CATEGORY_ID_BIT_MASK_CHAR 0x2A42 /**< Alert Category Id Bit Mask characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 94 | #define BLE_UUID_ALERT_LEVEL_CHAR 0x2A06 /**< Alert Level characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 95 | #define BLE_UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR 0x2A44 /**< Alert Notification Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 96 | #define BLE_UUID_ALERT_STATUS_CHAR 0x2A3F /**< Alert Status characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 97 | #define BLE_UUID_BATTERY_LEVEL_CHAR 0x2A19 /**< Battery Level characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 98 | #define BLE_UUID_BLOOD_PRESSURE_FEATURE_CHAR 0x2A49 /**< Blood Pressure Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 99 | #define BLE_UUID_BLOOD_PRESSURE_MEASUREMENT_CHAR 0x2A35 /**< Blood Pressure Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 100 | #define BLE_UUID_BODY_SENSOR_LOCATION_CHAR 0x2A38 /**< Body Sensor Location characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 101 | #define BLE_UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR 0x2A22 /**< Boot Keyboard Input Report characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 102 | #define BLE_UUID_BOOT_KEYBOARD_OUTPUT_REPORT_CHAR 0x2A32 /**< Boot Keyboard Output Report characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 103 | #define BLE_UUID_BOOT_MOUSE_INPUT_REPORT_CHAR 0x2A33 /**< Boot Mouse Input Report characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 104 | #define BLE_UUID_CURRENT_TIME_CHAR 0x2A2B /**< Current Time characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 105 | #define BLE_UUID_DATE_TIME_CHAR 0x2A08 /**< Date Time characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 106 | #define BLE_UUID_DAY_DATE_TIME_CHAR 0x2A0A /**< Day Date Time characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 107 | #define BLE_UUID_DAY_OF_WEEK_CHAR 0x2A09 /**< Day Of Week characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 108 | #define BLE_UUID_DST_OFFSET_CHAR 0x2A0D /**< Dst Offset characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 109 | #define BLE_UUID_EXACT_TIME_256_CHAR 0x2A0C /**< Exact Time 256 characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 110 | #define BLE_UUID_FIRMWARE_REVISION_STRING_CHAR 0x2A26 /**< Firmware Revision String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 111 | #define BLE_UUID_GLUCOSE_FEATURE_CHAR 0x2A51 /**< Glucose Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 112 | #define BLE_UUID_GLUCOSE_MEASUREMENT_CHAR 0x2A18 /**< Glucose Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 113 | #define BLE_UUID_GLUCOSE_MEASUREMENT_CONTEXT_CHAR 0x2A34 /**< Glucose Measurement Context characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 114 | #define BLE_UUID_HARDWARE_REVISION_STRING_CHAR 0x2A27 /**< Hardware Revision String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 115 | #define BLE_UUID_HEART_RATE_CONTROL_POINT_CHAR 0x2A39 /**< Heart Rate Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 116 | #define BLE_UUID_HEART_RATE_MEASUREMENT_CHAR 0x2A37 /**< Heart Rate Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 117 | #define BLE_UUID_HID_CONTROL_POINT_CHAR 0x2A4C /**< Hid Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 118 | #define BLE_UUID_HID_INFORMATION_CHAR 0x2A4A /**< Hid Information characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 119 | #define BLE_UUID_IEEE_REGULATORY_CERTIFICATION_DATA_LIST_CHAR 0x2A2A /**< IEEE Regulatory Certification Data List characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 120 | #define BLE_UUID_INTERMEDIATE_CUFF_PRESSURE_CHAR 0x2A36 /**< Intermediate Cuff Pressure characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 121 | #define BLE_UUID_INTERMEDIATE_TEMPERATURE_CHAR 0x2A1E /**< Intermediate Temperature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 122 | #define BLE_UUID_LOCAL_TIME_INFORMATION_CHAR 0x2A0F /**< Local Time Information characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 123 | #define BLE_UUID_MANUFACTURER_NAME_STRING_CHAR 0x2A29 /**< Manufacturer Name String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 124 | #define BLE_UUID_MEASUREMENT_INTERVAL_CHAR 0x2A21 /**< Measurement Interval characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 125 | #define BLE_UUID_MODEL_NUMBER_STRING_CHAR 0x2A24 /**< Model Number String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 126 | #define BLE_UUID_UNREAD_ALERT_CHAR 0x2A45 /**< Unread Alert characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 127 | #define BLE_UUID_NEW_ALERT_CHAR 0x2A46 /**< New Alert characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 128 | #define BLE_UUID_PNP_ID_CHAR 0x2A50 /**< PNP Id characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 129 | #define BLE_UUID_PROTOCOL_MODE_CHAR 0x2A4E /**< Protocol Mode characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 130 | #define BLE_UUID_RECORD_ACCESS_CONTROL_POINT_CHAR 0x2A52 /**< Record Access Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 131 | #define BLE_UUID_REFERENCE_TIME_INFORMATION_CHAR 0x2A14 /**< Reference Time Information characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 132 | #define BLE_UUID_REPORT_CHAR 0x2A4D /**< Report characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 133 | #define BLE_UUID_REPORT_MAP_CHAR 0x2A4B /**< Report Map characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 134 | #define BLE_UUID_RINGER_CONTROL_POINT_CHAR 0x2A40 /**< Ringer Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 135 | #define BLE_UUID_RINGER_SETTING_CHAR 0x2A41 /**< Ringer Setting characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 136 | #define BLE_UUID_SCAN_INTERVAL_WINDOW_CHAR 0x2A4F /**< Scan Interval Window characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 137 | #define BLE_UUID_SCAN_REFRESH_CHAR 0x2A31 /**< Scan Refresh characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 138 | #define BLE_UUID_SERIAL_NUMBER_STRING_CHAR 0x2A25 /**< Serial Number String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 139 | #define BLE_UUID_SOFTWARE_REVISION_STRING_CHAR 0x2A28 /**< Software Revision String characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 140 | #define BLE_UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR 0x2A47 /**< Supported New Alert Category characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 141 | #define BLE_UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR 0x2A48 /**< Supported Unread Alert Category characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 142 | #define BLE_UUID_SYSTEM_ID_CHAR 0x2A23 /**< System Id characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 143 | #define BLE_UUID_TEMPERATURE_MEASUREMENT_CHAR 0x2A1C /**< Temperature Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 144 | #define BLE_UUID_TEMPERATURE_TYPE_CHAR 0x2A1D /**< Temperature Type characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 145 | #define BLE_UUID_TIME_ACCURACY_CHAR 0x2A12 /**< Time Accuracy characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 146 | #define BLE_UUID_TIME_SOURCE_CHAR 0x2A13 /**< Time Source characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 147 | #define BLE_UUID_TIME_UPDATE_CONTROL_POINT_CHAR 0x2A16 /**< Time Update Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 148 | #define BLE_UUID_TIME_UPDATE_STATE_CHAR 0x2A17 /**< Time Update State characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 149 | #define BLE_UUID_TIME_WITH_DST_CHAR 0x2A11 /**< Time With Dst characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 150 | #define BLE_UUID_TIME_ZONE_CHAR 0x2A0E /**< Time Zone characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 151 | #define BLE_UUID_TX_POWER_LEVEL_CHAR 0x2A07 /**< TX Power Level characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 152 | #define BLE_UUID_CSC_FEATURE_CHAR 0x2A5C /**< Cycling Speed and Cadence Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 153 | #define BLE_UUID_CSC_MEASUREMENT_CHAR 0x2A5B /**< Cycling Speed and Cadence Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 154 | #define BLE_UUID_RSC_FEATURE_CHAR 0x2A54 /**< Running Speed and Cadence Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 155 | #define BLE_UUID_SC_CTRLPT_CHAR 0x2A55 /**< Speed and Cadence Control Point UUID. */ |
AnnaBridge | 143:86740a56073b | 156 | #define BLE_UUID_RSC_MEASUREMENT_CHAR 0x2A53 /**< Running Speed and Cadence Measurement characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 157 | #define BLE_UUID_SENSOR_LOCATION_CHAR 0x2A5D /**< Sensor Location characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 158 | #define BLE_UUID_EXTERNAL_REPORT_REF_DESCR 0x2907 /**< External Report Reference descriptor UUID. */ |
AnnaBridge | 143:86740a56073b | 159 | #define BLE_UUID_REPORT_REF_DESCR 0x2908 /**< Report Reference descriptor UUID. */ |
AnnaBridge | 143:86740a56073b | 160 | #define BLE_UUID_LN_FEATURE_CHAR 0x2A6A /**< Location Navigation Service, Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 161 | #define BLE_UUID_LN_POSITION_QUALITY_CHAR 0x2A69 /**< Location Navigation Service, Position quality UUID. */ |
AnnaBridge | 143:86740a56073b | 162 | #define BLE_UUID_LN_LOCATION_AND_SPEED_CHAR 0x2A67 /**< Location Navigation Service, Location and Speed characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 163 | #define BLE_UUID_LN_NAVIGATION_CHAR 0x2A68 /**< Location Navigation Service, Navigation characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 164 | #define BLE_UUID_LN_CONTROL_POINT_CHAR 0x2A6B /**< Location Navigation Service, Control point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 165 | #define BLE_UUID_BMS_CTRLPT 0x2AA4 /**< BMS Control Point characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 166 | #define BLE_UUID_BMS_FEATURE 0x2AA5 /**< BMS Feature characteristic UUID. */ |
AnnaBridge | 143:86740a56073b | 167 | #define BLE_UUID_CGM_MEASUREMENT 0x2AA7 /**< CGM Service, Measurement characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 168 | #define BLE_UUID_CGM_FEATURE 0x2AA8 /**< CGM Service, Feature characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 169 | #define BLE_UUID_CGM_STATUS 0x2AA9 /**< CGM Service, Status characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 170 | #define BLE_UUID_CGM_SESSION_START_TIME 0x2AAA /**< CGM Service, session start time characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 171 | #define BLE_UUID_CGM_SESSION_RUN_TIME 0x2AAB /**< CGM Service, session run time characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 172 | #define BLE_UUID_CGM_SPECIFIC_OPS_CTRLPT 0x2AAC /**< CGM Service, specific ops ctrlpt characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 173 | #define BLE_UUID_PLX_SPOT_CHECK_MEAS 0x2A5E /**< PLX Service, spot check measurement characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 174 | #define BLE_UUID_PLX_CONTINUOUS_MEAS 0x2A5F /**< PLX Service, continuous measurement characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 175 | #define BLE_UUID_PLX_FEATURES 0x2A60 /**< PLX Service, feature characteristic UUID*/ |
AnnaBridge | 143:86740a56073b | 176 | |
AnnaBridge | 143:86740a56073b | 177 | |
AnnaBridge | 143:86740a56073b | 178 | |
AnnaBridge | 143:86740a56073b | 179 | |
AnnaBridge | 143:86740a56073b | 180 | |
AnnaBridge | 143:86740a56073b | 181 | /** @} */ |
AnnaBridge | 143:86740a56073b | 182 | |
AnnaBridge | 143:86740a56073b | 183 | /** @defgroup ALERT_LEVEL_VALUES Definitions for the Alert Level characteristic values |
AnnaBridge | 143:86740a56073b | 184 | * @{ */ |
AnnaBridge | 143:86740a56073b | 185 | #define BLE_CHAR_ALERT_LEVEL_NO_ALERT 0x00 /**< No Alert. */ |
AnnaBridge | 143:86740a56073b | 186 | #define BLE_CHAR_ALERT_LEVEL_MILD_ALERT 0x01 /**< Mild Alert. */ |
AnnaBridge | 143:86740a56073b | 187 | #define BLE_CHAR_ALERT_LEVEL_HIGH_ALERT 0x02 /**< High Alert. */ |
AnnaBridge | 143:86740a56073b | 188 | /** @} */ |
AnnaBridge | 143:86740a56073b | 189 | |
AnnaBridge | 143:86740a56073b | 190 | #define BLE_SRV_ENCODED_REPORT_REF_LEN 2 /**< The length of an encoded Report Reference Descriptor. */ |
AnnaBridge | 143:86740a56073b | 191 | #define BLE_CCCD_VALUE_LEN 2 /**< The length of a CCCD value. */ |
AnnaBridge | 143:86740a56073b | 192 | |
AnnaBridge | 143:86740a56073b | 193 | /**@brief Type definition for error handler function that will be called in case of an error in |
AnnaBridge | 143:86740a56073b | 194 | * a service or a service library module. */ |
AnnaBridge | 143:86740a56073b | 195 | typedef void (*ble_srv_error_handler_t) (uint32_t nrf_error); |
AnnaBridge | 143:86740a56073b | 196 | |
AnnaBridge | 143:86740a56073b | 197 | |
AnnaBridge | 143:86740a56073b | 198 | |
AnnaBridge | 143:86740a56073b | 199 | /**@brief Value of a Report Reference descriptor. |
AnnaBridge | 143:86740a56073b | 200 | * |
AnnaBridge | 143:86740a56073b | 201 | * @details This is mapping information that maps the parent characteristic to the Report ID(s) and |
AnnaBridge | 143:86740a56073b | 202 | * Report Type(s) defined within a Report Map characteristic. |
AnnaBridge | 143:86740a56073b | 203 | */ |
AnnaBridge | 143:86740a56073b | 204 | typedef struct |
AnnaBridge | 143:86740a56073b | 205 | { |
AnnaBridge | 143:86740a56073b | 206 | uint8_t report_id; /**< Non-zero value if there is more than one instance of the same Report Type */ |
AnnaBridge | 143:86740a56073b | 207 | uint8_t report_type; /**< Type of Report characteristic (see @ref BLE_HIDS_REPORT_TYPE) */ |
AnnaBridge | 143:86740a56073b | 208 | } ble_srv_report_ref_t; |
AnnaBridge | 143:86740a56073b | 209 | |
AnnaBridge | 143:86740a56073b | 210 | /**@brief UTF-8 string data type. |
AnnaBridge | 143:86740a56073b | 211 | * |
AnnaBridge | 143:86740a56073b | 212 | * @note The type can only hold a pointer to the string data (i.e. not the actual data). |
AnnaBridge | 143:86740a56073b | 213 | */ |
AnnaBridge | 143:86740a56073b | 214 | typedef struct |
AnnaBridge | 143:86740a56073b | 215 | { |
AnnaBridge | 143:86740a56073b | 216 | uint16_t length; /**< String length. */ |
AnnaBridge | 143:86740a56073b | 217 | uint8_t * p_str; /**< String data. */ |
AnnaBridge | 143:86740a56073b | 218 | } ble_srv_utf8_str_t; |
AnnaBridge | 143:86740a56073b | 219 | |
AnnaBridge | 143:86740a56073b | 220 | |
AnnaBridge | 143:86740a56073b | 221 | /**@brief Security settings structure. |
AnnaBridge | 143:86740a56073b | 222 | * @details This structure contains the security options needed during initialization of the |
AnnaBridge | 143:86740a56073b | 223 | * service. |
AnnaBridge | 143:86740a56073b | 224 | */ |
AnnaBridge | 143:86740a56073b | 225 | typedef struct |
AnnaBridge | 143:86740a56073b | 226 | { |
AnnaBridge | 143:86740a56073b | 227 | ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ |
AnnaBridge | 143:86740a56073b | 228 | ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ |
AnnaBridge | 143:86740a56073b | 229 | } ble_srv_security_mode_t; |
AnnaBridge | 143:86740a56073b | 230 | |
AnnaBridge | 143:86740a56073b | 231 | /**@brief Security settings structure. |
AnnaBridge | 143:86740a56073b | 232 | * @details This structure contains the security options needed during initialization of the |
AnnaBridge | 143:86740a56073b | 233 | * service. It can be used when the characteristics contains a CCCD. |
AnnaBridge | 143:86740a56073b | 234 | */ |
AnnaBridge | 143:86740a56073b | 235 | typedef struct |
AnnaBridge | 143:86740a56073b | 236 | { |
AnnaBridge | 143:86740a56073b | 237 | ble_gap_conn_sec_mode_t cccd_write_perm; /**< Write permissions for Client Characteristic Configuration Descriptor. */ |
AnnaBridge | 143:86740a56073b | 238 | ble_gap_conn_sec_mode_t read_perm; /**< Read permissions. */ |
AnnaBridge | 143:86740a56073b | 239 | ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */ |
AnnaBridge | 143:86740a56073b | 240 | } ble_srv_cccd_security_mode_t; |
AnnaBridge | 143:86740a56073b | 241 | |
AnnaBridge | 143:86740a56073b | 242 | /**@brief Function for decoding a CCCD value, and then testing if notification is |
AnnaBridge | 143:86740a56073b | 243 | * enabled. |
AnnaBridge | 143:86740a56073b | 244 | * |
AnnaBridge | 143:86740a56073b | 245 | * @param[in] p_encoded_data Buffer where the encoded CCCD is stored. |
AnnaBridge | 143:86740a56073b | 246 | * |
AnnaBridge | 143:86740a56073b | 247 | * @retval TRUE If notification is enabled. |
AnnaBridge | 143:86740a56073b | 248 | * @retval FALSE Otherwise. |
AnnaBridge | 143:86740a56073b | 249 | */ |
AnnaBridge | 143:86740a56073b | 250 | static __INLINE bool ble_srv_is_notification_enabled(uint8_t const * p_encoded_data) |
AnnaBridge | 143:86740a56073b | 251 | { |
AnnaBridge | 143:86740a56073b | 252 | uint16_t cccd_value = uint16_decode(p_encoded_data); |
AnnaBridge | 143:86740a56073b | 253 | return ((cccd_value & BLE_GATT_HVX_NOTIFICATION) != 0); |
AnnaBridge | 143:86740a56073b | 254 | } |
AnnaBridge | 143:86740a56073b | 255 | |
AnnaBridge | 143:86740a56073b | 256 | /**@brief Function for decoding a CCCD value, and then testing if indication is |
AnnaBridge | 143:86740a56073b | 257 | * enabled. |
AnnaBridge | 143:86740a56073b | 258 | * |
AnnaBridge | 143:86740a56073b | 259 | * @param[in] p_encoded_data Buffer where the encoded CCCD is stored. |
AnnaBridge | 143:86740a56073b | 260 | * |
AnnaBridge | 143:86740a56073b | 261 | * @retval TRUE If indication is enabled. |
AnnaBridge | 143:86740a56073b | 262 | * @retval FALSE Otherwise. |
AnnaBridge | 143:86740a56073b | 263 | */ |
AnnaBridge | 143:86740a56073b | 264 | static __INLINE bool ble_srv_is_indication_enabled(uint8_t const * p_encoded_data) |
AnnaBridge | 143:86740a56073b | 265 | { |
AnnaBridge | 143:86740a56073b | 266 | uint16_t cccd_value = uint16_decode(p_encoded_data); |
AnnaBridge | 143:86740a56073b | 267 | return ((cccd_value & BLE_GATT_HVX_INDICATION) != 0); |
AnnaBridge | 143:86740a56073b | 268 | } |
AnnaBridge | 143:86740a56073b | 269 | |
AnnaBridge | 143:86740a56073b | 270 | /**@brief Function for encoding a Report Reference Descriptor. |
AnnaBridge | 143:86740a56073b | 271 | * |
AnnaBridge | 143:86740a56073b | 272 | * @param[in] p_encoded_buffer The buffer of the encoded data. |
AnnaBridge | 143:86740a56073b | 273 | * @param[in] p_report_ref Report Reference value to be encoded. |
AnnaBridge | 143:86740a56073b | 274 | * |
AnnaBridge | 143:86740a56073b | 275 | * @return Length of the encoded data. |
AnnaBridge | 143:86740a56073b | 276 | */ |
AnnaBridge | 143:86740a56073b | 277 | uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, |
AnnaBridge | 143:86740a56073b | 278 | const ble_srv_report_ref_t * p_report_ref); |
AnnaBridge | 143:86740a56073b | 279 | |
AnnaBridge | 143:86740a56073b | 280 | /**@brief Function for making a UTF-8 structure refer to an ASCII string. |
AnnaBridge | 143:86740a56073b | 281 | * |
AnnaBridge | 143:86740a56073b | 282 | * @param[out] p_utf8 UTF-8 structure to be set. |
AnnaBridge | 143:86740a56073b | 283 | * @param[in] p_ascii ASCII string to be referred to. |
AnnaBridge | 143:86740a56073b | 284 | */ |
AnnaBridge | 143:86740a56073b | 285 | void ble_srv_ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii); |
AnnaBridge | 143:86740a56073b | 286 | |
AnnaBridge | 143:86740a56073b | 287 | |
AnnaBridge | 143:86740a56073b | 288 | /**@brief Security Access enumeration. |
AnnaBridge | 143:86740a56073b | 289 | * @details This enumeration gives the possible requirements for accessing a characteristic value. |
AnnaBridge | 143:86740a56073b | 290 | */ |
AnnaBridge | 143:86740a56073b | 291 | typedef enum |
AnnaBridge | 143:86740a56073b | 292 | { |
AnnaBridge | 143:86740a56073b | 293 | SEC_NO_ACCESS = 0, /**< Not possible to access. */ |
AnnaBridge | 143:86740a56073b | 294 | SEC_OPEN = 1, /**< Access open. */ |
AnnaBridge | 143:86740a56073b | 295 | SEC_JUST_WORKS = 2, /**< Access possible with 'Just Works' security at least. */ |
AnnaBridge | 143:86740a56073b | 296 | SEC_MITM = 3, /**< Access possible with 'MITM' security at least. */ |
AnnaBridge | 143:86740a56073b | 297 | SEC_SIGNED = 4, /**< Access possible with 'signed' security at least. */ |
AnnaBridge | 143:86740a56073b | 298 | SEC_SIGNED_MITM = 5 /**< Access possible with 'signed and MITM' security at least. */ |
AnnaBridge | 143:86740a56073b | 299 | }security_req_t; |
AnnaBridge | 143:86740a56073b | 300 | |
AnnaBridge | 143:86740a56073b | 301 | |
AnnaBridge | 143:86740a56073b | 302 | /**@brief Characteristic User Descriptor parameters. |
AnnaBridge | 143:86740a56073b | 303 | * @details This structure contains the parameters for User Descriptor. |
AnnaBridge | 143:86740a56073b | 304 | */ |
AnnaBridge | 143:86740a56073b | 305 | typedef struct |
AnnaBridge | 143:86740a56073b | 306 | { |
AnnaBridge | 143:86740a56073b | 307 | uint16_t max_size; /**< Maximum size of the user descriptor*/ |
AnnaBridge | 143:86740a56073b | 308 | uint16_t size; /**< Size of the user descriptor*/ |
AnnaBridge | 143:86740a56073b | 309 | uint8_t *p_char_user_desc; /**< User descriptor content, pointer to a UTF-8 encoded string (non-NULL terminated)*/ |
AnnaBridge | 143:86740a56073b | 310 | bool is_var_len; /**< Indicates if the user descriptor has variable length.*/ |
AnnaBridge | 143:86740a56073b | 311 | ble_gatt_char_props_t char_props; /**< user descriptor properties.*/ |
AnnaBridge | 143:86740a56073b | 312 | bool is_defered_read; /**< Indicate if deferred read operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 313 | bool is_defered_write; /**< Indicate if deferred write operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 314 | security_req_t read_access; /**< Security requirement for reading the user descriptor.*/ |
AnnaBridge | 143:86740a56073b | 315 | security_req_t write_access; /**< Security requirement for writing the user descriptor.*/ |
AnnaBridge | 143:86740a56073b | 316 | bool is_value_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ |
AnnaBridge | 143:86740a56073b | 317 | }ble_add_char_user_desc_t; |
AnnaBridge | 143:86740a56073b | 318 | |
AnnaBridge | 143:86740a56073b | 319 | |
AnnaBridge | 143:86740a56073b | 320 | /**@brief Add characteristic parameters structure. |
AnnaBridge | 143:86740a56073b | 321 | * @details This structure contains the parameters needed to use the @ref characteristic_add function. |
AnnaBridge | 143:86740a56073b | 322 | */ |
AnnaBridge | 143:86740a56073b | 323 | typedef struct |
AnnaBridge | 143:86740a56073b | 324 | { |
AnnaBridge | 143:86740a56073b | 325 | uint16_t uuid; /**< Characteristic UUID (16 bits UUIDs).*/ |
AnnaBridge | 143:86740a56073b | 326 | uint8_t uuid_type; /**< Base UUID. If 0, the Bluetooth SIG UUID will be used. Otherwise, this should be a value returned by @ref sd_ble_uuid_vs_add when adding the base UUID.*/ |
AnnaBridge | 143:86740a56073b | 327 | uint16_t max_len; /**< Maximum length of the characteristic value.*/ |
AnnaBridge | 143:86740a56073b | 328 | uint16_t init_len; /**< Initial length of the characteristic value.*/ |
AnnaBridge | 143:86740a56073b | 329 | uint8_t * p_init_value; /**< Initial encoded value of the characteristic.*/ |
AnnaBridge | 143:86740a56073b | 330 | bool is_var_len; /**< Indicates if the characteristic value has variable length.*/ |
AnnaBridge | 143:86740a56073b | 331 | ble_gatt_char_props_t char_props; /**< Characteristic properties.*/ |
AnnaBridge | 143:86740a56073b | 332 | bool is_defered_read; /**< Indicate if deferred read operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 333 | bool is_defered_write; /**< Indicate if deferred write operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 334 | security_req_t read_access; /**< Security requirement for reading the characteristic value.*/ |
AnnaBridge | 143:86740a56073b | 335 | security_req_t write_access; /**< Security requirement for writing the characteristic value.*/ |
AnnaBridge | 143:86740a56073b | 336 | security_req_t cccd_write_access; /**< Security requirement for writing the characteristic's CCCD.*/ |
AnnaBridge | 143:86740a56073b | 337 | bool is_value_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ |
AnnaBridge | 143:86740a56073b | 338 | ble_add_char_user_desc_t *p_user_descr; /**< Pointer to user descriptor if needed*/ |
AnnaBridge | 143:86740a56073b | 339 | ble_gatts_char_pf_t *p_presentation_format; /**< Pointer to characteristic format if needed*/ |
AnnaBridge | 143:86740a56073b | 340 | } ble_add_char_params_t; |
AnnaBridge | 143:86740a56073b | 341 | |
AnnaBridge | 143:86740a56073b | 342 | |
AnnaBridge | 143:86740a56073b | 343 | /**@brief Add descriptor parameters structure. |
AnnaBridge | 143:86740a56073b | 344 | * @details This structure contains the parameters needed to use the @ref descriptor_add function. |
AnnaBridge | 143:86740a56073b | 345 | */ |
AnnaBridge | 143:86740a56073b | 346 | typedef struct |
AnnaBridge | 143:86740a56073b | 347 | { |
AnnaBridge | 143:86740a56073b | 348 | uint16_t uuid; /**< descriptor UUID (16 bits UUIDs).*/ |
AnnaBridge | 143:86740a56073b | 349 | uint8_t uuid_type; /**< Base UUID. If 0, the Bluetooth SIG UUID will be used. Otherwise, this should be a value returned by @ref sd_ble_uuid_vs_add when adding the base UUID.*/ |
AnnaBridge | 143:86740a56073b | 350 | bool is_defered_read; /**< Indicate if deferred read operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 351 | bool is_defered_write; /**< Indicate if deferred write operations are supported.*/ |
AnnaBridge | 143:86740a56073b | 352 | bool is_var_len; /**< Indicates if the descriptor value has variable length.*/ |
AnnaBridge | 143:86740a56073b | 353 | security_req_t read_access; /**< Security requirement for reading the descriptor value.*/ |
AnnaBridge | 143:86740a56073b | 354 | security_req_t write_access; /**< Security requirement for writing the descriptor value.*/ |
AnnaBridge | 143:86740a56073b | 355 | bool is_value_user; /**< Indicate if the content of the characteristic is to be stored in the application (user) or in the stack.*/ |
AnnaBridge | 143:86740a56073b | 356 | uint16_t init_len; /**< Initial descriptor value length in bytes. */ |
AnnaBridge | 143:86740a56073b | 357 | uint16_t init_offs; /**< Initial descriptor value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized. */ |
AnnaBridge | 143:86740a56073b | 358 | uint16_t max_len; /**< Maximum descriptor value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */ |
AnnaBridge | 143:86740a56073b | 359 | uint8_t* p_value; /**< Pointer to the value of the descriptor*/ |
AnnaBridge | 143:86740a56073b | 360 | } ble_add_descr_params_t; |
AnnaBridge | 143:86740a56073b | 361 | |
AnnaBridge | 143:86740a56073b | 362 | |
AnnaBridge | 143:86740a56073b | 363 | /**@brief Function for adding a characteristic to a given service. |
AnnaBridge | 143:86740a56073b | 364 | * |
AnnaBridge | 143:86740a56073b | 365 | * If no pointer is given for the initial value, |
AnnaBridge | 143:86740a56073b | 366 | * the initial length parameter will be ignored and the initial length will be 0. |
AnnaBridge | 143:86740a56073b | 367 | * |
AnnaBridge | 143:86740a56073b | 368 | * @param[in] service_handle Handle of the service to which the characteristic is to be added. |
AnnaBridge | 143:86740a56073b | 369 | * @param[in] p_char_props Information needed to add the characteristic. |
AnnaBridge | 143:86740a56073b | 370 | * @param[out] p_char_handle Handle of the added characteristic. |
AnnaBridge | 143:86740a56073b | 371 | * |
AnnaBridge | 143:86740a56073b | 372 | * @retval NRF_SUCCESS If the characteristic was added successfully. Otherwise, an error code is returned. |
AnnaBridge | 143:86740a56073b | 373 | */ |
AnnaBridge | 143:86740a56073b | 374 | uint32_t characteristic_add(uint16_t service_handle, |
AnnaBridge | 143:86740a56073b | 375 | ble_add_char_params_t * p_char_props, |
AnnaBridge | 143:86740a56073b | 376 | ble_gatts_char_handles_t * p_char_handle); |
AnnaBridge | 143:86740a56073b | 377 | |
AnnaBridge | 143:86740a56073b | 378 | |
AnnaBridge | 143:86740a56073b | 379 | /**@brief Function for adding a characteristic's descriptor to a given characteristic. |
AnnaBridge | 143:86740a56073b | 380 | * |
AnnaBridge | 143:86740a56073b | 381 | * @param[in] char_handle Handle of the characteristic to which the descriptor is to be added, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. |
AnnaBridge | 143:86740a56073b | 382 | * @param[in] p_descr_props Information needed to add the descriptor. |
AnnaBridge | 143:86740a56073b | 383 | * @param[out] p_descr_handle Handle of the added descriptor. |
AnnaBridge | 143:86740a56073b | 384 | * |
AnnaBridge | 143:86740a56073b | 385 | * @retval NRF_SUCCESS If the characteristic was added successfully. Otherwise, an error code is returned. |
AnnaBridge | 143:86740a56073b | 386 | */ |
AnnaBridge | 143:86740a56073b | 387 | uint32_t descriptor_add(uint16_t char_handle, |
AnnaBridge | 143:86740a56073b | 388 | ble_add_descr_params_t * p_descr_props, |
AnnaBridge | 143:86740a56073b | 389 | uint16_t * p_descr_handle); |
AnnaBridge | 143:86740a56073b | 390 | |
AnnaBridge | 143:86740a56073b | 391 | |
AnnaBridge | 143:86740a56073b | 392 | #endif // BLE_SRV_COMMON_H__ |
AnnaBridge | 143:86740a56073b | 393 | |
AnnaBridge | 143:86740a56073b | 394 | /** @} */ |