Nordic nrf51 sdk sources. Mirrored from https://github.com/ARMmbed/nrf51-sdk.

Dependents:   nRF51822 nRF51822

Committer:
vcoubard
Date:
Thu Apr 07 17:37:40 2016 +0100
Revision:
19:47192cb9def7
Parent:
10:233fefd8162b
Child:
20:a90c48eb1d30
Synchronized with git rev 9251259f
Author: Liyou Zhou
Copy over coresponding files from nordic-sdk 9.0.0

Who changed what in which revision?

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