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

Dependents:   nRF51822 nRF51822

Committer:
vcoubard
Date:
Thu Apr 07 17:37:56 2016 +0100
Revision:
28:041dac1366b2
Parent:
20:a90c48eb1d30
Child:
29:286940b7ee5a
Synchronized with git rev 012b8118
Author: Liyou Zhou
Pull in files from sdk 10.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 28:041dac1366b2 1 /*
vcoubard 28:041dac1366b2 2 * Copyright (c) Nordic Semiconductor ASA
vcoubard 28:041dac1366b2 3 * All rights reserved.
vcoubard 28:041dac1366b2 4 *
vcoubard 28:041dac1366b2 5 * Redistribution and use in source and binary forms, with or without modification,
vcoubard 28:041dac1366b2 6 * are permitted provided that the following conditions are met:
vcoubard 28:041dac1366b2 7 *
vcoubard 28:041dac1366b2 8 * 1. Redistributions of source code must retain the above copyright notice, this
vcoubard 28:041dac1366b2 9 * list of conditions and the following disclaimer.
vcoubard 28:041dac1366b2 10 *
vcoubard 28:041dac1366b2 11 * 2. Redistributions in binary form must reproduce the above copyright notice, this
vcoubard 28:041dac1366b2 12 * list of conditions and the following disclaimer in the documentation and/or
vcoubard 28:041dac1366b2 13 * other materials provided with the distribution.
vcoubard 28:041dac1366b2 14 *
vcoubard 28:041dac1366b2 15 * 3. Neither the name of Nordic Semiconductor ASA nor the names of other
vcoubard 28:041dac1366b2 16 * contributors to this software may be used to endorse or promote products
vcoubard 28:041dac1366b2 17 * derived from this software without specific prior written permission.
vcoubard 28:041dac1366b2 18 *
vcoubard 28:041dac1366b2 19 * 4. This software must only be used in a processor manufactured by Nordic
vcoubard 28:041dac1366b2 20 * Semiconductor ASA, or in a processor manufactured by a third party that
vcoubard 28:041dac1366b2 21 * is used in combination with a processor manufactured by Nordic Semiconductor.
vcoubard 28:041dac1366b2 22 *
vcoubard 28:041dac1366b2 23 *
vcoubard 28:041dac1366b2 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
vcoubard 28:041dac1366b2 25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
vcoubard 28:041dac1366b2 26 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
vcoubard 28:041dac1366b2 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
vcoubard 28:041dac1366b2 28 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
vcoubard 28:041dac1366b2 29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
vcoubard 28:041dac1366b2 30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
vcoubard 28:041dac1366b2 31 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
vcoubard 28:041dac1366b2 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
vcoubard 28:041dac1366b2 33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vcoubard 28:041dac1366b2 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 @addtogroup nrf_error
vcoubard 1:ebc0e0ef0a11 41 @{
vcoubard 1:ebc0e0ef0a11 42 @ingroup BLE_COMMON
vcoubard 1:ebc0e0ef0a11 43 @}
vcoubard 1:ebc0e0ef0a11 44
vcoubard 1:ebc0e0ef0a11 45 @defgroup ble_err General error codes
vcoubard 1:ebc0e0ef0a11 46 @{
vcoubard 1:ebc0e0ef0a11 47
vcoubard 1:ebc0e0ef0a11 48 @brief General error code definitions for the BLE API.
vcoubard 1:ebc0e0ef0a11 49
vcoubard 1:ebc0e0ef0a11 50 @ingroup BLE_COMMON
vcoubard 1:ebc0e0ef0a11 51 */
vcoubard 1:ebc0e0ef0a11 52 #ifndef NRF_BLE_ERR_H__
vcoubard 1:ebc0e0ef0a11 53 #define NRF_BLE_ERR_H__
vcoubard 1:ebc0e0ef0a11 54
vcoubard 1:ebc0e0ef0a11 55 #include "nrf_error.h"
vcoubard 1:ebc0e0ef0a11 56
vcoubard 1:ebc0e0ef0a11 57 /* @defgroup BLE_ERRORS Error Codes
vcoubard 1:ebc0e0ef0a11 58 * @{ */
vcoubard 1:ebc0e0ef0a11 59 #define BLE_ERROR_NOT_ENABLED (NRF_ERROR_STK_BASE_NUM+0x001) /**< @ref sd_ble_enable has not been called. */
vcoubard 1:ebc0e0ef0a11 60 #define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM+0x002) /**< Invalid connection handle. */
vcoubard 1:ebc0e0ef0a11 61 #define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM+0x003) /**< Invalid attribute handle. */
vcoubard 1:ebc0e0ef0a11 62 #define BLE_ERROR_NO_TX_BUFFERS (NRF_ERROR_STK_BASE_NUM+0x004) /**< Buffer capacity exceeded. */
vcoubard 1:ebc0e0ef0a11 63 #define BLE_ERROR_INVALID_ROLE (NRF_ERROR_STK_BASE_NUM+0x005) /**< Invalid role. */
vcoubard 1:ebc0e0ef0a11 64 /** @} */
vcoubard 1:ebc0e0ef0a11 65
vcoubard 1:ebc0e0ef0a11 66
vcoubard 1:ebc0e0ef0a11 67 /** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges
vcoubard 1:ebc0e0ef0a11 68 * @brief Assignment of subranges for module specific error codes.
vcoubard 1:ebc0e0ef0a11 69 * @note For specific error codes, see ble_<module>.h or ble_error_<module>.h.
vcoubard 1:ebc0e0ef0a11 70 * @{ */
vcoubard 1:ebc0e0ef0a11 71 #define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x100) /**< L2CAP specific errors. */
vcoubard 1:ebc0e0ef0a11 72 #define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x200) /**< GAP specific errors. */
vcoubard 1:ebc0e0ef0a11 73 #define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x300) /**< GATT client specific errors. */
vcoubard 1:ebc0e0ef0a11 74 #define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x400) /**< GATT server specific errors. */
vcoubard 1:ebc0e0ef0a11 75 /** @} */
vcoubard 1:ebc0e0ef0a11 76
vcoubard 1:ebc0e0ef0a11 77 #endif
vcoubard 1:ebc0e0ef0a11 78
vcoubard 1:ebc0e0ef0a11 79
vcoubard 1:ebc0e0ef0a11 80 /**
vcoubard 1:ebc0e0ef0a11 81 @}
vcoubard 1:ebc0e0ef0a11 82 @}
vcoubard 1:ebc0e0ef0a11 83 */