BLE_Nano nRF51 Central heart rate

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ble_hci.h Source File

ble_hci.h

00001 /* 
00002  * Copyright (c) Nordic Semiconductor ASA
00003  * All rights reserved.
00004  * 
00005  * Redistribution and use in source and binary forms, with or without modification,
00006  * are permitted provided that the following conditions are met:
00007  * 
00008  *   1. Redistributions of source code must retain the above copyright notice, this
00009  *   list of conditions and the following disclaimer.
00010  * 
00011  *   2. Redistributions in binary form must reproduce the above copyright notice, this
00012  *   list of conditions and the following disclaimer in the documentation and/or
00013  *   other materials provided with the distribution.
00014  * 
00015  *   3. Neither the name of Nordic Semiconductor ASA nor the names of other
00016  *   contributors to this software may be used to endorse or promote products
00017  *   derived from this software without specific prior written permission.
00018  * 
00019  *   4. This software must only be used in a processor manufactured by Nordic
00020  *   Semiconductor ASA, or in a processor manufactured by a third party that
00021  *   is used in combination with a processor manufactured by Nordic Semiconductor.
00022  * 
00023  * 
00024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00025  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00026  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
00028  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00029  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00031  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00032  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00033  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034  * 
00035  */
00036 
00037 /**
00038   @addtogroup BLE_COMMON 
00039   @{
00040 */
00041 
00042 
00043 #ifndef BLE_HCI_H__
00044 #define BLE_HCI_H__ 
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048 
00049 /** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes
00050  * @{ */
00051 
00052 #define BLE_HCI_STATUS_CODE_SUCCESS                        0x00   /**< Success. */
00053 #define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND           0x01   /**< Unknown BLE Command. */
00054 #define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER  0x02   /**< Unknown Connection Identifier. */
00055 /*0x03 Hardware Failure
00056 0x04 Page Timeout
00057 */
00058 #define BLE_HCI_AUTHENTICATION_FAILURE                     0x05   /**< Authentication Failure. */
00059 #define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING             0x06   /**< Pin or Key missing. */
00060 #define BLE_HCI_MEMORY_CAPACITY_EXCEEDED                   0x07   /**< Memory Capacity Exceeded. */
00061 #define BLE_HCI_CONNECTION_TIMEOUT                         0x08   /**< Connection Timeout. */
00062 /*0x09 Connection Limit Exceeded
00063 0x0A Synchronous Connection Limit To A Device Exceeded
00064 0x0B ACL Connection Already Exists*/
00065 #define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED             0x0C   /**< Command Disallowed. */
00066 /*0x0D Connection Rejected due to Limited Resources
00067 0x0E Connection Rejected Due To Security Reasons
00068 0x0F Connection Rejected due to Unacceptable BD_ADDR
00069 0x10 Connection Accept Timeout Exceeded
00070 0x11 Unsupported Feature or Parameter Value*/
00071 #define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12  /**< Invalid BLE Command Parameters. */
00072 #define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION           0x13  /**< Remote User Terminated Connection. */
00073 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES 0x14  /**< Remote Device Terminated Connection due to low resources.*/
00074 #define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF     0x15  /**< Remote Device Terminated Connection due to power off. */
00075 #define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION            0x16  /**< Local Host Terminated Connection. */
00076 /*
00077 0x17 Repeated Attempts
00078 0x18 Pairing Not Allowed
00079 0x19 Unknown LMP PDU
00080 */
00081 #define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A                   /**< Unsupported Remote Feature. */
00082 /*
00083 0x1B SCO Offset Rejected
00084 0x1C SCO Interval Rejected
00085 0x1D SCO Air Mode Rejected*/
00086 #define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS     0x1E       /**< Invalid LMP Parameters. */
00087 #define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR          0x1F       /**< Unspecified Error. */
00088 /*0x20 Unsupported LMP Parameter Value
00089 0x21 Role Change Not Allowed
00090 */
00091 #define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT       0x22       /**< LMP Response Timeout. */
00092 /*0x23 LMP Error Transaction Collision*/
00093 #define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED        0x24       /**< LMP PDU Not Allowed. */
00094 /*0x25 Encryption Mode Not Acceptable
00095 0x26 Link Key Can Not be Changed
00096 0x27 Requested QoS Not Supported
00097 */
00098 #define BLE_HCI_INSTANT_PASSED                         0x28       /**< Instant Passed. */
00099 #define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED      0x29       /**< Pairing with Unit Key Unsupported. */
00100 #define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION        0x2A       /**< Different Transaction Collision. */
00101 /*
00102 0x2B Reserved
00103 0x2C QoS Unacceptable Parameter
00104 0x2D QoS Rejected
00105 0x2E Channel Classification Not Supported
00106 0x2F Insufficient Security
00107 0x30 Parameter Out Of Mandatory Range
00108 0x31 Reserved
00109 0x32 Role Switch Pending
00110 0x33 Reserved
00111 0x34 Reserved Slot Violation
00112 0x35 Role Switch Failed
00113 0x36 Extended Inquiry Response Too Large
00114 0x37 Secure Simple Pairing Not Supported By Host.
00115 0x38 Host Busy - Pairing
00116 0x39 Connection Rejected due to No Suitable Channel Found*/
00117 #define BLE_HCI_CONTROLLER_BUSY                        0x3A       /**< Controller Busy. */
00118 #define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE             0x3B       /**< Connection Interval Unacceptable. */
00119 #define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT            0x3C       /**< Directed Adverisement Timeout. */
00120 #define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE     0x3D       /**< Connection Terminated due to MIC Failure. */
00121 #define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED          0x3E       /**< Connection Failed to be Established. */
00122 
00123 /** @} */
00124 
00125 
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129 #endif // BLE_HCI_H__
00130 
00131 /** @} */
00132