ver:init

Committer:
iv123
Date:
Sun Jun 18 16:11:03 2017 +0000
Revision:
0:4946262d6030
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
iv123 0:4946262d6030 1 /******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
iv123 0:4946262d6030 2 * File Name : bluenrg_aci_const.h
iv123 0:4946262d6030 3 * Author : AMS - AAS
iv123 0:4946262d6030 4 * Version : V1.0.0
iv123 0:4946262d6030 5 * Date : 26-Jun-2014
iv123 0:4946262d6030 6 * Description : Header file with ACI definitions for BlueNRG FW6.3.
iv123 0:4946262d6030 7 ********************************************************************************
iv123 0:4946262d6030 8 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
iv123 0:4946262d6030 9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
iv123 0:4946262d6030 10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
iv123 0:4946262d6030 11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
iv123 0:4946262d6030 12 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
iv123 0:4946262d6030 13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
iv123 0:4946262d6030 14 *******************************************************************************/
iv123 0:4946262d6030 15
iv123 0:4946262d6030 16 #ifndef __BLUENRG_ACI_CONST_H_
iv123 0:4946262d6030 17 #define __BLUENRG_ACI_CONST_H_
iv123 0:4946262d6030 18
iv123 0:4946262d6030 19 #include "ble_compiler.h"
iv123 0:4946262d6030 20 #include "ble_link_layer.h"
iv123 0:4946262d6030 21 #include "ble_hci_const.h"
iv123 0:4946262d6030 22 #include "bluenrg_gatt_server.h"
iv123 0:4946262d6030 23
iv123 0:4946262d6030 24 #ifndef DOXYGEN_SHOULD_SKIP_THIS
iv123 0:4946262d6030 25
iv123 0:4946262d6030 26 #define OCF_HAL_WRITE_CONFIG_DATA 0x000C
iv123 0:4946262d6030 27
iv123 0:4946262d6030 28 #define OCF_HAL_READ_CONFIG_DATA 0x000D
iv123 0:4946262d6030 29 typedef __packed struct _hal_read_config_data_cp{
iv123 0:4946262d6030 30 uint8_t offset;
iv123 0:4946262d6030 31 } PACKED hal_read_config_data_cp;
iv123 0:4946262d6030 32 #define HAL_READ_CONFIG_DATA_RP_SIZE 1
iv123 0:4946262d6030 33 typedef __packed struct _hal_read_config_data_rp{
iv123 0:4946262d6030 34 uint8_t status;
iv123 0:4946262d6030 35 uint8_t data[HCI_MAX_PAYLOAD_SIZE-HAL_READ_CONFIG_DATA_RP_SIZE];
iv123 0:4946262d6030 36 } PACKED hal_read_config_data_rp;
iv123 0:4946262d6030 37
iv123 0:4946262d6030 38 #define OCF_HAL_SET_TX_POWER_LEVEL 0x000F
iv123 0:4946262d6030 39 typedef __packed struct _hal_set_tx_power_level_cp{
iv123 0:4946262d6030 40 uint8_t en_high_power;
iv123 0:4946262d6030 41 uint8_t pa_level;
iv123 0:4946262d6030 42 } PACKED hal_set_tx_power_level_cp;
iv123 0:4946262d6030 43 #define HAL_SET_TX_POWER_LEVEL_CP_SIZE 2
iv123 0:4946262d6030 44
iv123 0:4946262d6030 45 #define OCF_HAL_DEVICE_STANDBY 0x0013
iv123 0:4946262d6030 46
iv123 0:4946262d6030 47 #define OCF_HAL_LE_TX_TEST_PACKET_NUMBER 0x0014
iv123 0:4946262d6030 48 typedef __packed struct _hal_le_tx_test_packet_number_rp{
iv123 0:4946262d6030 49 uint8_t status;
iv123 0:4946262d6030 50 uint32_t number_of_packets;
iv123 0:4946262d6030 51 } PACKED hal_le_tx_test_packet_number_rp;
iv123 0:4946262d6030 52
iv123 0:4946262d6030 53 #define OCF_HAL_TONE_START 0x0015
iv123 0:4946262d6030 54 typedef __packed struct _hal_tone_start_cp{
iv123 0:4946262d6030 55 uint8_t rf_channel;
iv123 0:4946262d6030 56 } PACKED hal_tone_start_cp;
iv123 0:4946262d6030 57 #define HAL_TONE_START_CP_SIZE 1
iv123 0:4946262d6030 58
iv123 0:4946262d6030 59 #define OCF_HAL_TONE_STOP 0x0016
iv123 0:4946262d6030 60
iv123 0:4946262d6030 61 #define OCF_UPDATER_START 0x0020
iv123 0:4946262d6030 62 #define OCF_UPDATER_REBOOT 0x0021
iv123 0:4946262d6030 63
iv123 0:4946262d6030 64 #define OCF_GET_UPDATER_VERSION 0x0022
iv123 0:4946262d6030 65 typedef __packed struct _get_updater_version_rp{
iv123 0:4946262d6030 66 uint8_t status;
iv123 0:4946262d6030 67 uint8_t version;
iv123 0:4946262d6030 68 } PACKED get_updater_version_rp;
iv123 0:4946262d6030 69 #define GET_UPDATER_VERSION_RP_SIZE 2
iv123 0:4946262d6030 70
iv123 0:4946262d6030 71 #define OCF_GET_UPDATER_BUFSIZE 0x0023
iv123 0:4946262d6030 72 typedef __packed struct _get_updater_bufsize_rp{
iv123 0:4946262d6030 73 uint8_t status;
iv123 0:4946262d6030 74 uint8_t buffer_size;
iv123 0:4946262d6030 75 } PACKED get_updater_bufsize_rp;
iv123 0:4946262d6030 76 #define GET_UPDATER_BUFSIZE_RP_SIZE 2
iv123 0:4946262d6030 77
iv123 0:4946262d6030 78 #define OCF_UPDATER_ERASE_BLUE_FLAG 0x0024
iv123 0:4946262d6030 79
iv123 0:4946262d6030 80 #define OCF_UPDATER_RESET_BLUE_FLAG 0x0025
iv123 0:4946262d6030 81
iv123 0:4946262d6030 82 #define OCF_UPDATER_ERASE_SECTOR 0x0026
iv123 0:4946262d6030 83 typedef __packed struct _updater_erase_sector_cp{
iv123 0:4946262d6030 84 uint32_t address;
iv123 0:4946262d6030 85 } PACKED updater_erase_sector_cp;
iv123 0:4946262d6030 86 #define UPDATER_ERASE_SECTOR_CP_SIZE 4
iv123 0:4946262d6030 87
iv123 0:4946262d6030 88 #define OCF_UPDATER_PROG_DATA_BLOCK 0x0027
iv123 0:4946262d6030 89 #define UPDATER_PROG_DATA_BLOCK_CP_SIZE 6
iv123 0:4946262d6030 90 typedef __packed struct _updater_prog_data_block_cp{
iv123 0:4946262d6030 91 uint32_t address;
iv123 0:4946262d6030 92 uint16_t data_len;
iv123 0:4946262d6030 93 uint8_t data[HCI_MAX_PAYLOAD_SIZE-UPDATER_PROG_DATA_BLOCK_CP_SIZE];
iv123 0:4946262d6030 94 } PACKED updater_prog_data_block_cp;
iv123 0:4946262d6030 95
iv123 0:4946262d6030 96 #define OCF_UPDATER_READ_DATA_BLOCK 0x0028
iv123 0:4946262d6030 97 typedef __packed struct _updater_read_data_block_cp{
iv123 0:4946262d6030 98 uint32_t address;
iv123 0:4946262d6030 99 uint16_t data_len;
iv123 0:4946262d6030 100 } PACKED updater_read_data_block_cp;
iv123 0:4946262d6030 101 #define UPDATER_READ_DATA_BLOCK_CP_SIZE 6
iv123 0:4946262d6030 102 typedef __packed struct _updater_read_data_block_rp{
iv123 0:4946262d6030 103 uint8_t status;
iv123 0:4946262d6030 104 uint8_t data[VARIABLE_SIZE];
iv123 0:4946262d6030 105 } PACKED updater_read_data_block_rp;
iv123 0:4946262d6030 106 #define GET_UPDATER_BUFSIZE_RP_SIZE 2
iv123 0:4946262d6030 107
iv123 0:4946262d6030 108 #define OCF_UPDATER_CALC_CRC 0x0029
iv123 0:4946262d6030 109 typedef __packed struct _updater_calc_crc_cp{
iv123 0:4946262d6030 110 uint32_t address;
iv123 0:4946262d6030 111 uint8_t num_sectors;
iv123 0:4946262d6030 112 } PACKED updater_calc_crc_cp;
iv123 0:4946262d6030 113 #define UPDATER_CALC_CRC_CP_SIZE 5
iv123 0:4946262d6030 114 typedef __packed struct _updater_calc_crc_rp{
iv123 0:4946262d6030 115 uint8_t status;
iv123 0:4946262d6030 116 uint32_t crc;
iv123 0:4946262d6030 117 } PACKED updater_calc_crc_rp;
iv123 0:4946262d6030 118 #define UPDATER_CALC_CRC_RP_SIZE 5
iv123 0:4946262d6030 119
iv123 0:4946262d6030 120 #define OCF_UPDATER_HW_VERSION 0x002A
iv123 0:4946262d6030 121 typedef __packed struct _updater_hw_version_rp{
iv123 0:4946262d6030 122 uint8_t status;
iv123 0:4946262d6030 123 uint8_t version;
iv123 0:4946262d6030 124 } PACKED updater_hw_version_rp;
iv123 0:4946262d6030 125 #define UPDATER_HW_VERSION_RP_SIZE 2
iv123 0:4946262d6030 126
iv123 0:4946262d6030 127 #define OCF_GAP_SET_NON_DISCOVERABLE 0x0081
iv123 0:4946262d6030 128
iv123 0:4946262d6030 129 #define OCF_GAP_SET_LIMITED_DISCOVERABLE 0x0082
iv123 0:4946262d6030 130
iv123 0:4946262d6030 131 #define OCF_GAP_SET_DISCOVERABLE 0x0083
iv123 0:4946262d6030 132
iv123 0:4946262d6030 133 #define OCF_GAP_SET_DIRECT_CONNECTABLE 0x0084
iv123 0:4946262d6030 134 typedef __packed struct _gap_set_direct_conectable_cp_IDB05A1{
iv123 0:4946262d6030 135 uint8_t own_bdaddr_type;
iv123 0:4946262d6030 136 uint8_t directed_adv_type;
iv123 0:4946262d6030 137 uint8_t direct_bdaddr_type;
iv123 0:4946262d6030 138 tBDAddr direct_bdaddr;
iv123 0:4946262d6030 139 } PACKED gap_set_direct_conectable_cp_IDB05A1;
iv123 0:4946262d6030 140
iv123 0:4946262d6030 141 typedef __packed struct _gap_set_direct_conectable_cp_IDB04A1{
iv123 0:4946262d6030 142 uint8_t own_bdaddr_type;
iv123 0:4946262d6030 143 uint8_t direct_bdaddr_type;
iv123 0:4946262d6030 144 tBDAddr direct_bdaddr;
iv123 0:4946262d6030 145 } PACKED gap_set_direct_conectable_cp_IDB04A1;
iv123 0:4946262d6030 146 #define GAP_SET_DIRECT_CONNECTABLE_CP_SIZE 8
iv123 0:4946262d6030 147
iv123 0:4946262d6030 148 #define OCF_GAP_SET_IO_CAPABILITY 0x0085
iv123 0:4946262d6030 149 typedef __packed struct _gap_set_io_capability_cp{
iv123 0:4946262d6030 150 uint8_t io_capability;
iv123 0:4946262d6030 151 } PACKED gap_set_io_capability_cp;
iv123 0:4946262d6030 152 #define GAP_SET_IO_CAPABILITY_CP_SIZE 1
iv123 0:4946262d6030 153
iv123 0:4946262d6030 154 #define OCF_GAP_SET_AUTH_REQUIREMENT 0x0086
iv123 0:4946262d6030 155 typedef __packed struct _gap_set_auth_requirement_cp{
iv123 0:4946262d6030 156 uint8_t mitm_mode;
iv123 0:4946262d6030 157 uint8_t oob_enable;
iv123 0:4946262d6030 158 uint8_t oob_data[16];
iv123 0:4946262d6030 159 uint8_t min_encryption_key_size;
iv123 0:4946262d6030 160 uint8_t max_encryption_key_size;
iv123 0:4946262d6030 161 uint8_t use_fixed_pin;
iv123 0:4946262d6030 162 uint32_t fixed_pin;
iv123 0:4946262d6030 163 uint8_t bonding_mode;
iv123 0:4946262d6030 164 } PACKED gap_set_auth_requirement_cp;
iv123 0:4946262d6030 165 #define GAP_SET_AUTH_REQUIREMENT_CP_SIZE 26
iv123 0:4946262d6030 166
iv123 0:4946262d6030 167 #define OCF_GAP_SET_AUTHOR_REQUIREMENT 0x0087
iv123 0:4946262d6030 168 typedef __packed struct _gap_set_author_requirement_cp{
iv123 0:4946262d6030 169 uint16_t conn_handle;
iv123 0:4946262d6030 170 uint8_t authorization_enable;
iv123 0:4946262d6030 171 } PACKED gap_set_author_requirement_cp;
iv123 0:4946262d6030 172 #define GAP_SET_AUTHOR_REQUIREMENT_CP_SIZE 3
iv123 0:4946262d6030 173
iv123 0:4946262d6030 174 #define OCF_GAP_PASSKEY_RESPONSE 0x0088
iv123 0:4946262d6030 175 typedef __packed struct _gap_passkey_response_cp{
iv123 0:4946262d6030 176 uint16_t conn_handle;
iv123 0:4946262d6030 177 uint32_t passkey;
iv123 0:4946262d6030 178 } PACKED gap_passkey_response_cp;
iv123 0:4946262d6030 179 #define GAP_PASSKEY_RESPONSE_CP_SIZE 6
iv123 0:4946262d6030 180
iv123 0:4946262d6030 181 #define OCF_GAP_AUTHORIZATION_RESPONSE 0x0089
iv123 0:4946262d6030 182 typedef __packed struct _gap_authorization_response_cp{
iv123 0:4946262d6030 183 uint16_t conn_handle;
iv123 0:4946262d6030 184 uint8_t authorize;
iv123 0:4946262d6030 185 } PACKED gap_authorization_response_cp;
iv123 0:4946262d6030 186 #define GAP_AUTHORIZATION_RESPONSE_CP_SIZE 3
iv123 0:4946262d6030 187
iv123 0:4946262d6030 188 #define OCF_GAP_INIT 0x008A
iv123 0:4946262d6030 189 typedef __packed struct _gap_init_cp_IDB05A1{
iv123 0:4946262d6030 190 uint8_t role;
iv123 0:4946262d6030 191 uint8_t privacy_enabled;
iv123 0:4946262d6030 192 uint8_t device_name_char_len;
iv123 0:4946262d6030 193 } PACKED gap_init_cp_IDB05A1;
iv123 0:4946262d6030 194 #define GAP_INIT_CP_SIZE_IDB05A1 3
iv123 0:4946262d6030 195
iv123 0:4946262d6030 196 typedef __packed struct _gap_init_cp_IDB04A1{
iv123 0:4946262d6030 197 uint8_t role;
iv123 0:4946262d6030 198 } PACKED gap_init_cp_IDB04A1;
iv123 0:4946262d6030 199 #define GAP_INIT_CP_SIZE_IDB04A1 1
iv123 0:4946262d6030 200 typedef __packed struct _gap_init_rp{
iv123 0:4946262d6030 201 uint8_t status;
iv123 0:4946262d6030 202 uint16_t service_handle;
iv123 0:4946262d6030 203 uint16_t dev_name_char_handle;
iv123 0:4946262d6030 204 uint16_t appearance_char_handle;
iv123 0:4946262d6030 205 } PACKED gap_init_rp;
iv123 0:4946262d6030 206 #define GAP_INIT_RP_SIZE 7
iv123 0:4946262d6030 207
iv123 0:4946262d6030 208 #define OCF_GAP_SET_NON_CONNECTABLE 0x008B
iv123 0:4946262d6030 209 typedef __packed struct _gap_set_non_connectable_cp_IDB05A1{
iv123 0:4946262d6030 210 uint8_t advertising_event_type;
iv123 0:4946262d6030 211 uint8_t own_address_type;
iv123 0:4946262d6030 212 #endif
iv123 0:4946262d6030 213 } PACKED gap_set_non_connectable_cp_IDB05A1;
iv123 0:4946262d6030 214
iv123 0:4946262d6030 215 typedef __packed struct _gap_set_non_connectable_cp_IDB04A1{
iv123 0:4946262d6030 216 uint8_t advertising_event_type;
iv123 0:4946262d6030 217 } PACKED gap_set_non_connectable_cp_IDB04A1;
iv123 0:4946262d6030 218
iv123 0:4946262d6030 219 #define OCF_GAP_SET_UNDIRECTED_CONNECTABLE 0x008C
iv123 0:4946262d6030 220 typedef __packed struct _gap_set_undirected_connectable_cp{
iv123 0:4946262d6030 221 uint8_t adv_filter_policy;
iv123 0:4946262d6030 222 uint8_t own_addr_type;
iv123 0:4946262d6030 223 } PACKED gap_set_undirected_connectable_cp;
iv123 0:4946262d6030 224 #define GAP_SET_UNDIRECTED_CONNECTABLE_CP_SIZE 2
iv123 0:4946262d6030 225
iv123 0:4946262d6030 226 #define OCF_GAP_SLAVE_SECURITY_REQUEST 0x008D
iv123 0:4946262d6030 227 typedef __packed struct _gap_slave_security_request_cp{
iv123 0:4946262d6030 228 uint16_t conn_handle;
iv123 0:4946262d6030 229 uint8_t bonding;
iv123 0:4946262d6030 230 uint8_t mitm_protection;
iv123 0:4946262d6030 231 } PACKED gap_slave_security_request_cp;
iv123 0:4946262d6030 232 #define GAP_SLAVE_SECURITY_REQUEST_CP_SIZE 4
iv123 0:4946262d6030 233
iv123 0:4946262d6030 234 #define OCF_GAP_UPDATE_ADV_DATA 0x008E
iv123 0:4946262d6030 235
iv123 0:4946262d6030 236 #define OCF_GAP_DELETE_AD_TYPE 0x008F
iv123 0:4946262d6030 237 typedef __packed struct _gap_delete_ad_type_cp{
iv123 0:4946262d6030 238 uint8_t ad_type;
iv123 0:4946262d6030 239 } PACKED gap_delete_ad_type_cp;
iv123 0:4946262d6030 240 #define GAP_DELETE_AD_TYPE_CP_SIZE 1
iv123 0:4946262d6030 241
iv123 0:4946262d6030 242 #define OCF_GAP_GET_SECURITY_LEVEL 0x0090
iv123 0:4946262d6030 243 typedef __packed struct _gap_get_security_level_rp{
iv123 0:4946262d6030 244 uint8_t status;
iv123 0:4946262d6030 245 uint8_t mitm_protection;
iv123 0:4946262d6030 246 uint8_t bonding;
iv123 0:4946262d6030 247 uint8_t oob_data;
iv123 0:4946262d6030 248 uint8_t passkey_required;
iv123 0:4946262d6030 249 } PACKED gap_get_security_level_rp;
iv123 0:4946262d6030 250 #define GAP_GET_SECURITY_LEVEL_RP_SIZE 5
iv123 0:4946262d6030 251
iv123 0:4946262d6030 252 #define OCF_GAP_SET_EVT_MASK 0x0091
iv123 0:4946262d6030 253 typedef __packed struct _gap_set_evt_mask_cp{
iv123 0:4946262d6030 254 uint16_t evt_mask;
iv123 0:4946262d6030 255 } PACKED gap_set_evt_mask_cp;
iv123 0:4946262d6030 256 #define GAP_SET_EVT_MASK_CP_SIZE 2
iv123 0:4946262d6030 257
iv123 0:4946262d6030 258 #define OCF_GAP_CONFIGURE_WHITELIST 0x0092
iv123 0:4946262d6030 259
iv123 0:4946262d6030 260 #define OCF_GAP_TERMINATE 0x0093
iv123 0:4946262d6030 261 typedef __packed struct _gap_terminate_cp{
iv123 0:4946262d6030 262 uint16_t handle;
iv123 0:4946262d6030 263 uint8_t reason;
iv123 0:4946262d6030 264 } PACKED gap_terminate_cp;
iv123 0:4946262d6030 265 #define GAP_TERMINATE_CP_SIZE 3
iv123 0:4946262d6030 266
iv123 0:4946262d6030 267 #define OCF_GAP_CLEAR_SECURITY_DB 0x0094
iv123 0:4946262d6030 268
iv123 0:4946262d6030 269 #define OCF_GAP_ALLOW_REBOND_DB 0x0095
iv123 0:4946262d6030 270
iv123 0:4946262d6030 271 typedef __packed struct _gap_allow_rebond_cp_IDB05A1{
iv123 0:4946262d6030 272 uint16_t conn_handle;
iv123 0:4946262d6030 273 } PACKED gap_allow_rebond_cp_IDB05A1;
iv123 0:4946262d6030 274
iv123 0:4946262d6030 275 #define OCF_GAP_START_LIMITED_DISCOVERY_PROC 0x0096
iv123 0:4946262d6030 276 typedef __packed struct _gap_start_limited_discovery_proc_cp{
iv123 0:4946262d6030 277 uint16_t scanInterval;
iv123 0:4946262d6030 278 uint16_t scanWindow;
iv123 0:4946262d6030 279 uint8_t own_address_type;
iv123 0:4946262d6030 280 uint8_t filterDuplicates;
iv123 0:4946262d6030 281 } PACKED gap_start_limited_discovery_proc_cp;
iv123 0:4946262d6030 282 #define GAP_START_LIMITED_DISCOVERY_PROC_CP_SIZE 6
iv123 0:4946262d6030 283
iv123 0:4946262d6030 284 #define OCF_GAP_START_GENERAL_DISCOVERY_PROC 0x0097
iv123 0:4946262d6030 285 typedef __packed struct _gap_start_general_discovery_proc_cp{
iv123 0:4946262d6030 286 uint16_t scanInterval;
iv123 0:4946262d6030 287 uint16_t scanWindow;
iv123 0:4946262d6030 288 uint8_t own_address_type;
iv123 0:4946262d6030 289 uint8_t filterDuplicates;
iv123 0:4946262d6030 290 } PACKED gap_start_general_discovery_proc_cp;
iv123 0:4946262d6030 291 #define GAP_START_GENERAL_DISCOVERY_PROC_CP_SIZE 6
iv123 0:4946262d6030 292
iv123 0:4946262d6030 293 #define OCF_GAP_START_NAME_DISCOVERY_PROC 0x0098
iv123 0:4946262d6030 294 typedef __packed struct _gap_start_name_discovery_proc_cp{
iv123 0:4946262d6030 295 uint16_t scanInterval;
iv123 0:4946262d6030 296 uint16_t scanWindow;
iv123 0:4946262d6030 297 uint8_t peer_bdaddr_type;
iv123 0:4946262d6030 298 tBDAddr peer_bdaddr;
iv123 0:4946262d6030 299 uint8_t own_bdaddr_type;
iv123 0:4946262d6030 300 uint16_t conn_min_interval;
iv123 0:4946262d6030 301 uint16_t conn_max_interval;
iv123 0:4946262d6030 302 uint16_t conn_latency;
iv123 0:4946262d6030 303 uint16_t supervision_timeout;
iv123 0:4946262d6030 304 uint16_t min_conn_length;
iv123 0:4946262d6030 305 uint16_t max_conn_length;
iv123 0:4946262d6030 306 } PACKED gap_start_name_discovery_proc_cp;
iv123 0:4946262d6030 307 #define GAP_START_NAME_DISCOVERY_PROC_CP_SIZE 24
iv123 0:4946262d6030 308
iv123 0:4946262d6030 309 #define OCF_GAP_START_AUTO_CONN_ESTABLISH_PROC 0x0099
iv123 0:4946262d6030 310
iv123 0:4946262d6030 311 #define OCF_GAP_START_GENERAL_CONN_ESTABLISH_PROC 0x009A
iv123 0:4946262d6030 312 typedef __packed struct _gap_start_general_conn_establish_proc_cp_IDB05A1{
iv123 0:4946262d6030 313 uint8_t scan_type;
iv123 0:4946262d6030 314 uint16_t scan_interval;
iv123 0:4946262d6030 315 uint16_t scan_window;
iv123 0:4946262d6030 316 uint8_t own_address_type;
iv123 0:4946262d6030 317 uint8_t filter_duplicates;
iv123 0:4946262d6030 318 } PACKED gap_start_general_conn_establish_proc_cp_IDB05A1;
iv123 0:4946262d6030 319
iv123 0:4946262d6030 320 typedef __packed struct _gap_start_general_conn_establish_proc_cp_IDB04A1{
iv123 0:4946262d6030 321 uint8_t scan_type;
iv123 0:4946262d6030 322 uint16_t scan_interval;
iv123 0:4946262d6030 323 uint16_t scan_window;
iv123 0:4946262d6030 324 uint8_t own_address_type;
iv123 0:4946262d6030 325 uint8_t filter_duplicates;
iv123 0:4946262d6030 326 uint8_t use_reconn_addr;
iv123 0:4946262d6030 327 tBDAddr reconn_addr;
iv123 0:4946262d6030 328 } PACKED gap_start_general_conn_establish_proc_cp_IDB04A1;
iv123 0:4946262d6030 329
iv123 0:4946262d6030 330 #define OCF_GAP_START_SELECTIVE_CONN_ESTABLISH_PROC 0x009B
iv123 0:4946262d6030 331 #define GAP_START_SELECTIVE_CONN_ESTABLISH_PROC_CP_SIZE 8
iv123 0:4946262d6030 332 typedef __packed struct _gap_start_selective_conn_establish_proc_cp{
iv123 0:4946262d6030 333 uint8_t scan_type;
iv123 0:4946262d6030 334 uint16_t scan_interval;
iv123 0:4946262d6030 335 uint16_t scan_window;
iv123 0:4946262d6030 336 uint8_t own_address_type;
iv123 0:4946262d6030 337 uint8_t filter_duplicates;
iv123 0:4946262d6030 338 uint8_t num_whitelist_entries;
iv123 0:4946262d6030 339 uint8_t addr_array[HCI_MAX_PAYLOAD_SIZE-GAP_START_SELECTIVE_CONN_ESTABLISH_PROC_CP_SIZE];
iv123 0:4946262d6030 340 } PACKED gap_start_selective_conn_establish_proc_cp;
iv123 0:4946262d6030 341
iv123 0:4946262d6030 342 #define OCF_GAP_CREATE_CONNECTION 0x009C
iv123 0:4946262d6030 343 typedef __packed struct _gap_create_connection_cp{
iv123 0:4946262d6030 344 uint16_t scanInterval;
iv123 0:4946262d6030 345 uint16_t scanWindow;
iv123 0:4946262d6030 346 uint8_t peer_bdaddr_type;
iv123 0:4946262d6030 347 tBDAddr peer_bdaddr;
iv123 0:4946262d6030 348 uint8_t own_bdaddr_type;
iv123 0:4946262d6030 349 uint16_t conn_min_interval;
iv123 0:4946262d6030 350 uint16_t conn_max_interval;
iv123 0:4946262d6030 351 uint16_t conn_latency;
iv123 0:4946262d6030 352 uint16_t supervision_timeout;
iv123 0:4946262d6030 353 uint16_t min_conn_length;
iv123 0:4946262d6030 354 uint16_t max_conn_length;
iv123 0:4946262d6030 355 } PACKED gap_create_connection_cp;
iv123 0:4946262d6030 356 #define GAP_CREATE_CONNECTION_CP_SIZE 24
iv123 0:4946262d6030 357
iv123 0:4946262d6030 358 #define OCF_GAP_TERMINATE_GAP_PROCEDURE 0x009D
iv123 0:4946262d6030 359
iv123 0:4946262d6030 360 #define OCF_GAP_START_CONNECTION_UPDATE 0x009E
iv123 0:4946262d6030 361 typedef __packed struct _gap_start_connection_update_cp{
iv123 0:4946262d6030 362 uint16_t conn_handle;
iv123 0:4946262d6030 363 uint16_t conn_min_interval;
iv123 0:4946262d6030 364 uint16_t conn_max_interval;
iv123 0:4946262d6030 365 uint16_t conn_latency;
iv123 0:4946262d6030 366 uint16_t supervision_timeout;
iv123 0:4946262d6030 367 uint16_t min_conn_length;
iv123 0:4946262d6030 368 uint16_t max_conn_length;
iv123 0:4946262d6030 369 } PACKED gap_start_connection_update_cp;
iv123 0:4946262d6030 370 #define GAP_START_CONNECTION_UPDATE_CP_SIZE 14
iv123 0:4946262d6030 371
iv123 0:4946262d6030 372 #define OCF_GAP_SEND_PAIRING_REQUEST 0x009F
iv123 0:4946262d6030 373 typedef __packed struct _gap_send_pairing_request_cp{
iv123 0:4946262d6030 374 uint16_t conn_handle;
iv123 0:4946262d6030 375 uint8_t force_rebond;
iv123 0:4946262d6030 376 } PACKED gap_send_pairing_request_cp;
iv123 0:4946262d6030 377 #define GAP_GAP_SEND_PAIRING_REQUEST_CP_SIZE 3
iv123 0:4946262d6030 378
iv123 0:4946262d6030 379 #define OCF_GAP_RESOLVE_PRIVATE_ADDRESS 0x00A0
iv123 0:4946262d6030 380 typedef __packed struct _gap_resolve_private_address_cp{
iv123 0:4946262d6030 381 tBDAddr address;
iv123 0:4946262d6030 382 } PACKED gap_resolve_private_address_cp;
iv123 0:4946262d6030 383 #define GAP_RESOLVE_PRIVATE_ADDRESS_CP_SIZE 6
iv123 0:4946262d6030 384 typedef __packed struct _gap_resolve_private_address_rp{
iv123 0:4946262d6030 385 uint8_t status;
iv123 0:4946262d6030 386 tBDAddr address;
iv123 0:4946262d6030 387 } PACKED gap_resolve_private_address_rp;
iv123 0:4946262d6030 388
iv123 0:4946262d6030 389 #define OCF_GAP_SET_BROADCAST_MODE 0x00A1
iv123 0:4946262d6030 390 #define GAP_SET_BROADCAST_MODE_CP_SIZE 6
iv123 0:4946262d6030 391 typedef __packed struct _gap_set_broadcast_mode_cp{
iv123 0:4946262d6030 392 uint16_t adv_interv_min;
iv123 0:4946262d6030 393 uint16_t adv_interv_max;
iv123 0:4946262d6030 394 uint8_t adv_type;
iv123 0:4946262d6030 395 uint8_t own_addr_type;
iv123 0:4946262d6030 396 uint8_t var_len_data[HCI_MAX_PAYLOAD_SIZE-GAP_SET_BROADCAST_MODE_CP_SIZE];
iv123 0:4946262d6030 397 } PACKED gap_set_broadcast_mode_cp;
iv123 0:4946262d6030 398
iv123 0:4946262d6030 399 #define OCF_GAP_START_OBSERVATION_PROC 0x00A2
iv123 0:4946262d6030 400 typedef __packed struct _gap_start_observation_proc_cp{
iv123 0:4946262d6030 401 uint16_t scan_interval;
iv123 0:4946262d6030 402 uint16_t scan_window;
iv123 0:4946262d6030 403 uint8_t scan_type;
iv123 0:4946262d6030 404 uint8_t own_address_type;
iv123 0:4946262d6030 405 uint8_t filter_duplicates;
iv123 0:4946262d6030 406 } PACKED gap_start_observation_proc_cp;
iv123 0:4946262d6030 407
iv123 0:4946262d6030 408 #define OCF_GAP_GET_BONDED_DEVICES 0x00A3
iv123 0:4946262d6030 409 typedef __packed struct _gap_get_bonded_devices_rp{
iv123 0:4946262d6030 410 uint8_t status;
iv123 0:4946262d6030 411 uint8_t num_addr;
iv123 0:4946262d6030 412 uint8_t dev_list[HCI_MAX_PAYLOAD_SIZE-HCI_EVENT_HDR_SIZE-EVT_CMD_COMPLETE_SIZE-1];
iv123 0:4946262d6030 413 } PACKED gap_get_bonded_devices_rp;
iv123 0:4946262d6030 414
iv123 0:4946262d6030 415 #define OCF_GAP_IS_DEVICE_BONDED 0x00A4
iv123 0:4946262d6030 416 typedef __packed struct _gap_is_device_bonded_cp{
iv123 0:4946262d6030 417 uint8_t peer_address_type;
iv123 0:4946262d6030 418 tBDAddr peer_address;
iv123 0:4946262d6030 419 } PACKED gap_is_device_bonded_cp;
iv123 0:4946262d6030 420
iv123 0:4946262d6030 421
iv123 0:4946262d6030 422 #define OCF_GATT_INIT 0x0101
iv123 0:4946262d6030 423
iv123 0:4946262d6030 424 #define OCF_GATT_ADD_SERV 0x0102
iv123 0:4946262d6030 425 typedef __packed struct _gatt_add_serv_rp{
iv123 0:4946262d6030 426 uint8_t status;
iv123 0:4946262d6030 427 uint16_t handle;
iv123 0:4946262d6030 428 } PACKED gatt_add_serv_rp;
iv123 0:4946262d6030 429 #define GATT_ADD_SERV_RP_SIZE 3
iv123 0:4946262d6030 430
iv123 0:4946262d6030 431 #define OCF_GATT_INCLUDE_SERV 0x0103
iv123 0:4946262d6030 432 typedef __packed struct _gatt_include_serv_rp{
iv123 0:4946262d6030 433 uint8_t status;
iv123 0:4946262d6030 434 uint16_t handle;
iv123 0:4946262d6030 435 } PACKED gatt_include_serv_rp;
iv123 0:4946262d6030 436 #define GATT_INCLUDE_SERV_RP_SIZE 3
iv123 0:4946262d6030 437
iv123 0:4946262d6030 438 #define OCF_GATT_ADD_CHAR 0x0104
iv123 0:4946262d6030 439 typedef __packed struct _gatt_add_char_rp{
iv123 0:4946262d6030 440 uint8_t status;
iv123 0:4946262d6030 441 uint16_t handle;
iv123 0:4946262d6030 442 } PACKED gatt_add_char_rp;
iv123 0:4946262d6030 443 #define GATT_ADD_CHAR_RP_SIZE 3
iv123 0:4946262d6030 444
iv123 0:4946262d6030 445 #define OCF_GATT_ADD_CHAR_DESC 0x0105
iv123 0:4946262d6030 446 typedef __packed struct _gatt_add_char_desc_rp{
iv123 0:4946262d6030 447 uint8_t status;
iv123 0:4946262d6030 448 uint16_t handle;
iv123 0:4946262d6030 449 } PACKED gatt_add_char_desc_rp;
iv123 0:4946262d6030 450 #define GATT_ADD_CHAR_DESC_RP_SIZE 3
iv123 0:4946262d6030 451
iv123 0:4946262d6030 452 #define OCF_GATT_UPD_CHAR_VAL 0x0106
iv123 0:4946262d6030 453
iv123 0:4946262d6030 454 #define OCF_GATT_DEL_CHAR 0x0107
iv123 0:4946262d6030 455 typedef __packed struct _gatt_del_char_cp{
iv123 0:4946262d6030 456 uint16_t service_handle;
iv123 0:4946262d6030 457 uint16_t char_handle;
iv123 0:4946262d6030 458 } PACKED gatt_del_char_cp;
iv123 0:4946262d6030 459 #define GATT_DEL_CHAR_CP_SIZE 4
iv123 0:4946262d6030 460
iv123 0:4946262d6030 461 #define OCF_GATT_DEL_SERV 0x0108
iv123 0:4946262d6030 462 typedef __packed struct _gatt_del_serv_cp{
iv123 0:4946262d6030 463 uint16_t service_handle;
iv123 0:4946262d6030 464 } PACKED gatt_del_serv_cp;
iv123 0:4946262d6030 465 #define GATT_DEL_SERV_CP_SIZE 2
iv123 0:4946262d6030 466
iv123 0:4946262d6030 467 #define OCF_GATT_DEL_INC_SERV 0x0109
iv123 0:4946262d6030 468 typedef __packed struct _gatt_del_inc_serv_cp{
iv123 0:4946262d6030 469 uint16_t service_handle;
iv123 0:4946262d6030 470 uint16_t inc_serv_handle;
iv123 0:4946262d6030 471 } PACKED gatt_del_inc_serv_cp;
iv123 0:4946262d6030 472 #define GATT_DEL_INC_SERV_CP_SIZE 4
iv123 0:4946262d6030 473
iv123 0:4946262d6030 474 #define OCF_GATT_SET_EVT_MASK 0x010A
iv123 0:4946262d6030 475 typedef __packed struct _gatt_set_evt_mask_cp{
iv123 0:4946262d6030 476 uint32_t evt_mask;
iv123 0:4946262d6030 477 } PACKED gatt_set_evt_mask_cp;
iv123 0:4946262d6030 478 #define GATT_SET_EVT_MASK_CP_SIZE 4
iv123 0:4946262d6030 479
iv123 0:4946262d6030 480 #define OCF_GATT_EXCHANGE_CONFIG 0x010B
iv123 0:4946262d6030 481 typedef __packed struct _gatt_exchange_config_cp{
iv123 0:4946262d6030 482 uint16_t conn_handle;
iv123 0:4946262d6030 483 } PACKED gatt_exchange_config_cp;
iv123 0:4946262d6030 484 #define GATT_EXCHANGE_CONFIG_CP_SIZE 2
iv123 0:4946262d6030 485
iv123 0:4946262d6030 486 #define OCF_ATT_FIND_INFO_REQ 0x010C
iv123 0:4946262d6030 487 typedef __packed struct _att_find_info_req_cp{
iv123 0:4946262d6030 488 uint16_t conn_handle;
iv123 0:4946262d6030 489 uint16_t start_handle;
iv123 0:4946262d6030 490 uint16_t end_handle;
iv123 0:4946262d6030 491 } PACKED att_find_info_req_cp;
iv123 0:4946262d6030 492 #define ATT_FIND_INFO_REQ_CP_SIZE 6
iv123 0:4946262d6030 493
iv123 0:4946262d6030 494 #define OCF_ATT_FIND_BY_TYPE_VALUE_REQ 0x010D
iv123 0:4946262d6030 495 #define ATT_FIND_BY_TYPE_VALUE_REQ_CP_SIZE 9
iv123 0:4946262d6030 496 typedef __packed struct _att_find_by_type_value_req_cp{
iv123 0:4946262d6030 497 uint16_t conn_handle;
iv123 0:4946262d6030 498 uint16_t start_handle;
iv123 0:4946262d6030 499 uint16_t end_handle;
iv123 0:4946262d6030 500 uint8_t uuid[2];
iv123 0:4946262d6030 501 uint8_t attr_val_len;
iv123 0:4946262d6030 502 uint8_t attr_val[ATT_MTU - 7];
iv123 0:4946262d6030 503 } PACKED att_find_by_type_value_req_cp;
iv123 0:4946262d6030 504
iv123 0:4946262d6030 505 #define OCF_ATT_READ_BY_TYPE_REQ 0x010E
iv123 0:4946262d6030 506 #define ATT_READ_BY_TYPE_REQ_CP_SIZE 7 // without UUID
iv123 0:4946262d6030 507 typedef __packed struct _att_read_by_type_req_cp{
iv123 0:4946262d6030 508 uint16_t conn_handle;
iv123 0:4946262d6030 509 uint16_t start_handle;
iv123 0:4946262d6030 510 uint16_t end_handle;
iv123 0:4946262d6030 511 uint8_t uuid_type;
iv123 0:4946262d6030 512 uint8_t uuid[16];
iv123 0:4946262d6030 513 } PACKED att_read_by_type_req_cp;
iv123 0:4946262d6030 514
iv123 0:4946262d6030 515 #define OCF_ATT_READ_BY_GROUP_TYPE_REQ 0x010F
iv123 0:4946262d6030 516 #define ATT_READ_BY_GROUP_TYPE_REQ_CP_SIZE 7 // without UUID
iv123 0:4946262d6030 517 typedef __packed struct _att_read_by_group_type_req_cp{
iv123 0:4946262d6030 518 uint16_t conn_handle;
iv123 0:4946262d6030 519 uint16_t start_handle;
iv123 0:4946262d6030 520 uint16_t end_handle;
iv123 0:4946262d6030 521 uint8_t uuid_type;
iv123 0:4946262d6030 522 uint8_t uuid[16];
iv123 0:4946262d6030 523 } PACKED att_read_by_group_type_req_cp;
iv123 0:4946262d6030 524
iv123 0:4946262d6030 525 #define OCF_ATT_PREPARE_WRITE_REQ 0x0110
iv123 0:4946262d6030 526 #define ATT_PREPARE_WRITE_REQ_CP_SIZE 7 // without attr_val
iv123 0:4946262d6030 527 typedef __packed struct _att_prepare_write_req_cp{
iv123 0:4946262d6030 528 uint16_t conn_handle;
iv123 0:4946262d6030 529 uint16_t attr_handle;
iv123 0:4946262d6030 530 uint16_t value_offset;
iv123 0:4946262d6030 531 uint8_t attr_val_len;
iv123 0:4946262d6030 532 uint8_t attr_val[ATT_MTU-5];
iv123 0:4946262d6030 533 } PACKED att_prepare_write_req_cp;
iv123 0:4946262d6030 534
iv123 0:4946262d6030 535 #define OCF_ATT_EXECUTE_WRITE_REQ 0x0111
iv123 0:4946262d6030 536 typedef __packed struct _att_execute_write_req_cp{
iv123 0:4946262d6030 537 uint16_t conn_handle;
iv123 0:4946262d6030 538 uint8_t execute;
iv123 0:4946262d6030 539 } PACKED att_execute_write_req_cp;
iv123 0:4946262d6030 540 #define ATT_EXECUTE_WRITE_REQ_CP_SIZE 3
iv123 0:4946262d6030 541
iv123 0:4946262d6030 542 #define OCF_GATT_DISC_ALL_PRIM_SERVICES 0X0112
iv123 0:4946262d6030 543 typedef __packed struct _gatt_disc_all_prim_serivces_cp{
iv123 0:4946262d6030 544 uint16_t conn_handle;
iv123 0:4946262d6030 545 } PACKED gatt_disc_all_prim_services_cp;
iv123 0:4946262d6030 546 #define GATT_DISC_ALL_PRIM_SERVICES_CP_SIZE 2
iv123 0:4946262d6030 547
iv123 0:4946262d6030 548 #define OCF_GATT_DISC_PRIM_SERVICE_BY_UUID 0x0113
iv123 0:4946262d6030 549 typedef __packed struct _gatt_disc_prim_service_by_uuid_cp{
iv123 0:4946262d6030 550 uint16_t conn_handle;
iv123 0:4946262d6030 551 uint8_t uuid_type;
iv123 0:4946262d6030 552 uint8_t uuid[16];
iv123 0:4946262d6030 553 } PACKED gatt_disc_prim_service_by_uuid_cp;
iv123 0:4946262d6030 554 #define GATT_DISC_PRIM_SERVICE_BY_UUID_CP_SIZE 3 // Without uuid
iv123 0:4946262d6030 555
iv123 0:4946262d6030 556 #define OCF_GATT_FIND_INCLUDED_SERVICES 0X0114
iv123 0:4946262d6030 557 typedef __packed struct _gatt_disc_find_included_services_cp{
iv123 0:4946262d6030 558 uint16_t conn_handle;
iv123 0:4946262d6030 559 uint16_t start_handle;
iv123 0:4946262d6030 560 uint16_t end_handle;
iv123 0:4946262d6030 561 } PACKED gatt_find_included_services_cp;
iv123 0:4946262d6030 562 #define GATT_FIND_INCLUDED_SERVICES_CP_SIZE 6
iv123 0:4946262d6030 563
iv123 0:4946262d6030 564 #define OCF_GATT_DISC_ALL_CHARAC_OF_SERV 0X0115
iv123 0:4946262d6030 565 typedef __packed struct _gatt_disc_all_charac_of_serv_cp{
iv123 0:4946262d6030 566 uint16_t conn_handle;
iv123 0:4946262d6030 567 uint16_t start_attr_handle;
iv123 0:4946262d6030 568 uint16_t end_attr_handle;
iv123 0:4946262d6030 569 } PACKED gatt_disc_all_charac_of_serv_cp;
iv123 0:4946262d6030 570 #define GATT_DISC_ALL_CHARAC_OF_SERV_CP_SIZE 6
iv123 0:4946262d6030 571
iv123 0:4946262d6030 572 #define OCF_GATT_DISC_CHARAC_BY_UUID 0X0116
iv123 0:4946262d6030 573
iv123 0:4946262d6030 574 #define OCF_GATT_DISC_ALL_CHARAC_DESCRIPTORS 0X0117
iv123 0:4946262d6030 575 typedef __packed struct _gatt_disc_all_charac_descriptors_cp{
iv123 0:4946262d6030 576 uint16_t conn_handle;
iv123 0:4946262d6030 577 uint16_t char_val_handle;
iv123 0:4946262d6030 578 uint16_t char_end_handle;
iv123 0:4946262d6030 579 } PACKED gatt_disc_all_charac_descriptors_cp;
iv123 0:4946262d6030 580 #define GATT_DISC_ALL_CHARAC_DESCRIPTORS_CP_SIZE 6
iv123 0:4946262d6030 581
iv123 0:4946262d6030 582 #define OCF_GATT_READ_CHARAC_VAL 0x0118
iv123 0:4946262d6030 583 typedef __packed struct _gatt_read_charac_val_cp{
iv123 0:4946262d6030 584 uint16_t conn_handle;
iv123 0:4946262d6030 585 uint16_t attr_handle;
iv123 0:4946262d6030 586 } PACKED gatt_read_charac_val_cp;
iv123 0:4946262d6030 587 #define GATT_READ_CHARAC_VAL_CP_SIZE 4
iv123 0:4946262d6030 588
iv123 0:4946262d6030 589 #define OCF_GATT_READ_USING_CHARAC_UUID 0x0109
iv123 0:4946262d6030 590 typedef __packed struct _gatt_read_using_charac_uuid_cp{
iv123 0:4946262d6030 591 uint16_t conn_handle;
iv123 0:4946262d6030 592 uint16_t start_handle;
iv123 0:4946262d6030 593 uint16_t end_handle;
iv123 0:4946262d6030 594 uint8_t uuid_type;
iv123 0:4946262d6030 595 uint8_t uuid[16];
iv123 0:4946262d6030 596 } PACKED gatt_read_using_charac_uuid_cp;
iv123 0:4946262d6030 597 #define GATT_READ_USING_CHARAC_UUID_CP_SIZE 7 // without UUID
iv123 0:4946262d6030 598
iv123 0:4946262d6030 599 #define OCF_GATT_READ_LONG_CHARAC_VAL 0x011A
iv123 0:4946262d6030 600 typedef __packed struct _gatt_read_long_charac_val_cp{
iv123 0:4946262d6030 601 uint16_t conn_handle;
iv123 0:4946262d6030 602 uint16_t attr_handle;
iv123 0:4946262d6030 603 uint16_t val_offset;
iv123 0:4946262d6030 604 } PACKED gatt_read_long_charac_val_cp;
iv123 0:4946262d6030 605 #define GATT_READ_LONG_CHARAC_VAL_CP_SIZE 6
iv123 0:4946262d6030 606
iv123 0:4946262d6030 607 #define OCF_GATT_READ_MULTIPLE_CHARAC_VAL 0x011B
iv123 0:4946262d6030 608 #define GATT_READ_MULTIPLE_CHARAC_VAL_CP_SIZE 3 // without set_of_handles
iv123 0:4946262d6030 609 typedef __packed struct _gatt_read_multiple_charac_val_cp{
iv123 0:4946262d6030 610 uint16_t conn_handle;
iv123 0:4946262d6030 611 uint8_t num_handles;
iv123 0:4946262d6030 612 uint8_t set_of_handles[HCI_MAX_PAYLOAD_SIZE-GATT_READ_MULTIPLE_CHARAC_VAL_CP_SIZE];
iv123 0:4946262d6030 613 } PACKED gatt_read_multiple_charac_val_cp;
iv123 0:4946262d6030 614
iv123 0:4946262d6030 615 #define OCF_GATT_WRITE_CHAR_VALUE 0x011C
iv123 0:4946262d6030 616
iv123 0:4946262d6030 617 #define OCF_GATT_WRITE_LONG_CHARAC_VAL 0x011D
iv123 0:4946262d6030 618 #define GATT_WRITE_LONG_CHARAC_VAL_CP_SIZE 7 // without set_of_handles
iv123 0:4946262d6030 619 typedef __packed struct _gatt_write_long_charac_val_cp{
iv123 0:4946262d6030 620 uint16_t conn_handle;
iv123 0:4946262d6030 621 uint16_t attr_handle;
iv123 0:4946262d6030 622 uint16_t val_offset;
iv123 0:4946262d6030 623 uint8_t val_len;
iv123 0:4946262d6030 624 uint8_t attr_val[HCI_MAX_PAYLOAD_SIZE-GATT_WRITE_LONG_CHARAC_VAL_CP_SIZE];
iv123 0:4946262d6030 625 } PACKED gatt_write_long_charac_val_cp;
iv123 0:4946262d6030 626
iv123 0:4946262d6030 627 #define OCF_GATT_WRITE_CHARAC_RELIABLE 0x011E
iv123 0:4946262d6030 628 #define GATT_WRITE_CHARAC_RELIABLE_CP_SIZE 7 // without set_of_handles
iv123 0:4946262d6030 629 typedef __packed struct _gatt_write_charac_reliable_cp{
iv123 0:4946262d6030 630 uint16_t conn_handle;
iv123 0:4946262d6030 631 uint16_t attr_handle;
iv123 0:4946262d6030 632 uint16_t val_offset;
iv123 0:4946262d6030 633 uint8_t val_len;
iv123 0:4946262d6030 634 uint8_t attr_val[HCI_MAX_PAYLOAD_SIZE-GATT_WRITE_CHARAC_RELIABLE_CP_SIZE];
iv123 0:4946262d6030 635 } PACKED gatt_write_charac_reliable_cp;
iv123 0:4946262d6030 636
iv123 0:4946262d6030 637 #define OCF_GATT_WRITE_LONG_CHARAC_DESC 0x011F
iv123 0:4946262d6030 638 #define GATT_WRITE_LONG_CHARAC_DESC_CP_SIZE 7 // without set_of_handles
iv123 0:4946262d6030 639 typedef __packed struct _gatt_write_long_charac_desc_cp{
iv123 0:4946262d6030 640 uint16_t conn_handle;
iv123 0:4946262d6030 641 uint16_t attr_handle;
iv123 0:4946262d6030 642 uint16_t val_offset;
iv123 0:4946262d6030 643 uint8_t val_len;
iv123 0:4946262d6030 644 uint8_t attr_val[HCI_MAX_PAYLOAD_SIZE-GATT_WRITE_LONG_CHARAC_DESC_CP_SIZE];
iv123 0:4946262d6030 645 } PACKED gatt_write_long_charac_desc_cp;
iv123 0:4946262d6030 646
iv123 0:4946262d6030 647 #define OCF_GATT_READ_LONG_CHARAC_DESC 0x0120
iv123 0:4946262d6030 648 typedef __packed struct _gatt_read_long_charac_desc_cp{
iv123 0:4946262d6030 649 uint16_t conn_handle;
iv123 0:4946262d6030 650 uint16_t attr_handle;
iv123 0:4946262d6030 651 uint16_t val_offset;
iv123 0:4946262d6030 652 } PACKED gatt_read_long_charac_desc_cp;
iv123 0:4946262d6030 653 #define GATT_READ_LONG_CHARAC_DESC_CP_SIZE 6
iv123 0:4946262d6030 654
iv123 0:4946262d6030 655 #define OCF_GATT_WRITE_CHAR_DESCRIPTOR 0x0121
iv123 0:4946262d6030 656
iv123 0:4946262d6030 657 #define OCF_GATT_READ_CHAR_DESCRIPTOR 0x0122
iv123 0:4946262d6030 658 typedef __packed struct _gatt_read_charac_desc_cp{
iv123 0:4946262d6030 659 uint16_t conn_handle;
iv123 0:4946262d6030 660 uint16_t attr_handle;
iv123 0:4946262d6030 661 } PACKED gatt_read_charac_desc_cp;
iv123 0:4946262d6030 662 #define GATT_READ_CHAR_DESCRIPTOR_CP_SIZE 4
iv123 0:4946262d6030 663
iv123 0:4946262d6030 664 #define OCF_GATT_WRITE_WITHOUT_RESPONSE 0x0123
iv123 0:4946262d6030 665 #define GATT_WRITE_WITHOUT_RESPONSE_CP_SIZE 5 // without attr_val
iv123 0:4946262d6030 666 typedef __packed struct _gatt_write_without_resp_cp{
iv123 0:4946262d6030 667 uint16_t conn_handle;
iv123 0:4946262d6030 668 uint16_t attr_handle;
iv123 0:4946262d6030 669 uint8_t val_len;
iv123 0:4946262d6030 670 uint8_t attr_val[ATT_MTU - 3];
iv123 0:4946262d6030 671 } PACKED gatt_write_without_resp_cp;
iv123 0:4946262d6030 672
iv123 0:4946262d6030 673 #define OCF_GATT_SIGNED_WRITE_WITHOUT_RESPONSE 0x0124
iv123 0:4946262d6030 674 #define GATT_SIGNED_WRITE_WITHOUT_RESPONSE_CP_SIZE 5 // without attr_val
iv123 0:4946262d6030 675 typedef __packed struct _gatt_signed_write_without_resp_cp{
iv123 0:4946262d6030 676 uint16_t conn_handle;
iv123 0:4946262d6030 677 uint16_t attr_handle;
iv123 0:4946262d6030 678 uint8_t val_len;
iv123 0:4946262d6030 679 uint8_t attr_val[ATT_MTU - 13];
iv123 0:4946262d6030 680 } PACKED gatt_signed_write_without_resp_cp;
iv123 0:4946262d6030 681
iv123 0:4946262d6030 682 #define OCF_GATT_CONFIRM_INDICATION 0x0125
iv123 0:4946262d6030 683 typedef __packed struct _gatt_confirm_indication_cp{
iv123 0:4946262d6030 684 uint16_t conn_handle;
iv123 0:4946262d6030 685 } PACKED gatt_confirm_indication_cp;
iv123 0:4946262d6030 686 #define GATT_CONFIRM_INDICATION_CP_SIZE 2
iv123 0:4946262d6030 687
iv123 0:4946262d6030 688 #define OCF_GATT_WRITE_RESPONSE 0x0126
iv123 0:4946262d6030 689
iv123 0:4946262d6030 690 #define OCF_GATT_ALLOW_READ 0x0127
iv123 0:4946262d6030 691 typedef __packed struct _gatt_allow_read_cp{
iv123 0:4946262d6030 692 uint16_t conn_handle;
iv123 0:4946262d6030 693 } PACKED gatt_allow_read_cp;
iv123 0:4946262d6030 694 #define GATT_ALLOW_READ_CP_SIZE 2
iv123 0:4946262d6030 695
iv123 0:4946262d6030 696 #define OCF_GATT_SET_SECURITY_PERMISSION 0x0128
iv123 0:4946262d6030 697 typedef __packed struct _gatt_set_security_permission_cp{
iv123 0:4946262d6030 698 uint16_t service_handle;
iv123 0:4946262d6030 699 uint16_t attr_handle;
iv123 0:4946262d6030 700 uint8_t security_permission;
iv123 0:4946262d6030 701 } PACKED gatt_set_security_permission_cp;
iv123 0:4946262d6030 702 #define GATT_GATT_SET_SECURITY_PERMISSION_CP_SIZE 5
iv123 0:4946262d6030 703
iv123 0:4946262d6030 704 #define OCF_GATT_SET_DESC_VAL 0x0129
iv123 0:4946262d6030 705
iv123 0:4946262d6030 706 #define OCF_GATT_READ_HANDLE_VALUE 0x012A
iv123 0:4946262d6030 707 typedef __packed struct _gatt_read_handle_val_cp{
iv123 0:4946262d6030 708 uint16_t attr_handle;
iv123 0:4946262d6030 709 } PACKED gatt_read_handle_val_cp;
iv123 0:4946262d6030 710 #define GATT_READ_HANDLE_VALUE_RP_SIZE 3
iv123 0:4946262d6030 711 typedef __packed struct _gatt_read_handle_val_rp{
iv123 0:4946262d6030 712 uint8_t status;
iv123 0:4946262d6030 713 uint16_t value_len;
iv123 0:4946262d6030 714 uint8_t value[HCI_MAX_PAYLOAD_SIZE-GATT_READ_HANDLE_VALUE_RP_SIZE];
iv123 0:4946262d6030 715 } PACKED gatt_read_handle_val_rp;
iv123 0:4946262d6030 716
iv123 0:4946262d6030 717 #define OCF_GATT_READ_HANDLE_VALUE_OFFSET 0x012B
iv123 0:4946262d6030 718 typedef __packed struct _gatt_read_handle_val_offset_cp{
iv123 0:4946262d6030 719 uint16_t attr_handle;
iv123 0:4946262d6030 720 uint8_t offset;
iv123 0:4946262d6030 721 } PACKED gatt_read_handle_val_offset_cp;
iv123 0:4946262d6030 722 #define GATT_READ_HANDLE_VALUE_OFFSET_RP_SIZE 2
iv123 0:4946262d6030 723 typedef __packed struct _gatt_read_handle_val_offset_rp{
iv123 0:4946262d6030 724 uint8_t status;
iv123 0:4946262d6030 725 uint8_t value_len;
iv123 0:4946262d6030 726 uint8_t value[HCI_MAX_PAYLOAD_SIZE-GATT_READ_HANDLE_VALUE_OFFSET_RP_SIZE];
iv123 0:4946262d6030 727 } PACKED gatt_read_handle_val_offset_rp;
iv123 0:4946262d6030 728
iv123 0:4946262d6030 729 #define OCF_L2CAP_CONN_PARAM_UPDATE_REQ 0x0181
iv123 0:4946262d6030 730 typedef __packed struct _l2cap_conn_param_update_req_cp{
iv123 0:4946262d6030 731 uint16_t conn_handle;
iv123 0:4946262d6030 732 uint16_t interval_min;
iv123 0:4946262d6030 733 uint16_t interval_max;
iv123 0:4946262d6030 734 uint16_t slave_latency;
iv123 0:4946262d6030 735 uint16_t timeout_multiplier;
iv123 0:4946262d6030 736 } PACKED l2cap_conn_param_update_req_cp;
iv123 0:4946262d6030 737 #define L2CAP_CONN_PARAM_UPDATE_REQ_CP_SIZE 10
iv123 0:4946262d6030 738
iv123 0:4946262d6030 739 #define OCF_L2CAP_CONN_PARAM_UPDATE_RESP 0x0182
iv123 0:4946262d6030 740 typedef __packed struct _l2cap_conn_param_update_resp_cp_IDB05A1{
iv123 0:4946262d6030 741 uint16_t conn_handle;
iv123 0:4946262d6030 742 uint16_t interval_min;
iv123 0:4946262d6030 743 uint16_t interval_max;
iv123 0:4946262d6030 744 uint16_t slave_latency;
iv123 0:4946262d6030 745 uint16_t timeout_multiplier;
iv123 0:4946262d6030 746 uint16_t min_ce_length;
iv123 0:4946262d6030 747 uint16_t max_ce_length;
iv123 0:4946262d6030 748 uint8_t id;
iv123 0:4946262d6030 749 uint8_t accept;
iv123 0:4946262d6030 750 } PACKED l2cap_conn_param_update_resp_cp_IDB05A1;
iv123 0:4946262d6030 751
iv123 0:4946262d6030 752 typedef __packed struct _l2cap_conn_param_update_resp_cp_IDB04A1{
iv123 0:4946262d6030 753 uint16_t conn_handle;
iv123 0:4946262d6030 754 uint16_t interval_min;
iv123 0:4946262d6030 755 uint16_t interval_max;
iv123 0:4946262d6030 756 uint16_t slave_latency;
iv123 0:4946262d6030 757 uint16_t timeout_multiplier;
iv123 0:4946262d6030 758 uint8_t id;
iv123 0:4946262d6030 759 uint8_t accept;
iv123 0:4946262d6030 760 } PACKED l2cap_conn_param_update_resp_cp_IDB04A1;
iv123 0:4946262d6030 761
iv123 0:4946262d6030 762 /**
iv123 0:4946262d6030 763 * @defgroup BlueNRG_Events BlueNRG events (vendor specific)
iv123 0:4946262d6030 764 * @{
iv123 0:4946262d6030 765 */
iv123 0:4946262d6030 766
iv123 0:4946262d6030 767 /**
iv123 0:4946262d6030 768 * Vendor specific event for BlueNRG.
iv123 0:4946262d6030 769 */
iv123 0:4946262d6030 770 typedef __packed struct _evt_blue_aci{
iv123 0:4946262d6030 771 uint16_t ecode; /**< One of the BlueNRG event codes. */
iv123 0:4946262d6030 772 uint8_t data[VARIABLE_SIZE];
iv123 0:4946262d6030 773 } PACKED evt_blue_aci;
iv123 0:4946262d6030 774
iv123 0:4946262d6030 775
iv123 0:4946262d6030 776 /**
iv123 0:4946262d6030 777 * @}
iv123 0:4946262d6030 778 */
iv123 0:4946262d6030 779
iv123 0:4946262d6030 780 #endif /* __BLUENRG_ACI_CONST_H_ */