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_BlueNRG by
ble_status.h
00001 /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** 00002 * File Name : ble_status.h 00003 * Author : AMS - HEA&RF BU 00004 * Version : V1.0.0 00005 * Date : 19-July-2012 00006 * Description : Header file with BLE Stack status codes. 00007 ******************************************************************************** 00008 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00009 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. 00010 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE 00012 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING 00013 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00014 *******************************************************************************/ 00015 #ifndef __BLE_STATUS_H__ 00016 #define __BLE_STATUS_H__ 00017 00018 #include <hal_types.h> 00019 00020 00021 /** @defgroup ble_status Bluetooth Status/Error Codes 00022 * @{ 00023 */ 00024 00025 typedef tHalUint8 tBleStatus; 00026 00027 /* Error Codes as specified by the specification 00028 * according to the spec the error codes range 00029 * from 0x00 to 0x3F 00030 */ 00031 #define ERR_CMD_SUCCESS (0x00) 00032 #define BLE_STATUS_SUCCESS (0x00) 00033 #define ERR_UNKNOWN_HCI_COMMAND (0x01) 00034 #define ERR_UNKNOWN_CONN_IDENTIFIER (0x02) 00035 00036 #define ERR_AUTH_FAILURE (0x05) 00037 #define ERR_PIN_OR_KEY_MISSING (0x06) 00038 #define ERR_MEM_CAPACITY_EXCEEDED (0x07) 00039 #define ERR_CONNECTION_TIMEOUT (0x08) 00040 00041 #define ERR_COMMAND_DISALLOWED (0x0C) 00042 00043 #define ERR_UNSUPPORTED_FEATURE (0x11) 00044 #define ERR_INVALID_HCI_CMD_PARAMS (0x12) 00045 #define ERR_RMT_USR_TERM_CONN (0x13) 00046 #define ERR_RMT_DEV_TERM_CONN_LOW_RESRCES (0x14) 00047 #define ERR_RMT_DEV_TERM_CONN_POWER_OFF (0x15) 00048 #define ERR_LOCAL_HOST_TERM_CONN (0x16) 00049 00050 #define ERR_UNSUPP_RMT_FEATURE (0x1A) 00051 00052 #define ERR_INVALID_LMP_PARAM (0x1E) 00053 #define ERR_UNSPECIFIED_ERROR (0x1F) 00054 00055 #define ERR_LL_RESP_TIMEOUT (0x22) 00056 #define ERR_LMP_PDU_NOT_ALLOWED (0x24) 00057 00058 #define ERR_INSTANT_PASSED (0x28) 00059 00060 #define ERR_PAIR_UNIT_KEY_NOT_SUPP (0x29) 00061 #define ERR_CONTROLLER_BUSY (0x3A) 00062 00063 #define ERR_DIRECTED_ADV_TIMEOUT (0x3C) 00064 00065 #define ERR_CONN_END_WITH_MIC_FAILURE (0x3D) 00066 00067 #define ERR_CONN_FAILED_TO_ESTABLISH (0x3E) 00068 00069 00070 /** 00071 * Generic/System error codes 00072 * starts with 0x40 00073 */ 00074 00075 #define BLE_STATUS_FAILED (0x41) 00076 #define BLE_STATUS_INVALID_PARAMS (0x42) 00077 #define BLE_STATUS_BUSY (0x43) 00078 #define BLE_STATUS_INVALID_LEN_PDU (0x44) 00079 #define BLE_STATUS_PENDING (0x45) 00080 #define BLE_STATUS_NOT_ALLOWED (0x46) 00081 #define BLE_STATUS_ERROR (0x47) 00082 00083 /** 00084 * flash error codes 00085 * starts with 0x49 00086 */ 00087 #define FLASH_READ_FAILED (0x49) 00088 #define FLASH_WRITE_FAILED (0x4A) 00089 #define FLASH_ERASE_FAILED (0x4B) 00090 00091 /** 00092 * L2CAP error codes 00093 * starts with 0x50 00094 */ 00095 #define BLE_STATUS_INVALID_CID (0x50) 00096 00097 /* 00098 * timer error codes 00099 * starts with 0x54 00100 */ 00101 #define TIMER_NOT_VALID_LAYER (0x54) 00102 #define TIMER_INSUFFICIENT_RESOURCES (0x55) 00103 00104 /** 00105 * SM error codes 00106 * starts with 0x5A 00107 */ 00108 #define BLE_STATUS_CSRK_NOT_FOUND (0x5A) 00109 #define BLE_STATUS_IRK_NOT_FOUND (0x5B) 00110 #define BLE_STATUS_DEV_NOT_FOUND_IN_DB (0x5C) 00111 #define BLE_STATUS_SEC_DB_FULL (0x5D) 00112 #define BLE_STATUS_DEV_NOT_BONDED (0x5E) 00113 00114 /** 00115 * Gatt Error Codes 00116 * starts with 0x60 00117 */ 00118 #define BLE_STATUS_INVALID_HANDLE (0x60) 00119 #define BLE_STATUS_INVALID_PARAMETER (0x61) 00120 #define BLE_STATUS_OUT_OF_HANDLE (0x62) 00121 #define BLE_STATUS_INVALID_OPERATION (0x63) 00122 #define BLE_STATUS_INSUFFICIENT_RESOURCES (0x64) 00123 #define BLE_INSUFFICIENT_ENC_KEYSIZE (0x65) 00124 #define BLE_STATUS_CHARAC_ALREADY_EXISTS (0x66) 00125 00126 /** 00127 * @} 00128 */ 00129 00130 00131 #endif /* __BLE_STATUS_H__ */
Generated on Tue Jul 12 2022 16:24:20 by
1.7.2
