Nordic nrf51 sdk sources. Mirrored from https://github.com/ARMmbed/nrf51-sdk.
source/nordic_sdk/components/softdevice/s130/headers/ble_types.h@19:47192cb9def7, 2016-04-07 (annotated)
- Committer:
- vcoubard
- Date:
- Thu Apr 07 17:37:40 2016 +0100
- Revision:
- 19:47192cb9def7
- Parent:
- 12:54c9ebc92faa
- Child:
- 20:a90c48eb1d30
Synchronized with git rev 9251259f
Author: Liyou Zhou
Copy over coresponding files from nordic-sdk 9.0.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vcoubard | 19:47192cb9def7 | 1 | /* |
vcoubard | 19:47192cb9def7 | 2 | * Copyright (c) Nordic Semiconductor ASA |
vcoubard | 19:47192cb9def7 | 3 | * All rights reserved. |
vcoubard | 19:47192cb9def7 | 4 | * |
vcoubard | 19:47192cb9def7 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
vcoubard | 19:47192cb9def7 | 6 | * are permitted provided that the following conditions are met: |
vcoubard | 19:47192cb9def7 | 7 | * |
vcoubard | 19:47192cb9def7 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this |
vcoubard | 19:47192cb9def7 | 9 | * list of conditions and the following disclaimer. |
vcoubard | 19:47192cb9def7 | 10 | * |
vcoubard | 19:47192cb9def7 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, this |
vcoubard | 19:47192cb9def7 | 12 | * list of conditions and the following disclaimer in the documentation and/or |
vcoubard | 19:47192cb9def7 | 13 | * other materials provided with the distribution. |
vcoubard | 19:47192cb9def7 | 14 | * |
vcoubard | 19:47192cb9def7 | 15 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of other |
vcoubard | 19:47192cb9def7 | 16 | * contributors to this software may be used to endorse or promote products |
vcoubard | 19:47192cb9def7 | 17 | * derived from this software without specific prior written permission. |
vcoubard | 19:47192cb9def7 | 18 | * |
vcoubard | 19:47192cb9def7 | 19 | * 4. This software must only be used in a processor manufactured by Nordic |
vcoubard | 19:47192cb9def7 | 20 | * Semiconductor ASA, or in a processor manufactured by a third party that |
vcoubard | 19:47192cb9def7 | 21 | * is used in combination with a processor manufactured by Nordic Semiconductor. |
vcoubard | 19:47192cb9def7 | 22 | * |
vcoubard | 19:47192cb9def7 | 23 | * |
vcoubard | 19:47192cb9def7 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
vcoubard | 19:47192cb9def7 | 25 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
vcoubard | 19:47192cb9def7 | 26 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
vcoubard | 19:47192cb9def7 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
vcoubard | 19:47192cb9def7 | 28 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
vcoubard | 19:47192cb9def7 | 29 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
vcoubard | 19:47192cb9def7 | 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
vcoubard | 19:47192cb9def7 | 31 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
vcoubard | 19:47192cb9def7 | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
vcoubard | 19:47192cb9def7 | 33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
vcoubard | 19:47192cb9def7 | 34 | * |
vcoubard | 1:ebc0e0ef0a11 | 35 | */ |
vcoubard | 1:ebc0e0ef0a11 | 36 | |
vcoubard | 1:ebc0e0ef0a11 | 37 | /** |
vcoubard | 1:ebc0e0ef0a11 | 38 | @addtogroup BLE_COMMON |
vcoubard | 1:ebc0e0ef0a11 | 39 | @{ |
vcoubard | 1:ebc0e0ef0a11 | 40 | @defgroup ble_types Common types and macro definitions |
vcoubard | 1:ebc0e0ef0a11 | 41 | @{ |
vcoubard | 1:ebc0e0ef0a11 | 42 | |
vcoubard | 1:ebc0e0ef0a11 | 43 | @brief Common types and macro definitions for the BLE SoftDevice. |
vcoubard | 1:ebc0e0ef0a11 | 44 | */ |
vcoubard | 1:ebc0e0ef0a11 | 45 | |
vcoubard | 1:ebc0e0ef0a11 | 46 | #ifndef BLE_TYPES_H__ |
vcoubard | 1:ebc0e0ef0a11 | 47 | #define BLE_TYPES_H__ |
vcoubard | 1:ebc0e0ef0a11 | 48 | |
vcoubard | 1:ebc0e0ef0a11 | 49 | #include <stdint.h> |
vcoubard | 1:ebc0e0ef0a11 | 50 | |
vcoubard | 1:ebc0e0ef0a11 | 51 | /** @addtogroup BLE_TYPES_DEFINES Defines |
vcoubard | 1:ebc0e0ef0a11 | 52 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 53 | |
vcoubard | 1:ebc0e0ef0a11 | 54 | /** @defgroup BLE_CONN_HANDLES BLE Connection Handles |
vcoubard | 1:ebc0e0ef0a11 | 55 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 56 | #define BLE_CONN_HANDLE_INVALID 0xFFFF /**< Invalid Connection Handle. */ |
vcoubard | 1:ebc0e0ef0a11 | 57 | #define BLE_CONN_HANDLE_ALL 0xFFFE /**< Applies to all Connection Handles. */ |
vcoubard | 1:ebc0e0ef0a11 | 58 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 59 | |
vcoubard | 1:ebc0e0ef0a11 | 60 | |
vcoubard | 1:ebc0e0ef0a11 | 61 | /** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs |
vcoubard | 1:ebc0e0ef0a11 | 62 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 63 | /* Generic UUIDs, applicable to all services */ |
vcoubard | 1:ebc0e0ef0a11 | 64 | #define BLE_UUID_UNKNOWN 0x0000 /**< Reserved UUID. */ |
vcoubard | 1:ebc0e0ef0a11 | 65 | #define BLE_UUID_SERVICE_PRIMARY 0x2800 /**< Primary Service. */ |
vcoubard | 1:ebc0e0ef0a11 | 66 | #define BLE_UUID_SERVICE_SECONDARY 0x2801 /**< Secondary Service. */ |
vcoubard | 1:ebc0e0ef0a11 | 67 | #define BLE_UUID_SERVICE_INCLUDE 0x2802 /**< Include. */ |
vcoubard | 1:ebc0e0ef0a11 | 68 | #define BLE_UUID_CHARACTERISTIC 0x2803 /**< Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 69 | #define BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 0x2900 /**< Characteristic Extended Properties Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 70 | #define BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 0x2901 /**< Characteristic User Description Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 71 | #define BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 0x2902 /**< Client Characteristic Configuration Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 72 | #define BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 0x2903 /**< Server Characteristic Configuration Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 73 | #define BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 0x2904 /**< Characteristic Presentation Format Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 74 | #define BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 0x2905 /**< Characteristic Aggregate Format Descriptor. */ |
vcoubard | 1:ebc0e0ef0a11 | 75 | /* GATT specific UUIDs */ |
vcoubard | 1:ebc0e0ef0a11 | 76 | #define BLE_UUID_GATT 0x1801 /**< Generic Attribute Profile. */ |
vcoubard | 1:ebc0e0ef0a11 | 77 | #define BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 0x2A05 /**< Service Changed Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 78 | /* GAP specific UUIDs */ |
vcoubard | 1:ebc0e0ef0a11 | 79 | #define BLE_UUID_GAP 0x1800 /**< Generic Access Profile. */ |
vcoubard | 1:ebc0e0ef0a11 | 80 | #define BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 0x2A00 /**< Device Name Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 81 | #define BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 0x2A01 /**< Appearance Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 82 | #define BLE_UUID_GAP_CHARACTERISTIC_PPF 0x2A02 /**< Peripheral Privacy Flag Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 83 | #define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 84 | #define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04 /**< Peripheral Preferred Connection Parameters Characteristic. */ |
vcoubard | 1:ebc0e0ef0a11 | 85 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 86 | |
vcoubard | 1:ebc0e0ef0a11 | 87 | |
vcoubard | 1:ebc0e0ef0a11 | 88 | /** @defgroup BLE_UUID_TYPES Types of UUID |
vcoubard | 1:ebc0e0ef0a11 | 89 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 90 | #define BLE_UUID_TYPE_UNKNOWN 0x00 /**< Invalid UUID type. */ |
vcoubard | 1:ebc0e0ef0a11 | 91 | #define BLE_UUID_TYPE_BLE 0x01 /**< Bluetooth SIG UUID (16-bit). */ |
vcoubard | 1:ebc0e0ef0a11 | 92 | #define BLE_UUID_TYPE_VENDOR_BEGIN 0x02 /**< Vendor UUID types start at this index (128-bit). */ |
vcoubard | 1:ebc0e0ef0a11 | 93 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 94 | |
vcoubard | 1:ebc0e0ef0a11 | 95 | |
vcoubard | 1:ebc0e0ef0a11 | 96 | /** @defgroup BLE_APPEARANCES Bluetooth Appearance values |
vcoubard | 1:ebc0e0ef0a11 | 97 | * @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml |
vcoubard | 1:ebc0e0ef0a11 | 98 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 99 | #define BLE_APPEARANCE_UNKNOWN 0 /**< Unknown. */ |
vcoubard | 1:ebc0e0ef0a11 | 100 | #define BLE_APPEARANCE_GENERIC_PHONE 64 /**< Generic Phone. */ |
vcoubard | 1:ebc0e0ef0a11 | 101 | #define BLE_APPEARANCE_GENERIC_COMPUTER 128 /**< Generic Computer. */ |
vcoubard | 1:ebc0e0ef0a11 | 102 | #define BLE_APPEARANCE_GENERIC_WATCH 192 /**< Generic Watch. */ |
vcoubard | 1:ebc0e0ef0a11 | 103 | #define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193 /**< Watch: Sports Watch. */ |
vcoubard | 1:ebc0e0ef0a11 | 104 | #define BLE_APPEARANCE_GENERIC_CLOCK 256 /**< Generic Clock. */ |
vcoubard | 1:ebc0e0ef0a11 | 105 | #define BLE_APPEARANCE_GENERIC_DISPLAY 320 /**< Generic Display. */ |
vcoubard | 1:ebc0e0ef0a11 | 106 | #define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384 /**< Generic Remote Control. */ |
vcoubard | 1:ebc0e0ef0a11 | 107 | #define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448 /**< Generic Eye-glasses. */ |
vcoubard | 1:ebc0e0ef0a11 | 108 | #define BLE_APPEARANCE_GENERIC_TAG 512 /**< Generic Tag. */ |
vcoubard | 1:ebc0e0ef0a11 | 109 | #define BLE_APPEARANCE_GENERIC_KEYRING 576 /**< Generic Keyring. */ |
vcoubard | 1:ebc0e0ef0a11 | 110 | #define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640 /**< Generic Media Player. */ |
vcoubard | 1:ebc0e0ef0a11 | 111 | #define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704 /**< Generic Barcode Scanner. */ |
vcoubard | 1:ebc0e0ef0a11 | 112 | #define BLE_APPEARANCE_GENERIC_THERMOMETER 768 /**< Generic Thermometer. */ |
vcoubard | 1:ebc0e0ef0a11 | 113 | #define BLE_APPEARANCE_THERMOMETER_EAR 769 /**< Thermometer: Ear. */ |
vcoubard | 1:ebc0e0ef0a11 | 114 | #define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832 /**< Generic Heart rate Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 115 | #define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */ |
vcoubard | 1:ebc0e0ef0a11 | 116 | #define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896 /**< Generic Blood Pressure. */ |
vcoubard | 1:ebc0e0ef0a11 | 117 | #define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897 /**< Blood Pressure: Arm. */ |
vcoubard | 1:ebc0e0ef0a11 | 118 | #define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898 /**< Blood Pressure: Wrist. */ |
vcoubard | 1:ebc0e0ef0a11 | 119 | #define BLE_APPEARANCE_GENERIC_HID 960 /**< Human Interface Device (HID). */ |
vcoubard | 1:ebc0e0ef0a11 | 120 | #define BLE_APPEARANCE_HID_KEYBOARD 961 /**< Keyboard (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 121 | #define BLE_APPEARANCE_HID_MOUSE 962 /**< Mouse (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 122 | #define BLE_APPEARANCE_HID_JOYSTICK 963 /**< Joystiq (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 123 | #define BLE_APPEARANCE_HID_GAMEPAD 964 /**< Gamepad (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 124 | #define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965 /**< Digitizer Tablet (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 125 | #define BLE_APPEARANCE_HID_CARD_READER 966 /**< Card Reader (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 126 | #define BLE_APPEARANCE_HID_DIGITAL_PEN 967 /**< Digital Pen (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 127 | #define BLE_APPEARANCE_HID_BARCODE 968 /**< Barcode Scanner (HID Subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 128 | #define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024 /**< Generic Glucose Meter. */ |
vcoubard | 1:ebc0e0ef0a11 | 129 | #define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088 /**< Generic Running Walking Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 130 | #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 /**< Running Walking Sensor: In-Shoe. */ |
vcoubard | 1:ebc0e0ef0a11 | 131 | #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 /**< Running Walking Sensor: On-Shoe. */ |
vcoubard | 1:ebc0e0ef0a11 | 132 | #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091 /**< Running Walking Sensor: On-Hip. */ |
vcoubard | 1:ebc0e0ef0a11 | 133 | #define BLE_APPEARANCE_GENERIC_CYCLING 1152 /**< Generic Cycling. */ |
vcoubard | 1:ebc0e0ef0a11 | 134 | #define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153 /**< Cycling: Cycling Computer. */ |
vcoubard | 1:ebc0e0ef0a11 | 135 | #define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154 /**< Cycling: Speed Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 136 | #define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155 /**< Cycling: Cadence Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 137 | #define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156 /**< Cycling: Power Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 138 | #define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157 /**< Cycling: Speed and Cadence Sensor. */ |
vcoubard | 1:ebc0e0ef0a11 | 139 | #define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136 /**< Generic Pulse Oximeter. */ |
vcoubard | 1:ebc0e0ef0a11 | 140 | #define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137 /**< Fingertip (Pulse Oximeter subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 141 | #define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138 /**< Wrist Worn(Pulse Oximeter subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 142 | #define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200 /**< Generic Weight Scale. */ |
vcoubard | 1:ebc0e0ef0a11 | 143 | #define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184 /**< Generic Outdoor Sports Activity. */ |
vcoubard | 1:ebc0e0ef0a11 | 144 | #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185 /**< Location Display Device (Outdoor Sports Activity subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 145 | #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186 /**< Location and Navigation Display Device (Outdoor Sports Activity subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 146 | #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 147 | #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */ |
vcoubard | 1:ebc0e0ef0a11 | 148 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 149 | |
vcoubard | 1:ebc0e0ef0a11 | 150 | /** @brief Set .type and .uuid fields of ble_uuid_struct to specified uuid value. */ |
vcoubard | 1:ebc0e0ef0a11 | 151 | #define BLE_UUID_BLE_ASSIGN(instance, value) do {\ |
vcoubard | 1:ebc0e0ef0a11 | 152 | instance.type = BLE_UUID_TYPE_BLE; \ |
vcoubard | 1:ebc0e0ef0a11 | 153 | instance.uuid = value;} while(0) |
vcoubard | 1:ebc0e0ef0a11 | 154 | |
vcoubard | 1:ebc0e0ef0a11 | 155 | /** @brief Copy type and uuid members from src to dst ble_uuid_t pointer. Both pointers must be valid/non-null. */ |
vcoubard | 1:ebc0e0ef0a11 | 156 | #define BLE_UUID_COPY_PTR(dst, src) do {\ |
vcoubard | 1:ebc0e0ef0a11 | 157 | (dst)->type = (src)->type; \ |
vcoubard | 1:ebc0e0ef0a11 | 158 | (dst)->uuid = (src)->uuid;} while(0) |
vcoubard | 1:ebc0e0ef0a11 | 159 | |
vcoubard | 1:ebc0e0ef0a11 | 160 | /** @brief Copy type and uuid members from src to dst ble_uuid_t struct. */ |
vcoubard | 1:ebc0e0ef0a11 | 161 | #define BLE_UUID_COPY_INST(dst, src) do {\ |
vcoubard | 1:ebc0e0ef0a11 | 162 | (dst).type = (src).type; \ |
vcoubard | 1:ebc0e0ef0a11 | 163 | (dst).uuid = (src).uuid;} while(0) |
vcoubard | 1:ebc0e0ef0a11 | 164 | |
vcoubard | 1:ebc0e0ef0a11 | 165 | /** @brief Compare for equality both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ |
vcoubard | 1:ebc0e0ef0a11 | 166 | #define BLE_UUID_EQ(p_uuid1, p_uuid2) \ |
vcoubard | 1:ebc0e0ef0a11 | 167 | (((p_uuid1)->type == (p_uuid2)->type) && ((p_uuid1)->uuid == (p_uuid2)->uuid)) |
vcoubard | 1:ebc0e0ef0a11 | 168 | |
vcoubard | 1:ebc0e0ef0a11 | 169 | /** @brief Compare for difference both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */ |
vcoubard | 1:ebc0e0ef0a11 | 170 | #define BLE_UUID_NEQ(p_uuid1, p_uuid2) \ |
vcoubard | 1:ebc0e0ef0a11 | 171 | (((p_uuid1)->type != (p_uuid2)->type) || ((p_uuid1)->uuid != (p_uuid2)->uuid)) |
vcoubard | 1:ebc0e0ef0a11 | 172 | |
vcoubard | 1:ebc0e0ef0a11 | 173 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 174 | |
vcoubard | 1:ebc0e0ef0a11 | 175 | /** @addtogroup BLE_TYPES_STRUCTURES Structures |
vcoubard | 1:ebc0e0ef0a11 | 176 | * @{ */ |
vcoubard | 1:ebc0e0ef0a11 | 177 | |
vcoubard | 1:ebc0e0ef0a11 | 178 | /** @brief 128 bit UUID values. */ |
vcoubard | 1:ebc0e0ef0a11 | 179 | typedef struct |
vcoubard | 1:ebc0e0ef0a11 | 180 | { |
vcoubard | 1:ebc0e0ef0a11 | 181 | unsigned char uuid128[16]; /**< Little-Endian UUID bytes. */ |
vcoubard | 1:ebc0e0ef0a11 | 182 | } ble_uuid128_t; |
vcoubard | 1:ebc0e0ef0a11 | 183 | |
vcoubard | 1:ebc0e0ef0a11 | 184 | /** @brief Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs. */ |
vcoubard | 1:ebc0e0ef0a11 | 185 | typedef struct |
vcoubard | 1:ebc0e0ef0a11 | 186 | { |
vcoubard | 1:ebc0e0ef0a11 | 187 | uint16_t uuid; /**< 16-bit UUID value or octets 12-13 of 128-bit UUID. */ |
vcoubard | 1:ebc0e0ef0a11 | 188 | uint8_t type; /**< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined. */ |
vcoubard | 1:ebc0e0ef0a11 | 189 | } ble_uuid_t; |
vcoubard | 1:ebc0e0ef0a11 | 190 | |
vcoubard | 1:ebc0e0ef0a11 | 191 | /** @} */ |
vcoubard | 1:ebc0e0ef0a11 | 192 | |
vcoubard | 1:ebc0e0ef0a11 | 193 | #endif /* BLE_TYPES_H__ */ |
vcoubard | 1:ebc0e0ef0a11 | 194 | |
vcoubard | 1:ebc0e0ef0a11 | 195 | /** |
vcoubard | 1:ebc0e0ef0a11 | 196 | @} |
vcoubard | 1:ebc0e0ef0a11 | 197 | @} |
vcoubard | 1:ebc0e0ef0a11 | 198 | */ |