Nordic stack and drivers for the mbed BLE API
Dependents: BLE_ANCS_SDAPI BLE_temperature BLE_HeartRate writable_gatt ... more
TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/ble_gatt.h@638:c90ae1400bf2, 2016-09-14 (annotated)
- Committer:
- Vincent Coubard
- Date:
- Wed Sep 14 14:39:43 2016 +0100
- Revision:
- 638:c90ae1400bf2
Sync with bdab10dc0f90748b6989c8b577771bb403ca6bd8 from ARMmbed/mbed-os.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vincent Coubard |
638:c90ae1400bf2 | 1 | /* |
Vincent Coubard |
638:c90ae1400bf2 | 2 | * Copyright (c) Nordic Semiconductor ASA |
Vincent Coubard |
638:c90ae1400bf2 | 3 | * All rights reserved. |
Vincent Coubard |
638:c90ae1400bf2 | 4 | * |
Vincent Coubard |
638:c90ae1400bf2 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
Vincent Coubard |
638:c90ae1400bf2 | 6 | * are permitted provided that the following conditions are met: |
Vincent Coubard |
638:c90ae1400bf2 | 7 | * |
Vincent Coubard |
638:c90ae1400bf2 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this |
Vincent Coubard |
638:c90ae1400bf2 | 9 | * list of conditions and the following disclaimer. |
Vincent Coubard |
638:c90ae1400bf2 | 10 | * |
Vincent Coubard |
638:c90ae1400bf2 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, this |
Vincent Coubard |
638:c90ae1400bf2 | 12 | * list of conditions and the following disclaimer in the documentation and/or |
Vincent Coubard |
638:c90ae1400bf2 | 13 | * other materials provided with the distribution. |
Vincent Coubard |
638:c90ae1400bf2 | 14 | * |
Vincent Coubard |
638:c90ae1400bf2 | 15 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of other |
Vincent Coubard |
638:c90ae1400bf2 | 16 | * contributors to this software may be used to endorse or promote products |
Vincent Coubard |
638:c90ae1400bf2 | 17 | * derived from this software without specific prior written permission. |
Vincent Coubard |
638:c90ae1400bf2 | 18 | * |
Vincent Coubard |
638:c90ae1400bf2 | 19 | * |
Vincent Coubard |
638:c90ae1400bf2 | 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
Vincent Coubard |
638:c90ae1400bf2 | 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Vincent Coubard |
638:c90ae1400bf2 | 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Vincent Coubard |
638:c90ae1400bf2 | 23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
Vincent Coubard |
638:c90ae1400bf2 | 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Vincent Coubard |
638:c90ae1400bf2 | 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Vincent Coubard |
638:c90ae1400bf2 | 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
Vincent Coubard |
638:c90ae1400bf2 | 27 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Vincent Coubard |
638:c90ae1400bf2 | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Vincent Coubard |
638:c90ae1400bf2 | 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Vincent Coubard |
638:c90ae1400bf2 | 30 | * |
Vincent Coubard |
638:c90ae1400bf2 | 31 | */ |
Vincent Coubard |
638:c90ae1400bf2 | 32 | |
Vincent Coubard |
638:c90ae1400bf2 | 33 | /** |
Vincent Coubard |
638:c90ae1400bf2 | 34 | @addtogroup BLE_GATT Generic Attribute Profile (GATT) Common |
Vincent Coubard |
638:c90ae1400bf2 | 35 | @{ |
Vincent Coubard |
638:c90ae1400bf2 | 36 | @brief Common definitions and prototypes for the GATT interfaces. |
Vincent Coubard |
638:c90ae1400bf2 | 37 | */ |
Vincent Coubard |
638:c90ae1400bf2 | 38 | |
Vincent Coubard |
638:c90ae1400bf2 | 39 | #ifndef BLE_GATT_H__ |
Vincent Coubard |
638:c90ae1400bf2 | 40 | #define BLE_GATT_H__ |
Vincent Coubard |
638:c90ae1400bf2 | 41 | |
Vincent Coubard |
638:c90ae1400bf2 | 42 | #include "ble_types.h" |
Vincent Coubard |
638:c90ae1400bf2 | 43 | #include "ble_ranges.h" |
Vincent Coubard |
638:c90ae1400bf2 | 44 | |
Vincent Coubard |
638:c90ae1400bf2 | 45 | |
Vincent Coubard |
638:c90ae1400bf2 | 46 | /** @addtogroup BLE_GATT_DEFINES Defines |
Vincent Coubard |
638:c90ae1400bf2 | 47 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 48 | |
Vincent Coubard |
638:c90ae1400bf2 | 49 | /** @brief Default MTU size. */ |
Vincent Coubard |
638:c90ae1400bf2 | 50 | #define GATT_MTU_SIZE_DEFAULT 23 |
Vincent Coubard |
638:c90ae1400bf2 | 51 | |
Vincent Coubard |
638:c90ae1400bf2 | 52 | /** @brief Only the default MTU size of 23 is currently supported. */ |
Vincent Coubard |
638:c90ae1400bf2 | 53 | #define GATT_RX_MTU 23 |
Vincent Coubard |
638:c90ae1400bf2 | 54 | |
Vincent Coubard |
638:c90ae1400bf2 | 55 | |
Vincent Coubard |
638:c90ae1400bf2 | 56 | /**@brief Invalid Attribute Handle. */ |
Vincent Coubard |
638:c90ae1400bf2 | 57 | #define BLE_GATT_HANDLE_INVALID 0x0000 |
Vincent Coubard |
638:c90ae1400bf2 | 58 | |
Vincent Coubard |
638:c90ae1400bf2 | 59 | /** @defgroup BLE_GATT_TIMEOUT_SOURCES GATT Timeout sources |
Vincent Coubard |
638:c90ae1400bf2 | 60 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 61 | #define BLE_GATT_TIMEOUT_SRC_PROTOCOL 0x00 /**< ATT Protocol timeout. */ |
Vincent Coubard |
638:c90ae1400bf2 | 62 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 63 | |
Vincent Coubard |
638:c90ae1400bf2 | 64 | /** @defgroup BLE_GATT_WRITE_OPS GATT Write operations |
Vincent Coubard |
638:c90ae1400bf2 | 65 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 66 | #define BLE_GATT_OP_INVALID 0x00 /**< Invalid Operation. */ |
Vincent Coubard |
638:c90ae1400bf2 | 67 | #define BLE_GATT_OP_WRITE_REQ 0x01 /**< Write Request. */ |
Vincent Coubard |
638:c90ae1400bf2 | 68 | #define BLE_GATT_OP_WRITE_CMD 0x02 /**< Write Command. */ |
Vincent Coubard |
638:c90ae1400bf2 | 69 | #define BLE_GATT_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */ |
Vincent Coubard |
638:c90ae1400bf2 | 70 | #define BLE_GATT_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */ |
Vincent Coubard |
638:c90ae1400bf2 | 71 | #define BLE_GATT_OP_EXEC_WRITE_REQ 0x05 /**< Execute Write Request. */ |
Vincent Coubard |
638:c90ae1400bf2 | 72 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 73 | |
Vincent Coubard |
638:c90ae1400bf2 | 74 | /** @defgroup BLE_GATT_EXEC_WRITE_FLAGS GATT Execute Write flags |
Vincent Coubard |
638:c90ae1400bf2 | 75 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 76 | #define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL 0x00 |
Vincent Coubard |
638:c90ae1400bf2 | 77 | #define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE 0x01 |
Vincent Coubard |
638:c90ae1400bf2 | 78 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 79 | |
Vincent Coubard |
638:c90ae1400bf2 | 80 | /** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations |
Vincent Coubard |
638:c90ae1400bf2 | 81 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 82 | #define BLE_GATT_HVX_INVALID 0x00 /**< Invalid Operation. */ |
Vincent Coubard |
638:c90ae1400bf2 | 83 | #define BLE_GATT_HVX_NOTIFICATION 0x01 /**< Handle Value Notification. */ |
Vincent Coubard |
638:c90ae1400bf2 | 84 | #define BLE_GATT_HVX_INDICATION 0x02 /**< Handle Value Indication. */ |
Vincent Coubard |
638:c90ae1400bf2 | 85 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 86 | |
Vincent Coubard |
638:c90ae1400bf2 | 87 | /** @defgroup BLE_GATT_STATUS_CODES GATT Status Codes |
Vincent Coubard |
638:c90ae1400bf2 | 88 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 89 | #define BLE_GATT_STATUS_SUCCESS 0x0000 /**< Success. */ |
Vincent Coubard |
638:c90ae1400bf2 | 90 | #define BLE_GATT_STATUS_UNKNOWN 0x0001 /**< Unknown or not applicable status. */ |
Vincent Coubard |
638:c90ae1400bf2 | 91 | #define BLE_GATT_STATUS_ATTERR_INVALID 0x0100 /**< ATT Error: Invalid Error Code. */ |
Vincent Coubard |
638:c90ae1400bf2 | 92 | #define BLE_GATT_STATUS_ATTERR_INVALID_HANDLE 0x0101 /**< ATT Error: Invalid Attribute Handle. */ |
Vincent Coubard |
638:c90ae1400bf2 | 93 | #define BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102 /**< ATT Error: Read not permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 94 | #define BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103 /**< ATT Error: Write not permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 95 | #define BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104 /**< ATT Error: Used in ATT as Invalid PDU. */ |
Vincent Coubard |
638:c90ae1400bf2 | 96 | #define BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105 /**< ATT Error: Authenticated link required. */ |
Vincent Coubard |
638:c90ae1400bf2 | 97 | #define BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED 0x0106 /**< ATT Error: Used in ATT as Request Not Supported. */ |
Vincent Coubard |
638:c90ae1400bf2 | 98 | #define BLE_GATT_STATUS_ATTERR_INVALID_OFFSET 0x0107 /**< ATT Error: Offset specified was past the end of the attribute. */ |
Vincent Coubard |
638:c90ae1400bf2 | 99 | #define BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION 0x0108 /**< ATT Error: Used in ATT as Insufficient Authorisation. */ |
Vincent Coubard |
638:c90ae1400bf2 | 100 | #define BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL 0x0109 /**< ATT Error: Used in ATT as Prepare Queue Full. */ |
Vincent Coubard |
638:c90ae1400bf2 | 101 | #define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND 0x010A /**< ATT Error: Used in ATT as Attribute not found. */ |
Vincent Coubard |
638:c90ae1400bf2 | 102 | #define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG 0x010B /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */ |
Vincent Coubard |
638:c90ae1400bf2 | 103 | #define BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE 0x010C /**< ATT Error: Encryption key size used is insufficient. */ |
Vincent Coubard |
638:c90ae1400bf2 | 104 | #define BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH 0x010D /**< ATT Error: Invalid value size. */ |
Vincent Coubard |
638:c90ae1400bf2 | 105 | #define BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR 0x010E /**< ATT Error: Very unlikely error. */ |
Vincent Coubard |
638:c90ae1400bf2 | 106 | #define BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION 0x010F /**< ATT Error: Encrypted link required. */ |
Vincent Coubard |
638:c90ae1400bf2 | 107 | #define BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE 0x0110 /**< ATT Error: Attribute type is not a supported grouping attribute. */ |
Vincent Coubard |
638:c90ae1400bf2 | 108 | #define BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES 0x0111 /**< ATT Error: Encrypted link required. */ |
Vincent Coubard |
638:c90ae1400bf2 | 109 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN 0x0112 /**< ATT Error: Reserved for Future Use range #1 begin. */ |
Vincent Coubard |
638:c90ae1400bf2 | 110 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END 0x017F /**< ATT Error: Reserved for Future Use range #1 end. */ |
Vincent Coubard |
638:c90ae1400bf2 | 111 | #define BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180 /**< ATT Error: Application range begin. */ |
Vincent Coubard |
638:c90ae1400bf2 | 112 | #define BLE_GATT_STATUS_ATTERR_APP_END 0x019F /**< ATT Error: Application range end. */ |
Vincent Coubard |
638:c90ae1400bf2 | 113 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 /**< ATT Error: Reserved for Future Use range #2 begin. */ |
Vincent Coubard |
638:c90ae1400bf2 | 114 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END 0x01DF /**< ATT Error: Reserved for Future Use range #2 end. */ |
Vincent Coubard |
638:c90ae1400bf2 | 115 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN 0x01E0 /**< ATT Error: Reserved for Future Use range #3 begin. */ |
Vincent Coubard |
638:c90ae1400bf2 | 116 | #define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END 0x01FC /**< ATT Error: Reserved for Future Use range #3 end. */ |
Vincent Coubard |
638:c90ae1400bf2 | 117 | #define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR 0x01FD /**< ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */ |
Vincent Coubard |
638:c90ae1400bf2 | 118 | #define BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG 0x01FE /**< ATT Common Profile and Service Error: Procedure Already in Progress. */ |
Vincent Coubard |
638:c90ae1400bf2 | 119 | #define BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE 0x01FF /**< ATT Common Profile and Service Error: Out Of Range. */ |
Vincent Coubard |
638:c90ae1400bf2 | 120 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 121 | |
Vincent Coubard |
638:c90ae1400bf2 | 122 | |
Vincent Coubard |
638:c90ae1400bf2 | 123 | /** @defgroup BLE_GATT_CPF_FORMATS Characteristic Presentation Formats |
Vincent Coubard |
638:c90ae1400bf2 | 124 | * @note Found at http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml |
Vincent Coubard |
638:c90ae1400bf2 | 125 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 126 | #define BLE_GATT_CPF_FORMAT_RFU 0x00 /**< Reserved For Future Use. */ |
Vincent Coubard |
638:c90ae1400bf2 | 127 | #define BLE_GATT_CPF_FORMAT_BOOLEAN 0x01 /**< Boolean. */ |
Vincent Coubard |
638:c90ae1400bf2 | 128 | #define BLE_GATT_CPF_FORMAT_2BIT 0x02 /**< Unsigned 2-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 129 | #define BLE_GATT_CPF_FORMAT_NIBBLE 0x03 /**< Unsigned 4-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 130 | #define BLE_GATT_CPF_FORMAT_UINT8 0x04 /**< Unsigned 8-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 131 | #define BLE_GATT_CPF_FORMAT_UINT12 0x05 /**< Unsigned 12-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 132 | #define BLE_GATT_CPF_FORMAT_UINT16 0x06 /**< Unsigned 16-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 133 | #define BLE_GATT_CPF_FORMAT_UINT24 0x07 /**< Unsigned 24-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 134 | #define BLE_GATT_CPF_FORMAT_UINT32 0x08 /**< Unsigned 32-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 135 | #define BLE_GATT_CPF_FORMAT_UINT48 0x09 /**< Unsigned 48-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 136 | #define BLE_GATT_CPF_FORMAT_UINT64 0x0A /**< Unsigned 64-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 137 | #define BLE_GATT_CPF_FORMAT_UINT128 0x0B /**< Unsigned 128-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 138 | #define BLE_GATT_CPF_FORMAT_SINT8 0x0C /**< Signed 2-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 139 | #define BLE_GATT_CPF_FORMAT_SINT12 0x0D /**< Signed 12-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 140 | #define BLE_GATT_CPF_FORMAT_SINT16 0x0E /**< Signed 16-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 141 | #define BLE_GATT_CPF_FORMAT_SINT24 0x0F /**< Signed 24-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 142 | #define BLE_GATT_CPF_FORMAT_SINT32 0x10 /**< Signed 32-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 143 | #define BLE_GATT_CPF_FORMAT_SINT48 0x11 /**< Signed 48-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 144 | #define BLE_GATT_CPF_FORMAT_SINT64 0x12 /**< Signed 64-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 145 | #define BLE_GATT_CPF_FORMAT_SINT128 0x13 /**< Signed 128-bit integer. */ |
Vincent Coubard |
638:c90ae1400bf2 | 146 | #define BLE_GATT_CPF_FORMAT_FLOAT32 0x14 /**< IEEE-754 32-bit floating point. */ |
Vincent Coubard |
638:c90ae1400bf2 | 147 | #define BLE_GATT_CPF_FORMAT_FLOAT64 0x15 /**< IEEE-754 64-bit floating point. */ |
Vincent Coubard |
638:c90ae1400bf2 | 148 | #define BLE_GATT_CPF_FORMAT_SFLOAT 0x16 /**< IEEE-11073 16-bit SFLOAT. */ |
Vincent Coubard |
638:c90ae1400bf2 | 149 | #define BLE_GATT_CPF_FORMAT_FLOAT 0x17 /**< IEEE-11073 32-bit FLOAT. */ |
Vincent Coubard |
638:c90ae1400bf2 | 150 | #define BLE_GATT_CPF_FORMAT_DUINT16 0x18 /**< IEEE-20601 format. */ |
Vincent Coubard |
638:c90ae1400bf2 | 151 | #define BLE_GATT_CPF_FORMAT_UTF8S 0x19 /**< UTF-8 string. */ |
Vincent Coubard |
638:c90ae1400bf2 | 152 | #define BLE_GATT_CPF_FORMAT_UTF16S 0x1A /**< UTF-16 string. */ |
Vincent Coubard |
638:c90ae1400bf2 | 153 | #define BLE_GATT_CPF_FORMAT_STRUCT 0x1B /**< Opaque Structure. */ |
Vincent Coubard |
638:c90ae1400bf2 | 154 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 155 | |
Vincent Coubard |
638:c90ae1400bf2 | 156 | /** @defgroup BLE_GATT_CPF_NAMESPACES GATT Bluetooth Namespaces |
Vincent Coubard |
638:c90ae1400bf2 | 157 | * @{ |
Vincent Coubard |
638:c90ae1400bf2 | 158 | */ |
Vincent Coubard |
638:c90ae1400bf2 | 159 | #define BLE_GATT_CPF_NAMESPACE_BTSIG 0x01 /**< Bluetooth SIG defined Namespace. */ |
Vincent Coubard |
638:c90ae1400bf2 | 160 | #define BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN 0x0000 /**< Namespace Description Unknown. */ |
Vincent Coubard |
638:c90ae1400bf2 | 161 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 162 | |
Vincent Coubard |
638:c90ae1400bf2 | 163 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 164 | |
Vincent Coubard |
638:c90ae1400bf2 | 165 | /** @addtogroup BLE_GATT_STRUCTURES Structures |
Vincent Coubard |
638:c90ae1400bf2 | 166 | * @{ */ |
Vincent Coubard |
638:c90ae1400bf2 | 167 | |
Vincent Coubard |
638:c90ae1400bf2 | 168 | /**@brief GATT Characteristic Properties. */ |
Vincent Coubard |
638:c90ae1400bf2 | 169 | typedef struct |
Vincent Coubard |
638:c90ae1400bf2 | 170 | { |
Vincent Coubard |
638:c90ae1400bf2 | 171 | /* Standard properties */ |
Vincent Coubard |
638:c90ae1400bf2 | 172 | uint8_t broadcast :1; /**< Broadcasting of the value permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 173 | uint8_t read :1; /**< Reading the value permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 174 | uint8_t write_wo_resp :1; /**< Writing the value with Write Command permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 175 | uint8_t write :1; /**< Writing the value with Write Request permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 176 | uint8_t notify :1; /**< Notications of the value permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 177 | uint8_t indicate :1; /**< Indications of the value permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 178 | uint8_t auth_signed_wr :1; /**< Writing the value with Signed Write Command permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 179 | } ble_gatt_char_props_t; |
Vincent Coubard |
638:c90ae1400bf2 | 180 | |
Vincent Coubard |
638:c90ae1400bf2 | 181 | /**@brief GATT Characteristic Extended Properties. */ |
Vincent Coubard |
638:c90ae1400bf2 | 182 | typedef struct |
Vincent Coubard |
638:c90ae1400bf2 | 183 | { |
Vincent Coubard |
638:c90ae1400bf2 | 184 | /* Extended properties */ |
Vincent Coubard |
638:c90ae1400bf2 | 185 | uint8_t reliable_wr :1; /**< Writing the value with Queued Write operations permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 186 | uint8_t wr_aux :1; /**< Writing the Characteristic User Description descriptor permitted. */ |
Vincent Coubard |
638:c90ae1400bf2 | 187 | } ble_gatt_char_ext_props_t; |
Vincent Coubard |
638:c90ae1400bf2 | 188 | |
Vincent Coubard |
638:c90ae1400bf2 | 189 | #endif // BLE_GATT_H__ |
Vincent Coubard |
638:c90ae1400bf2 | 190 | |
Vincent Coubard |
638:c90ae1400bf2 | 191 | /** @} */ |
Vincent Coubard |
638:c90ae1400bf2 | 192 | |
Vincent Coubard |
638:c90ae1400bf2 | 193 | /** |
Vincent Coubard |
638:c90ae1400bf2 | 194 | @} |
Vincent Coubard |
638:c90ae1400bf2 | 195 | @} |
Vincent Coubard |
638:c90ae1400bf2 | 196 | */ |