BLE_Nano nRF51 Central heart rate

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ble_err.h Source File

ble_err.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   @addtogroup  nrf_error
00041   @{
00042     @ingroup BLE_COMMON
00043   @}
00044 
00045   @defgroup ble_err General error codes
00046   @{
00047 
00048   @brief General error code definitions for the BLE API.
00049 
00050   @ingroup BLE_COMMON
00051 */
00052 #ifndef NRF_BLE_ERR_H__
00053 #define NRF_BLE_ERR_H__
00054 
00055 #include "nrf_error.h"
00056 
00057 #ifdef __cplusplus
00058 extern "C" {
00059 #endif
00060 
00061 /* @defgroup BLE_ERRORS Error Codes
00062  * @{ */
00063 #define BLE_ERROR_NOT_ENABLED            (NRF_ERROR_STK_BASE_NUM+0x001) /**< @ref sd_ble_enable has not been called. */
00064 #define BLE_ERROR_INVALID_CONN_HANDLE    (NRF_ERROR_STK_BASE_NUM+0x002) /**< Invalid connection handle. */
00065 #define BLE_ERROR_INVALID_ATTR_HANDLE    (NRF_ERROR_STK_BASE_NUM+0x003) /**< Invalid attribute handle. */
00066 #define BLE_ERROR_NO_TX_PACKETS          (NRF_ERROR_STK_BASE_NUM+0x004) /**< Not enough application packets available on this connection. */
00067 #define BLE_ERROR_INVALID_ROLE           (NRF_ERROR_STK_BASE_NUM+0x005) /**< Invalid role. */
00068 /** @} */
00069 
00070 
00071 /** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges
00072  *  @brief Assignment of subranges for module specific error codes.
00073  *  @note For specific error codes, see ble_<module>.h or ble_error_<module>.h.
00074  * @{ */
00075 #define NRF_L2CAP_ERR_BASE             (NRF_ERROR_STK_BASE_NUM+0x100) /**< L2CAP specific errors. */
00076 #define NRF_GAP_ERR_BASE               (NRF_ERROR_STK_BASE_NUM+0x200) /**< GAP specific errors. */
00077 #define NRF_GATTC_ERR_BASE             (NRF_ERROR_STK_BASE_NUM+0x300) /**< GATT client specific errors. */
00078 #define NRF_GATTS_ERR_BASE             (NRF_ERROR_STK_BASE_NUM+0x400) /**< GATT server specific errors. */
00079 /** @} */
00080 
00081 #ifdef __cplusplus
00082 }
00083 #endif
00084 #endif
00085 
00086 
00087 /**
00088   @}
00089   @}
00090 */
00091