Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_nRF8001 by
aci.h
00001 /* Copyright (c) 2014, Nordic Semiconductor ASA 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy 00004 * of this software and associated documentation files (the "Software"), to deal 00005 * in the Software without restriction, including without limitation the rights 00006 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00007 * copies of the Software, and to permit persons to whom the Software is 00008 * furnished to do so, subject to the following conditions: 00009 * 00010 * The above copyright notice and this permission notice shall be included in all 00011 * copies or substantial portions of the Software. 00012 * 00013 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00014 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00015 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00016 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00017 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00018 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00019 * SOFTWARE. 00020 */ 00021 00022 /** 00023 * @file 00024 * 00025 * @defgroup aci aci 00026 * @{ 00027 * @ingroup lib 00028 * 00029 * @brief Definitions for the ACI (Application Control Interface) 00030 * @remarks 00031 * 00032 * Flow control from application mcu to nRF8001 00033 * 00034 * Data flow control: 00035 * The flow control is credit based and the credit is initally given using the "device started" event. 00036 * A credit of more than 1 is given to the application mcu. 00037 * These credits are used only after the "ACI Connected Event" is sent to the application mcu. 00038 * 00039 * every send_data that is used decrements the credit available by 1. This is to be tracked by the application mcu. 00040 * When the credit available reaches 0, the application mcu shall not send any more send_data. 00041 * Credit is returned using the "credit event", this returned credit can then be used to send more send_data. 00042 * This flow control is not necessary and not available for Broadcast. 00043 * The entire credit available with the external mcu expires when a "disconnected" event arrives. 00044 * 00045 * Command flow control: 00046 * When a command is sent over the ACI, the next command shall not be sent until after a response 00047 * for the command sent has arrived. 00048 * 00049 */ 00050 00051 #ifndef ACI_H__ 00052 #define ACI_H__ 00053 00054 /** 00055 * Define an _aci_packed_ macro we can use in structure and enumerated type 00056 * declarations so that the types are sized consistently across different 00057 * platforms. In particular Arduino platforms using the GCC compiler and the 00058 * Nordic processors using the Keil compiler. 00059 * 00060 * It's really the GNU compiler platforms that need a special keyword to get 00061 * tight packing of values. On GNU platforms we can use the keyword: 00062 * __attribute__((__packed__)) 00063 * The thing is that while this keyword does the right thing with old and new 00064 * versions of the gcc (C) compiler it only works right with g++ (C++) compiler 00065 * versions that are version 4 or newer. 00066 */ 00067 #ifdef __GNUC__ 00068 # if __GNUC__ >= 4 00069 # define _aci_packed_ __attribute__((__packed__)) 00070 # else 00071 # error "older g++ versions don't handle packed attribute in typedefs" 00072 # endif 00073 #else 00074 # define _aci_packed_ 00075 #endif 00076 00077 /* 00078 * Define a macro that compares the size of the first parameter to the integer 00079 * value of the second parameter. If they do not match, a compile time error 00080 * for negative array size occurs (even gnu chokes on negative array size). 00081 * 00082 * This compare is done by creating a typedef for an array. No variables are 00083 * created and no memory is consumed with this check. The created type is 00084 * used for checking only and is not for use by any other code. The value 00085 * of 10 in this macro is arbitrary, it just needs to be a value larger 00086 * than one to result in a positive number for the array size. 00087 */ 00088 #define ACI_ASSERT_SIZE(x,y) typedef char x ## _assert_size_t[-1+10*(sizeof(x) == (y))] 00089 00090 /** 00091 * @def ACI_VERSION 00092 * @brief Current ACI protocol version. 0 means a device that is not yet released. 00093 * A numer greater than 0 refers to a specific ACI version documented and released. 00094 * The ACI consists of the ACI commands, ACI events and error codes. 00095 */ 00096 #define ACI_VERSION (0x02) 00097 /** 00098 * @def BTLE_DEVICE_ADDRESS_SIZE 00099 * @brief Size in bytes of a Bluetooth Address 00100 */ 00101 #define BTLE_DEVICE_ADDRESS_SIZE (6) 00102 /** 00103 * @def ACI_PACKET_MAX_LEN 00104 * @brief Maximum length in bytes of a full ACI packet, including length prefix, opcode and payload 00105 */ 00106 #define ACI_PACKET_MAX_LEN (32) 00107 /** 00108 * @def ACI_ECHO_DATA_MAX_LEN 00109 * @brief Maximum length in bytes of the echo data portion 00110 */ 00111 #define ACI_ECHO_DATA_MAX_LEN (ACI_PACKET_MAX_LEN - 3) 00112 /** 00113 * @def ACI_DEVICE_MAX_PIPES 00114 * @brief Maximum number of ACI pipes 00115 */ 00116 #define ACI_DEVICE_MAX_PIPES (62) 00117 /** 00118 * @def ACI_PIPE_TX_DATA_MAX_LEN 00119 * @brief Maximum length in bytes of a transmission data pipe packet 00120 */ 00121 #define ACI_PIPE_TX_DATA_MAX_LEN (20) 00122 /** 00123 * @def ACI_PIPE_RX_DATA_MAX_LEN 00124 * @brief Maximum length in bytes of a reception data pipe packet 00125 */ 00126 #define ACI_PIPE_RX_DATA_MAX_LEN (22) 00127 /** 00128 * @def ACI_GAP_DEVNAME_MAX_LEN 00129 * @brief Maximum length in bytes of the GAP device name 00130 */ 00131 #define ACI_GAP_DEVNAME_MAX_LEN (20) 00132 /** 00133 * @def ACI_AD_PACKET_MAX_LEN 00134 * @brief Maximum length in bytes of an AD packet 00135 */ 00136 #define ACI_AD_PACKET_MAX_LEN (31) 00137 /** 00138 * @def ACI_AD_PACKET_MAX_USER_LEN 00139 * @brief Maximum usable length in bytes of an AD packet 00140 */ 00141 #define ACI_AD_PACKET_MAX_USER_LEN (31 - 3) 00142 /** 00143 * @def ACI_PIPE_INVALID 00144 * @brief Invalid pipe number 00145 */ 00146 #define ACI_PIPE_INVALID (0xFF) 00147 00148 /** 00149 * @enum aci_pipe_store_t 00150 * @brief Storage type identifiers: local and remote 00151 */ 00152 typedef enum 00153 { 00154 ACI_STORE_INVALID = 0x0, 00155 ACI_STORE_LOCAL= 0x01, 00156 ACI_STORE_REMOTE= 0x02 00157 } _aci_packed_ aci_pipe_store_t; 00158 00159 /** 00160 * @enum aci_pipe_type_t 00161 * @brief Pipe types 00162 */ 00163 typedef enum 00164 { 00165 ACI_TX_BROADCAST = 0x0001, 00166 ACI_TX = 0x0002, 00167 ACI_TX_ACK = 0x0004, 00168 ACI_RX = 0x0008, 00169 ACI_RX_ACK = 0x0010, 00170 ACI_TX_REQ = 0x0020, 00171 ACI_RX_REQ = 0x0040, 00172 ACI_SET = 0x0080, 00173 ACI_TX_SIGN = 0x0100, 00174 ACI_RX_SIGN = 0x0200, 00175 ACI_RX_ACK_AUTO = 0x0400 00176 } _aci_packed_ aci_pipe_type_t; 00177 00178 ACI_ASSERT_SIZE(aci_pipe_type_t, 2); 00179 00180 /** 00181 * @enum aci_bd_addr_type_t 00182 * @brief Bluetooth Address types 00183 */ 00184 typedef enum 00185 { 00186 ACI_BD_ADDR_TYPE_INVALID = 0x00, 00187 ACI_BD_ADDR_TYPE_PUBLIC = 0x01, 00188 ACI_BD_ADDR_TYPE_RANDOM_STATIC = 0x02, 00189 ACI_BD_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE = 0x03, 00190 ACI_BD_ADDR_TYPE_RANDOM_PRIVATE_UNRESOLVABLE = 0x04 00191 } _aci_packed_ aci_bd_addr_type_t; 00192 00193 /** 00194 * @enum aci_device_output_power_t 00195 * @brief Radio output power levels 00196 */ 00197 typedef enum 00198 { 00199 ACI_DEVICE_OUTPUT_POWER_MINUS_18DBM = 0x00, /**< Output power set to -18dBm */ 00200 ACI_DEVICE_OUTPUT_POWER_MINUS_12DBM = 0x01, /**< Output power set to -12dBm */ 00201 ACI_DEVICE_OUTPUT_POWER_MINUS_6DBM = 0x02, /**< Output power set to -6dBm */ 00202 ACI_DEVICE_OUTPUT_POWER_0DBM = 0x03 /**< Output power set to 0dBm - DEFAULT*/ 00203 } _aci_packed_ aci_device_output_power_t; 00204 00205 /** 00206 * @enum aci_device_operation_mode_t 00207 * @brief Device operation modes 00208 */ 00209 typedef enum 00210 { 00211 ACI_DEVICE_INVALID =0x00, 00212 ACI_DEVICE_TEST =0x01, 00213 ACI_DEVICE_SETUP =0x02, 00214 ACI_DEVICE_STANDBY =0x03, 00215 ACI_DEVICE_SLEEP =0x04 00216 } _aci_packed_ aci_device_operation_mode_t; 00217 00218 /** 00219 * @enum aci_disconnect_reason_t 00220 * @brief Reason enumeration for ACI_CMD_DISCONNECT 00221 */ 00222 typedef enum 00223 { 00224 ACI_REASON_TERMINATE =0x01, /**< Use this to disconnect (does a terminate request), you need to wait for the "disconnected" event */ 00225 ACI_REASON_BAD_TIMING =0x02 /*<Use this to disconnect and inform the peer, that the timing on the link is not acceptable for the device, you need to wait for the "disconnected" event */ 00226 } _aci_packed_ aci_disconnect_reason_t; 00227 00228 /** 00229 * @enum aci_test_mode_change_t 00230 * @brief Device test mode control 00231 */ 00232 typedef enum 00233 { 00234 ACI_TEST_MODE_DTM_UART = 0x01, 00235 ACI_TEST_MODE_DTM_ACI = 0x02, 00236 ACI_TEST_MODE_EXIT = 0xFF 00237 00238 } _aci_packed_ aci_test_mode_change_t; 00239 00240 ACI_ASSERT_SIZE(aci_test_mode_change_t, 1); 00241 00242 /** 00243 * @enum aci_permissions_t 00244 * @brief Data store permissions 00245 */ 00246 typedef enum 00247 { 00248 ACI_PERMISSIONS_NONE =0x00, 00249 ACI_PERMISSIONS_LINK_AUTHENTICATED =0x01 00250 } _aci_packed_ aci_permissions_t; 00251 00252 /** 00253 * @def ACI_VS_UUID_128_MAX_COUNT 00254 * @brief Maximum number of 128-bit Vendor Specific 00255 * UUIDs that can be set 00256 */ 00257 #define ACI_VS_UUID_128_MAX_COUNT 64 /** #0 reserved for invalid, #1 reservered for BT SIG and a maximum of 1024 bytes (16*64) */ 00258 00259 /** 00260 * @struct aci_ll_conn_params_t 00261 * @brief Link Layer Connection Parameters 00262 */ 00263 typedef struct 00264 { 00265 uint16_t min_conn_interval; /**< Minimum connection interval requested from peer */ 00266 #define ACI_PPCP_MIN_CONN_INTVL_NONE 0xFFFF 00267 #define ACI_PPCP_MIN_CONN_INTVL_MIN 0x0006 00268 #define ACI_PPCP_MIN_CONN_INTVL_MAX 0x0C80 00269 uint16_t max_conn_interval; /**< Maximum connection interval requested from peer */ 00270 #define ACI_PPCP_MAX_CONN_INTVL_NONE 0xFFFF 00271 #define ACI_PPCP_MAX_CONN_INTVL_MIN 0x0006 00272 #define ACI_PPCP_MAX_CONN_INTVL_MAX 0x0C80 00273 uint16_t slave_latency; /**< Connection interval latency requested from peer */ 00274 #define ACI_PPCP_SLAVE_LATENCY_MAX 0x03E8 00275 uint16_t timeout_mult; /**< Link supervisor timeout multiplier requested from peer */ 00276 #define ACI_PPCP_TIMEOUT_MULT_NONE 0xFFFF 00277 #define ACI_PPCP_TIMEOUT_MULT_MIN 0x000A 00278 #define ACI_PPCP_TIMEOUT_MULT_MAX 0x0C80 00279 } _aci_packed_ aci_ll_conn_params_t; 00280 00281 /** 00282 * @def aci_gap_ppcp_t 00283 * @brief GAP Peripheral Preferred Connection Parameters 00284 */ 00285 #define aci_gap_ppcp_t aci_ll_conn_params_t 00286 00287 /** 00288 * @def ACI_AD_LOC_SVCUUID_16_MAX_COUNT 00289 * @brief Maximum number of 16-bit UUIDs that can 00290 * be inserted in the Services tag of AD 00291 */ 00292 #define ACI_AD_LOC_SVCUUID_16_MAX_COUNT 5 00293 00294 /** 00295 * @def ACI_AD_LOC_SVCUUID_128_MAX_COUNT 00296 * @brief Maximum number of 128-bit UUIDs that can 00297 * be inserted in the Services tag of AD 00298 */ 00299 #define ACI_AD_LOC_SVCUUID_128_MAX_COUNT 1 00300 00301 /** 00302 * @def ACI_AD_SOL_SVCUUID_16_MAX_COUNT 00303 * @brief Maximum number of UUIDs that can 00304 * be inserted in the Solicited Services tag of AD 00305 */ 00306 #define ACI_AD_SOL_SVCUUID_16_MAX_COUNT 5 00307 00308 /** 00309 * @def ACI_AD_SOL_SVCUUID_128_MAX_COUNT 00310 * @brief Maximum number of UUIDs that can 00311 * be inserted in the Solicited Services tag of AD 00312 */ 00313 #define ACI_AD_SOL_SVCUUID_128_MAX_COUNT 1 00314 00315 /** 00316 * @def ACI_SEC_ENCKEY_SIZE_MIN 00317 * @brief Minimum encryption key size 00318 */ 00319 #define ACI_SEC_ENCKEY_SIZE_MIN 7 00320 /** 00321 * @def ACI_SEC_ENCKEY_SIZE_MAX 00322 * @brief Maximum encryption key size 00323 */ 00324 #define ACI_SEC_ENCKEY_SIZE_MAX 16 00325 /** 00326 * @def ACI_CUSTOM_AD_TYPE_MAX_COUNT 00327 * @brief Maximum number of custom ad types 00328 */ 00329 #define ACI_CUSTOM_AD_TYPE_MAX_COUNT 8 00330 /** 00331 * @def ACI_CUSTOM_AD_TYPE_MAX_DATA_LENGTH 00332 * @brief Maximum custom ad type data size 00333 */ 00334 #define ACI_CUSTOM_AD_TYPE_MAX_DATA_LENGTH 20 00335 00336 /** 00337 * @struct aci_tx_data_t 00338 * @brief Generic ACI transmit data structure 00339 */ 00340 typedef struct 00341 { 00342 uint8_t pipe_number; 00343 uint8_t aci_data[ACI_PIPE_TX_DATA_MAX_LEN]; 00344 } _aci_packed_ aci_tx_data_t; 00345 00346 ACI_ASSERT_SIZE(aci_tx_data_t, ACI_PIPE_TX_DATA_MAX_LEN + 1); 00347 00348 /** 00349 * @struct aci_rx_data_t 00350 * @brief Generic ACI receive data structure 00351 */ 00352 typedef struct 00353 { 00354 uint8_t pipe_number; 00355 uint8_t aci_data[ACI_PIPE_RX_DATA_MAX_LEN]; 00356 } _aci_packed_ aci_rx_data_t; 00357 00358 ACI_ASSERT_SIZE(aci_rx_data_t, ACI_PIPE_RX_DATA_MAX_LEN + 1); 00359 00360 /** 00361 * @enum aci_hw_error_t 00362 * @brief Hardware Error codes 00363 */ 00364 typedef enum 00365 { 00366 ACI_HW_ERROR_NONE = 0x00, 00367 ACI_HW_ERROR_FATAL = 0x01 00368 } _aci_packed_ aci_hw_error_t; 00369 00370 /** 00371 * @enum aci_clock_accuracy_t 00372 * @brief Bluetooth Low Energy Clock Accuracy 00373 */ 00374 typedef enum 00375 { 00376 ACI_CLOCK_ACCURACY_500_PPM = 0x00, 00377 ACI_CLOCK_ACCURACY_250_PPM = 0x01, 00378 ACI_CLOCK_ACCURACY_150_PPM = 0x02, 00379 ACI_CLOCK_ACCURACY_100_PPM = 0x03, 00380 ACI_CLOCK_ACCURACY_75_PPM = 0x04, 00381 ACI_CLOCK_ACCURACY_50_PPM = 0x05, 00382 ACI_CLOCK_ACCURACY_30_PPM = 0x06, 00383 ACI_CLOCK_ACCURACY_20_PPM = 0x07 00384 } _aci_packed_ aci_clock_accuracy_t; 00385 00386 /** 00387 * @enum aci_app_latency_mode_t 00388 * @brief Application latency modes 00389 */ 00390 typedef enum 00391 { 00392 ACI_APP_LATENCY_DISABLE = 0, 00393 ACI_APP_LATENCY_ENABLE = 1 00394 } _aci_packed_ aci_app_latency_mode_t; 00395 00396 /** 00397 * @enum gatt_format_t 00398 * @brief GATT format definitions 00399 */ 00400 typedef enum 00401 { 00402 ACI_GATT_FORMAT_NONE = 0x00, /**< No characteristic format available */ 00403 ACI_GATT_FORMAT_BOOLEAN = 0x01, /**< Not Supported */ 00404 ACI_GATT_FORMAT_2BIT = 0x02, /**< Not Supported */ 00405 ACI_GATT_FORMAT_NIBBLE = 0x03, /**< Not Supported */ 00406 ACI_GATT_FORMAT_UINT8 = 0x04, 00407 ACI_GATT_FORMAT_UINT12 = 0x05, 00408 ACI_GATT_FORMAT_UINT16 = 0x06, 00409 ACI_GATT_FORMAT_UINT24 = 0x07, 00410 ACI_GATT_FORMAT_UINT32 = 0x08, 00411 ACI_GATT_FORMAT_UINT48 = 0x09, 00412 ACI_GATT_FORMAT_UINT64 = 0x0A, 00413 ACI_GATT_FORMAT_UINT128 = 0x0B, 00414 ACI_GATT_FORMAT_SINT8 = 0x0C, 00415 ACI_GATT_FORMAT_SINT12 = 0x0D, 00416 ACI_GATT_FORMAT_SINT16 = 0x0E, 00417 ACI_GATT_FORMAT_SINT24 = 0x0F, 00418 ACI_GATT_FORMAT_SINT32 = 0x10, 00419 ACI_GATT_FORMAT_SINT48 = 0x11, 00420 ACI_GATT_FORMAT_SINT64 = 0x12, 00421 ACI_GATT_FORMAT_SINT128 = 0x13, 00422 ACI_GATT_FORMAT_FLOAT32 = 0x14, 00423 ACI_GATT_FORMAT_FLOAT64 = 0x15, 00424 ACI_GATT_FORMAT_SFLOAT = 0x16, 00425 ACI_GATT_FORMAT_FLOAT = 0x17, 00426 ACI_GATT_FORMAT_DUINT16 = 0x18, 00427 ACI_GATT_FORMAT_UTF8S = 0x19, 00428 ACI_GATT_FORMAT_UTF16S = 0x1A, 00429 ACI_GATT_FORMAT_STRUCT = 0x1B 00430 } _aci_packed_ aci_gatt_format_t; 00431 00432 /** 00433 * @brief GATT Bluetooth namespace 00434 */ 00435 typedef enum 00436 { 00437 ACI_GATT_NAMESPACE_INVALID = 0x00, 00438 ACI_GATT_NAMESPACE_BTSIG = 0x01 /**< Bluetooth SIG */ 00439 } _aci_packed_ aci_gatt_namespace_t; 00440 00441 /** 00442 * @brief Security key types 00443 */ 00444 typedef enum 00445 { 00446 ACI_KEY_TYPE_INVALID = 0x00, 00447 ACI_KEY_TYPE_PASSKEY = 0x01 00448 } _aci_packed_ aci_key_type_t; 00449 00450 /** 00451 * @enum aci_bond_status_code_t 00452 * @brief Bond status code 00453 */ 00454 typedef enum 00455 { 00456 /** 00457 * Bonding succeeded 00458 */ 00459 ACI_BOND_STATUS_SUCCESS = 0x00, 00460 /** 00461 * Bonding failed 00462 */ 00463 ACI_BOND_STATUS_FAILED = 0x01, 00464 /** 00465 * Bonding error: Timeout can occur when link termination is unexpected or did not get connected OR SMP timer expired 00466 */ 00467 ACI_BOND_STATUS_FAILED_TIMED_OUT = 0x02, 00468 /** 00469 * Bonding error: Passkey entry failed 00470 */ 00471 ACI_BOND_STATUS_FAILED_PASSKEY_ENTRY_FAILED = 0x81, 00472 /** 00473 * Bonding error: OOB unavailable 00474 */ 00475 ACI_BOND_STATUS_FAILED_OOB_UNAVAILABLE = 0x82, 00476 /** 00477 * Bonding error: Authentication request failed 00478 */ 00479 ACI_BOND_STATUS_FAILED_AUTHENTICATION_REQ = 0x83, 00480 /** 00481 * Bonding error: Confirm value failed 00482 */ 00483 ACI_BOND_STATUS_FAILED_CONFIRM_VALUE = 0x84, 00484 /** 00485 * Bonding error: Pairing unsupported 00486 */ 00487 ACI_BOND_STATUS_FAILED_PAIRING_UNSUPPORTED = 0x85, 00488 /** 00489 * Bonding error: Invalid encryption key size 00490 */ 00491 ACI_BOND_STATUS_FAILED_ENCRYPTION_KEY_SIZE = 0x86, 00492 /** 00493 * Bonding error: Unsupported SMP command 00494 */ 00495 ACI_BOND_STATUS_FAILED_SMP_CMD_UNSUPPORTED = 0x87, 00496 /** 00497 * Bonding error: Unspecified reason 00498 */ 00499 ACI_BOND_STATUS_FAILED_UNSPECIFIED_REASON = 0x88, 00500 /** 00501 * Bonding error: Too many attempts 00502 */ 00503 ACI_BOND_STATUS_FAILED_REPEATED_ATTEMPTS = 0x89, 00504 /** 00505 * Bonding error: Invalid parameters 00506 */ 00507 ACI_BOND_STATUS_FAILED_INVALID_PARAMETERS = 0x8A 00508 00509 } _aci_packed_ aci_bond_status_code_t; 00510 00511 ACI_ASSERT_SIZE(aci_bond_status_code_t, 1); 00512 00513 /** 00514 * @enum aci_bond_status_source_t 00515 * @brief Source of a bond status code 00516 */ 00517 typedef enum 00518 { 00519 ACI_BOND_STATUS_SOURCE_INVALID = 0x00, 00520 ACI_BOND_STATUS_SOURCE_LOCAL = 0x01, 00521 ACI_BOND_STATUS_SOURCE_REMOTE = 0x02 00522 00523 } _aci_packed_ aci_bond_status_source_t; 00524 00525 /** 00526 * @enum aci_status_code_t 00527 * @brief ACI status codes 00528 */ 00529 typedef enum 00530 { 00531 /** 00532 * Success 00533 */ 00534 ACI_STATUS_SUCCESS = 0x00, 00535 /** 00536 * Transaction continuation status 00537 */ 00538 ACI_STATUS_TRANSACTION_CONTINUE = 0x01, 00539 /** 00540 * Transaction completed 00541 */ 00542 ACI_STATUS_TRANSACTION_COMPLETE = 0x02, 00543 /** 00544 * Extended status, further checks needed 00545 */ 00546 ACI_STATUS_EXTENDED = 0x03, 00547 /** 00548 * Unknown error. 00549 */ 00550 ACI_STATUS_ERROR_UNKNOWN = 0x80, 00551 /** 00552 * Internal error. 00553 */ 00554 ACI_STATUS_ERROR_INTERNAL = 0x81, 00555 /** 00556 * Unknown command 00557 */ 00558 ACI_STATUS_ERROR_CMD_UNKNOWN = 0x82, 00559 /** 00560 * Command invalid in the current device state 00561 */ 00562 ACI_STATUS_ERROR_DEVICE_STATE_INVALID = 0x83, 00563 /** 00564 * Invalid length 00565 */ 00566 ACI_STATUS_ERROR_INVALID_LENGTH = 0x84, 00567 /** 00568 * Invalid input parameters 00569 */ 00570 ACI_STATUS_ERROR_INVALID_PARAMETER = 0x85, 00571 /** 00572 * Busy 00573 */ 00574 ACI_STATUS_ERROR_BUSY = 0x86, 00575 /** 00576 * Invalid data format or contents 00577 */ 00578 ACI_STATUS_ERROR_INVALID_DATA = 0x87, 00579 /** 00580 * CRC mismatch 00581 */ 00582 ACI_STATUS_ERROR_CRC_MISMATCH = 0x88, 00583 /** 00584 * Unsupported setup format 00585 */ 00586 ACI_STATUS_ERROR_UNSUPPORTED_SETUP_FORMAT = 0x89, 00587 /** 00588 * Invalid sequence number during a write dynamic data sequence 00589 */ 00590 ACI_STATUS_ERROR_INVALID_SEQ_NO = 0x8A, 00591 /** 00592 * Setup data is locked and cannot be modified 00593 */ 00594 ACI_STATUS_ERROR_SETUP_LOCKED = 0x8B, 00595 /** 00596 * Setup error due to lock verification failure 00597 */ 00598 ACI_STATUS_ERROR_LOCK_FAILED = 0x8C, 00599 /** 00600 * Bond required: Local Pipes need bonded/trusted peer 00601 */ 00602 ACI_STATUS_ERROR_BOND_REQUIRED = 0x8D, 00603 /** 00604 * Command rejected as a transaction is still pending 00605 */ 00606 ACI_STATUS_ERROR_REJECTED = 0x8E, 00607 /** 00608 * Pipe Error Event : Data size exceeds size specified for pipe : Transmit failed 00609 */ 00610 ACI_STATUS_ERROR_DATA_SIZE = 0x8F, 00611 /** 00612 * Pipe Error Event : Invalid pipe 00613 */ 00614 ACI_STATUS_ERROR_PIPE_INVALID = 0x90, 00615 /** 00616 * Pipe Error Event : Credit not available 00617 */ 00618 ACI_STATUS_ERROR_CREDIT_NOT_AVAILABLE = 0x91, 00619 /** 00620 * Pipe Error Event : Peer device has sent an error on an pipe operation on the remote characteristic 00621 */ 00622 ACI_STATUS_ERROR_PEER_ATT_ERROR = 0x92, 00623 /** 00624 * Connection was not established before the BTLE advertising was stopped 00625 */ 00626 ACI_STATUS_ERROR_ADVT_TIMEOUT = 0x93, 00627 /** 00628 * Peer has triggered a Security Manager Protocol Error 00629 */ 00630 ACI_STATUS_ERROR_PEER_SMP_ERROR = 0x94, 00631 /** 00632 * Pipe Error Event : Pipe type invalid for the selected operation 00633 */ 00634 ACI_STATUS_ERROR_PIPE_TYPE_INVALID = 0x95, 00635 /** 00636 * Pipe Error Event : Pipe state invalid for the selected operation 00637 */ 00638 ACI_STATUS_ERROR_PIPE_STATE_INVALID = 0x96, 00639 /** 00640 * Invalid key size provided 00641 */ 00642 ACI_STATUS_ERROR_INVALID_KEY_SIZE = 0x97, 00643 /** 00644 * Invalid key data provided 00645 */ 00646 ACI_STATUS_ERROR_INVALID_KEY_DATA = 0x98, 00647 /** 00648 * Reserved range start 00649 */ 00650 ACI_STATUS_RESERVED_START = 0xF0, 00651 /** 00652 * Reserved range end 00653 */ 00654 ACI_STATUS_RESERVED_END = 0xFF 00655 00656 } _aci_packed_ aci_status_code_t; 00657 00658 ACI_ASSERT_SIZE(aci_status_code_t, 1); 00659 00660 /** 00661 * @} 00662 */ 00663 00664 #endif // ACI_H__
Generated on Tue Jul 12 2022 15:15:45 by
1.7.2
