Nordic stack and drivers for the mbed BLE API
Fork of nRF51822 by
TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/ble_hci.h@640:c90ae1400bf2, 2016-09-14 (annotated)
- Committer:
- Vincent Coubard
- Date:
- Wed Sep 14 14:39:43 2016 +0100
- Revision:
- 640:c90ae1400bf2
Sync with bdab10dc0f90748b6989c8b577771bb403ca6bd8 from ARMmbed/mbed-os.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vincent Coubard |
640:c90ae1400bf2 | 1 | /* |
Vincent Coubard |
640:c90ae1400bf2 | 2 | * Copyright (c) Nordic Semiconductor ASA |
Vincent Coubard |
640:c90ae1400bf2 | 3 | * All rights reserved. |
Vincent Coubard |
640:c90ae1400bf2 | 4 | * |
Vincent Coubard |
640:c90ae1400bf2 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
Vincent Coubard |
640:c90ae1400bf2 | 6 | * are permitted provided that the following conditions are met: |
Vincent Coubard |
640:c90ae1400bf2 | 7 | * |
Vincent Coubard |
640:c90ae1400bf2 | 8 | * 1. Redistributions of source code must retain the above copyright notice, this |
Vincent Coubard |
640:c90ae1400bf2 | 9 | * list of conditions and the following disclaimer. |
Vincent Coubard |
640:c90ae1400bf2 | 10 | * |
Vincent Coubard |
640:c90ae1400bf2 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, this |
Vincent Coubard |
640:c90ae1400bf2 | 12 | * list of conditions and the following disclaimer in the documentation and/or |
Vincent Coubard |
640:c90ae1400bf2 | 13 | * other materials provided with the distribution. |
Vincent Coubard |
640:c90ae1400bf2 | 14 | * |
Vincent Coubard |
640:c90ae1400bf2 | 15 | * 3. Neither the name of Nordic Semiconductor ASA nor the names of other |
Vincent Coubard |
640:c90ae1400bf2 | 16 | * contributors to this software may be used to endorse or promote products |
Vincent Coubard |
640:c90ae1400bf2 | 17 | * derived from this software without specific prior written permission. |
Vincent Coubard |
640:c90ae1400bf2 | 18 | * |
Vincent Coubard |
640:c90ae1400bf2 | 19 | * |
Vincent Coubard |
640:c90ae1400bf2 | 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
Vincent Coubard |
640:c90ae1400bf2 | 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Vincent Coubard |
640:c90ae1400bf2 | 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Vincent Coubard |
640:c90ae1400bf2 | 23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
Vincent Coubard |
640:c90ae1400bf2 | 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Vincent Coubard |
640:c90ae1400bf2 | 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Vincent Coubard |
640:c90ae1400bf2 | 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
Vincent Coubard |
640:c90ae1400bf2 | 27 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Vincent Coubard |
640:c90ae1400bf2 | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Vincent Coubard |
640:c90ae1400bf2 | 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Vincent Coubard |
640:c90ae1400bf2 | 30 | * |
Vincent Coubard |
640:c90ae1400bf2 | 31 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 32 | |
Vincent Coubard |
640:c90ae1400bf2 | 33 | /** |
Vincent Coubard |
640:c90ae1400bf2 | 34 | @addtogroup BLE_COMMON |
Vincent Coubard |
640:c90ae1400bf2 | 35 | @{ |
Vincent Coubard |
640:c90ae1400bf2 | 36 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 37 | |
Vincent Coubard |
640:c90ae1400bf2 | 38 | |
Vincent Coubard |
640:c90ae1400bf2 | 39 | #ifndef BLE_HCI_H__ |
Vincent Coubard |
640:c90ae1400bf2 | 40 | #define BLE_HCI_H__ |
Vincent Coubard |
640:c90ae1400bf2 | 41 | |
Vincent Coubard |
640:c90ae1400bf2 | 42 | /** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes |
Vincent Coubard |
640:c90ae1400bf2 | 43 | * @{ */ |
Vincent Coubard |
640:c90ae1400bf2 | 44 | |
Vincent Coubard |
640:c90ae1400bf2 | 45 | #define BLE_HCI_STATUS_CODE_SUCCESS 0x00 /**< Success. */ |
Vincent Coubard |
640:c90ae1400bf2 | 46 | #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01 /**< Unknown BLE Command. */ |
Vincent Coubard |
640:c90ae1400bf2 | 47 | #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */ |
Vincent Coubard |
640:c90ae1400bf2 | 48 | /*0x03 Hardware Failure |
Vincent Coubard |
640:c90ae1400bf2 | 49 | 0x04 Page Timeout |
Vincent Coubard |
640:c90ae1400bf2 | 50 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 51 | #define BLE_HCI_AUTHENTICATION_FAILURE 0x05 /**< Authentication Failure. */ |
Vincent Coubard |
640:c90ae1400bf2 | 52 | #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */ |
Vincent Coubard |
640:c90ae1400bf2 | 53 | #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07 /**< Memory Capacity Exceeded. */ |
Vincent Coubard |
640:c90ae1400bf2 | 54 | #define BLE_HCI_CONNECTION_TIMEOUT 0x08 /**< Connection Timeout. */ |
Vincent Coubard |
640:c90ae1400bf2 | 55 | /*0x09 Connection Limit Exceeded |
Vincent Coubard |
640:c90ae1400bf2 | 56 | 0x0A Synchronous Connection Limit To A Device Exceeded |
Vincent Coubard |
640:c90ae1400bf2 | 57 | 0x0B ACL Connection Already Exists*/ |
Vincent Coubard |
640:c90ae1400bf2 | 58 | #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */ |
Vincent Coubard |
640:c90ae1400bf2 | 59 | /*0x0D Connection Rejected due to Limited Resources |
Vincent Coubard |
640:c90ae1400bf2 | 60 | 0x0E Connection Rejected Due To Security Reasons |
Vincent Coubard |
640:c90ae1400bf2 | 61 | 0x0F Connection Rejected due to Unacceptable BD_ADDR |
Vincent Coubard |
640:c90ae1400bf2 | 62 | 0x10 Connection Accept Timeout Exceeded |
Vincent Coubard |
640:c90ae1400bf2 | 63 | 0x11 Unsupported Feature or Parameter Value*/ |
Vincent Coubard |
640:c90ae1400bf2 | 64 | #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */ |
Vincent Coubard |
640:c90ae1400bf2 | 65 | #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */ |
Vincent Coubard |
640:c90ae1400bf2 | 66 | #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14 /**< Remote Device Terminated Connection due to low resources.*/ |
Vincent Coubard |
640:c90ae1400bf2 | 67 | #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */ |
Vincent Coubard |
640:c90ae1400bf2 | 68 | #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**< Local Host Terminated Connection. */ |
Vincent Coubard |
640:c90ae1400bf2 | 69 | /* |
Vincent Coubard |
640:c90ae1400bf2 | 70 | 0x17 Repeated Attempts |
Vincent Coubard |
640:c90ae1400bf2 | 71 | 0x18 Pairing Not Allowed |
Vincent Coubard |
640:c90ae1400bf2 | 72 | 0x19 Unknown LMP PDU |
Vincent Coubard |
640:c90ae1400bf2 | 73 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 74 | #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A /**< Unsupported Remote Feature. */ |
Vincent Coubard |
640:c90ae1400bf2 | 75 | /* |
Vincent Coubard |
640:c90ae1400bf2 | 76 | 0x1B SCO Offset Rejected |
Vincent Coubard |
640:c90ae1400bf2 | 77 | 0x1C SCO Interval Rejected |
Vincent Coubard |
640:c90ae1400bf2 | 78 | 0x1D SCO Air Mode Rejected*/ |
Vincent Coubard |
640:c90ae1400bf2 | 79 | #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E /**< Invalid LMP Parameters. */ |
Vincent Coubard |
640:c90ae1400bf2 | 80 | #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F /**< Unspecified Error. */ |
Vincent Coubard |
640:c90ae1400bf2 | 81 | /*0x20 Unsupported LMP Parameter Value |
Vincent Coubard |
640:c90ae1400bf2 | 82 | 0x21 Role Change Not Allowed |
Vincent Coubard |
640:c90ae1400bf2 | 83 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 84 | #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22 /**< LMP Response Timeout. */ |
Vincent Coubard |
640:c90ae1400bf2 | 85 | /*0x23 LMP Error Transaction Collision*/ |
Vincent Coubard |
640:c90ae1400bf2 | 86 | #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24 /**< LMP PDU Not Allowed. */ |
Vincent Coubard |
640:c90ae1400bf2 | 87 | /*0x25 Encryption Mode Not Acceptable |
Vincent Coubard |
640:c90ae1400bf2 | 88 | 0x26 Link Key Can Not be Changed |
Vincent Coubard |
640:c90ae1400bf2 | 89 | 0x27 Requested QoS Not Supported |
Vincent Coubard |
640:c90ae1400bf2 | 90 | */ |
Vincent Coubard |
640:c90ae1400bf2 | 91 | #define BLE_HCI_INSTANT_PASSED 0x28 /**< Instant Passed. */ |
Vincent Coubard |
640:c90ae1400bf2 | 92 | #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29 /**< Pairing with Unit Key Unsupported. */ |
Vincent Coubard |
640:c90ae1400bf2 | 93 | #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A /**< Different Transaction Collision. */ |
Vincent Coubard |
640:c90ae1400bf2 | 94 | /* |
Vincent Coubard |
640:c90ae1400bf2 | 95 | 0x2B Reserved |
Vincent Coubard |
640:c90ae1400bf2 | 96 | 0x2C QoS Unacceptable Parameter |
Vincent Coubard |
640:c90ae1400bf2 | 97 | 0x2D QoS Rejected |
Vincent Coubard |
640:c90ae1400bf2 | 98 | 0x2E Channel Classification Not Supported |
Vincent Coubard |
640:c90ae1400bf2 | 99 | 0x2F Insufficient Security |
Vincent Coubard |
640:c90ae1400bf2 | 100 | 0x30 Parameter Out Of Mandatory Range |
Vincent Coubard |
640:c90ae1400bf2 | 101 | 0x31 Reserved |
Vincent Coubard |
640:c90ae1400bf2 | 102 | 0x32 Role Switch Pending |
Vincent Coubard |
640:c90ae1400bf2 | 103 | 0x33 Reserved |
Vincent Coubard |
640:c90ae1400bf2 | 104 | 0x34 Reserved Slot Violation |
Vincent Coubard |
640:c90ae1400bf2 | 105 | 0x35 Role Switch Failed |
Vincent Coubard |
640:c90ae1400bf2 | 106 | 0x36 Extended Inquiry Response Too Large |
Vincent Coubard |
640:c90ae1400bf2 | 107 | 0x37 Secure Simple Pairing Not Supported By Host. |
Vincent Coubard |
640:c90ae1400bf2 | 108 | 0x38 Host Busy - Pairing |
Vincent Coubard |
640:c90ae1400bf2 | 109 | 0x39 Connection Rejected due to No Suitable Channel Found*/ |
Vincent Coubard |
640:c90ae1400bf2 | 110 | #define BLE_HCI_CONTROLLER_BUSY 0x3A /**< Controller Busy. */ |
Vincent Coubard |
640:c90ae1400bf2 | 111 | #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B /**< Connection Interval Unacceptable. */ |
Vincent Coubard |
640:c90ae1400bf2 | 112 | #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C /**< Directed Adverisement Timeout. */ |
Vincent Coubard |
640:c90ae1400bf2 | 113 | #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D /**< Connection Terminated due to MIC Failure. */ |
Vincent Coubard |
640:c90ae1400bf2 | 114 | #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E /**< Connection Failed to be Established. */ |
Vincent Coubard |
640:c90ae1400bf2 | 115 | |
Vincent Coubard |
640:c90ae1400bf2 | 116 | /** @} */ |
Vincent Coubard |
640:c90ae1400bf2 | 117 | |
Vincent Coubard |
640:c90ae1400bf2 | 118 | |
Vincent Coubard |
640:c90ae1400bf2 | 119 | #endif // BLE_HCI_H__ |
Vincent Coubard |
640:c90ae1400bf2 | 120 | |
Vincent Coubard |
640:c90ae1400bf2 | 121 | /** @} */ |