BLE UART example
Fork of Nucleo_BLE_BlueNRG by
hci/inc/ble_status.h@3:104f1bba39ca, 2016-01-03 (annotated)
- Committer:
- sjallouli
- Date:
- Sun Jan 03 16:05:38 2016 +0000
- Revision:
- 3:104f1bba39ca
- Parent:
- 0:a948f5f3904c
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sjallouli | 0:a948f5f3904c | 1 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
sjallouli | 0:a948f5f3904c | 2 | * File Name : ble_status.h |
sjallouli | 0:a948f5f3904c | 3 | * Author : AMS - HEA&RF BU |
sjallouli | 0:a948f5f3904c | 4 | * Version : V1.0.0 |
sjallouli | 0:a948f5f3904c | 5 | * Date : 19-July-2012 |
sjallouli | 0:a948f5f3904c | 6 | * Description : Header file with BLE Stack status codes. |
sjallouli | 0:a948f5f3904c | 7 | ******************************************************************************** |
sjallouli | 0:a948f5f3904c | 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
sjallouli | 0:a948f5f3904c | 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
sjallouli | 0:a948f5f3904c | 10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
sjallouli | 0:a948f5f3904c | 11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
sjallouli | 0:a948f5f3904c | 12 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
sjallouli | 0:a948f5f3904c | 13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
sjallouli | 0:a948f5f3904c | 14 | *******************************************************************************/ |
sjallouli | 0:a948f5f3904c | 15 | #ifndef __BLE_STATUS_H__ |
sjallouli | 0:a948f5f3904c | 16 | #define __BLE_STATUS_H__ |
sjallouli | 0:a948f5f3904c | 17 | |
sjallouli | 0:a948f5f3904c | 18 | #include <hal_types.h> |
sjallouli | 0:a948f5f3904c | 19 | |
sjallouli | 0:a948f5f3904c | 20 | |
sjallouli | 0:a948f5f3904c | 21 | /** @defgroup ble_status Bluetooth Status/Error Codes |
sjallouli | 0:a948f5f3904c | 22 | * @{ |
sjallouli | 0:a948f5f3904c | 23 | */ |
sjallouli | 0:a948f5f3904c | 24 | |
sjallouli | 0:a948f5f3904c | 25 | typedef tHalUint8 tBleStatus; |
sjallouli | 0:a948f5f3904c | 26 | |
sjallouli | 0:a948f5f3904c | 27 | /* Error Codes as specified by the specification |
sjallouli | 0:a948f5f3904c | 28 | * according to the spec the error codes range |
sjallouli | 0:a948f5f3904c | 29 | * from 0x00 to 0x3F |
sjallouli | 0:a948f5f3904c | 30 | */ |
sjallouli | 0:a948f5f3904c | 31 | #define ERR_CMD_SUCCESS (0x00) |
sjallouli | 0:a948f5f3904c | 32 | #define BLE_STATUS_SUCCESS (0x00) |
sjallouli | 0:a948f5f3904c | 33 | #define ERR_UNKNOWN_HCI_COMMAND (0x01) |
sjallouli | 0:a948f5f3904c | 34 | #define ERR_UNKNOWN_CONN_IDENTIFIER (0x02) |
sjallouli | 0:a948f5f3904c | 35 | |
sjallouli | 0:a948f5f3904c | 36 | #define ERR_AUTH_FAILURE (0x05) |
sjallouli | 0:a948f5f3904c | 37 | #define ERR_PIN_OR_KEY_MISSING (0x06) |
sjallouli | 0:a948f5f3904c | 38 | #define ERR_MEM_CAPACITY_EXCEEDED (0x07) |
sjallouli | 0:a948f5f3904c | 39 | #define ERR_CONNECTION_TIMEOUT (0x08) |
sjallouli | 0:a948f5f3904c | 40 | |
sjallouli | 0:a948f5f3904c | 41 | #define ERR_COMMAND_DISALLOWED (0x0C) |
sjallouli | 0:a948f5f3904c | 42 | |
sjallouli | 0:a948f5f3904c | 43 | #define ERR_UNSUPPORTED_FEATURE (0x11) |
sjallouli | 0:a948f5f3904c | 44 | #define ERR_INVALID_HCI_CMD_PARAMS (0x12) |
sjallouli | 0:a948f5f3904c | 45 | #define ERR_RMT_USR_TERM_CONN (0x13) |
sjallouli | 0:a948f5f3904c | 46 | #define ERR_RMT_DEV_TERM_CONN_LOW_RESRCES (0x14) |
sjallouli | 0:a948f5f3904c | 47 | #define ERR_RMT_DEV_TERM_CONN_POWER_OFF (0x15) |
sjallouli | 0:a948f5f3904c | 48 | #define ERR_LOCAL_HOST_TERM_CONN (0x16) |
sjallouli | 0:a948f5f3904c | 49 | |
sjallouli | 0:a948f5f3904c | 50 | #define ERR_UNSUPP_RMT_FEATURE (0x1A) |
sjallouli | 0:a948f5f3904c | 51 | |
sjallouli | 0:a948f5f3904c | 52 | #define ERR_INVALID_LMP_PARAM (0x1E) |
sjallouli | 0:a948f5f3904c | 53 | #define ERR_UNSPECIFIED_ERROR (0x1F) |
sjallouli | 0:a948f5f3904c | 54 | |
sjallouli | 0:a948f5f3904c | 55 | #define ERR_LL_RESP_TIMEOUT (0x22) |
sjallouli | 0:a948f5f3904c | 56 | #define ERR_LMP_PDU_NOT_ALLOWED (0x24) |
sjallouli | 0:a948f5f3904c | 57 | |
sjallouli | 0:a948f5f3904c | 58 | #define ERR_INSTANT_PASSED (0x28) |
sjallouli | 0:a948f5f3904c | 59 | |
sjallouli | 0:a948f5f3904c | 60 | #define ERR_PAIR_UNIT_KEY_NOT_SUPP (0x29) |
sjallouli | 0:a948f5f3904c | 61 | #define ERR_CONTROLLER_BUSY (0x3A) |
sjallouli | 0:a948f5f3904c | 62 | |
sjallouli | 0:a948f5f3904c | 63 | #define ERR_DIRECTED_ADV_TIMEOUT (0x3C) |
sjallouli | 0:a948f5f3904c | 64 | |
sjallouli | 0:a948f5f3904c | 65 | #define ERR_CONN_END_WITH_MIC_FAILURE (0x3D) |
sjallouli | 0:a948f5f3904c | 66 | |
sjallouli | 0:a948f5f3904c | 67 | #define ERR_CONN_FAILED_TO_ESTABLISH (0x3E) |
sjallouli | 0:a948f5f3904c | 68 | |
sjallouli | 0:a948f5f3904c | 69 | |
sjallouli | 0:a948f5f3904c | 70 | /** |
sjallouli | 0:a948f5f3904c | 71 | * Generic/System error codes |
sjallouli | 0:a948f5f3904c | 72 | * starts with 0x40 |
sjallouli | 0:a948f5f3904c | 73 | */ |
sjallouli | 0:a948f5f3904c | 74 | |
sjallouli | 0:a948f5f3904c | 75 | #define BLE_STATUS_FAILED (0x41) |
sjallouli | 0:a948f5f3904c | 76 | #define BLE_STATUS_INVALID_PARAMS (0x42) |
sjallouli | 0:a948f5f3904c | 77 | #define BLE_STATUS_BUSY (0x43) |
sjallouli | 0:a948f5f3904c | 78 | #define BLE_STATUS_INVALID_LEN_PDU (0x44) |
sjallouli | 0:a948f5f3904c | 79 | #define BLE_STATUS_PENDING (0x45) |
sjallouli | 0:a948f5f3904c | 80 | #define BLE_STATUS_NOT_ALLOWED (0x46) |
sjallouli | 0:a948f5f3904c | 81 | #define BLE_STATUS_ERROR (0x47) |
sjallouli | 0:a948f5f3904c | 82 | |
sjallouli | 0:a948f5f3904c | 83 | /** |
sjallouli | 0:a948f5f3904c | 84 | * flash error codes |
sjallouli | 0:a948f5f3904c | 85 | * starts with 0x49 |
sjallouli | 0:a948f5f3904c | 86 | */ |
sjallouli | 0:a948f5f3904c | 87 | #define FLASH_READ_FAILED (0x49) |
sjallouli | 0:a948f5f3904c | 88 | #define FLASH_WRITE_FAILED (0x4A) |
sjallouli | 0:a948f5f3904c | 89 | #define FLASH_ERASE_FAILED (0x4B) |
sjallouli | 0:a948f5f3904c | 90 | |
sjallouli | 0:a948f5f3904c | 91 | /** |
sjallouli | 0:a948f5f3904c | 92 | * L2CAP error codes |
sjallouli | 0:a948f5f3904c | 93 | * starts with 0x50 |
sjallouli | 0:a948f5f3904c | 94 | */ |
sjallouli | 0:a948f5f3904c | 95 | #define BLE_STATUS_INVALID_CID (0x50) |
sjallouli | 0:a948f5f3904c | 96 | |
sjallouli | 0:a948f5f3904c | 97 | /* |
sjallouli | 0:a948f5f3904c | 98 | * timer error codes |
sjallouli | 0:a948f5f3904c | 99 | * starts with 0x54 |
sjallouli | 0:a948f5f3904c | 100 | */ |
sjallouli | 0:a948f5f3904c | 101 | #define TIMER_NOT_VALID_LAYER (0x54) |
sjallouli | 0:a948f5f3904c | 102 | #define TIMER_INSUFFICIENT_RESOURCES (0x55) |
sjallouli | 0:a948f5f3904c | 103 | |
sjallouli | 0:a948f5f3904c | 104 | /** |
sjallouli | 0:a948f5f3904c | 105 | * SM error codes |
sjallouli | 0:a948f5f3904c | 106 | * starts with 0x5A |
sjallouli | 0:a948f5f3904c | 107 | */ |
sjallouli | 0:a948f5f3904c | 108 | #define BLE_STATUS_CSRK_NOT_FOUND (0x5A) |
sjallouli | 0:a948f5f3904c | 109 | #define BLE_STATUS_IRK_NOT_FOUND (0x5B) |
sjallouli | 0:a948f5f3904c | 110 | #define BLE_STATUS_DEV_NOT_FOUND_IN_DB (0x5C) |
sjallouli | 0:a948f5f3904c | 111 | #define BLE_STATUS_SEC_DB_FULL (0x5D) |
sjallouli | 0:a948f5f3904c | 112 | #define BLE_STATUS_DEV_NOT_BONDED (0x5E) |
sjallouli | 0:a948f5f3904c | 113 | |
sjallouli | 0:a948f5f3904c | 114 | /** |
sjallouli | 0:a948f5f3904c | 115 | * Gatt Error Codes |
sjallouli | 0:a948f5f3904c | 116 | * starts with 0x60 |
sjallouli | 0:a948f5f3904c | 117 | */ |
sjallouli | 0:a948f5f3904c | 118 | #define BLE_STATUS_INVALID_HANDLE (0x60) |
sjallouli | 0:a948f5f3904c | 119 | #define BLE_STATUS_INVALID_PARAMETER (0x61) |
sjallouli | 0:a948f5f3904c | 120 | #define BLE_STATUS_OUT_OF_HANDLE (0x62) |
sjallouli | 0:a948f5f3904c | 121 | #define BLE_STATUS_INVALID_OPERATION (0x63) |
sjallouli | 0:a948f5f3904c | 122 | #define BLE_STATUS_INSUFFICIENT_RESOURCES (0x64) |
sjallouli | 0:a948f5f3904c | 123 | #define BLE_INSUFFICIENT_ENC_KEYSIZE (0x65) |
sjallouli | 0:a948f5f3904c | 124 | #define BLE_STATUS_CHARAC_ALREADY_EXISTS (0x66) |
sjallouli | 0:a948f5f3904c | 125 | |
sjallouli | 0:a948f5f3904c | 126 | /** |
sjallouli | 0:a948f5f3904c | 127 | * @} |
sjallouli | 0:a948f5f3904c | 128 | */ |
sjallouli | 0:a948f5f3904c | 129 | |
sjallouli | 0:a948f5f3904c | 130 | |
sjallouli | 0:a948f5f3904c | 131 | #endif /* __BLE_STATUS_H__ */ |