Namespace softdevice headers to avoid conflict wih other headers.

pull/2234/head
Vincent Coubard 2016-06-17 11:13:23 +01:00
parent 7ad0af3265
commit 1b826f286b
59 changed files with 458 additions and 427 deletions

View File

@ -44,16 +44,16 @@
*/
#ifndef BLE_H__
#define BLE_H__
#ifndef NRF_BLE_H__
#define NRF_BLE_H__
#include "ble_ranges.h"
#include "ble_types.h"
#include "ble_gap.h"
#include "ble_l2cap.h"
#include "ble_gatt.h"
#include "ble_gattc.h"
#include "ble_gatts.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_l2cap.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_gattc.h"
#include "nrf_ble_gatts.h"
#ifdef __cplusplus
extern "C" {
@ -624,7 +624,7 @@ SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_op
#ifdef __cplusplus
}
#endif
#endif /* BLE_H__ */
#endif /* NRF_BLE_H__ */
/**
@}

View File

@ -40,11 +40,11 @@
@brief Definitions and prototypes for the GAP interface.
*/
#ifndef BLE_GAP_H__
#define BLE_GAP_H__
#ifndef NRF_BLE_GAP_H__
#define NRF_BLE_GAP_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -659,8 +659,8 @@ typedef struct
typedef struct
{
uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
@ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */
} ble_gap_evt_passkey_display_t;
@ -680,7 +680,7 @@ typedef struct
/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */
typedef struct
{
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */
uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */
} ble_gap_evt_lesc_dhkey_request_t;
@ -720,7 +720,7 @@ typedef struct
ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */
ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */
ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */
} ble_gap_sec_keys_t;
@ -1367,8 +1367,8 @@ SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_
* @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.
* @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have
* already been provided during a previous call to @ref sd_ble_gap_authenticate.
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.
* Note that the SoftDevice expects the application to provide memory for storing the
* peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key
@ -1735,7 +1735,7 @@ SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void));
#ifdef __cplusplus
}
#endif
#endif // BLE_GAP_H__
#endif // NRF_BLE_GAP_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -40,11 +40,11 @@
@brief Common definitions and prototypes for the GATT interfaces.
*/
#ifndef BLE_GATT_H__
#define BLE_GATT_H__
#ifndef NRF_BLE_GATT_H__
#define NRF_BLE_GATT_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#ifdef __cplusplus
extern "C" {
@ -202,7 +202,7 @@ typedef struct
#ifdef __cplusplus
}
#endif
#endif // BLE_GATT_H__
#endif // NRF_BLE_GATT_H__
/** @} */

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -40,12 +40,12 @@
@brief Definitions and prototypes for the GATT Client interface.
*/
#ifndef BLE_GATTC_H__
#define BLE_GATTC_H__
#ifndef NRF_BLE_GATTC_H__
#define NRF_BLE_GATTC_H__
#include "ble_gatt.h"
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -215,10 +215,10 @@ typedef struct
} ble_gattc_evt_attr_info_disc_rsp_t;
/**@brief GATT read by UUID handle value pair. */
typedef struct
typedef struct
{
uint16_t handle; /**< Attribute Handle. */
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
Please note that this pointer is absolute to the memory provided by the user when retrieving the event,
so it will effectively point to a location inside the handle_value array. */
} ble_gattc_handle_value_t;
@ -305,7 +305,7 @@ typedef struct
/**@brief Initiate or continue a GATT Primary Service Discovery procedure.
*
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* If the last service has not been reached, this function must be called again with an updated start handle value to continue the search.
*
* @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with
@ -314,11 +314,11 @@ typedef struct
* @events
* @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] start_handle Handle to start searching from.
* @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned.
@ -340,11 +340,11 @@ SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_se
* @events
* @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_REL_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
@ -373,7 +373,7 @@ SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships
* @mscs
* @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
@ -398,7 +398,7 @@ SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteris
* @mscs
* @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on.
*
@ -419,11 +419,11 @@ SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_dis
* @events
* @event{BLE_GATTC_EVT_DESC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_UUID_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_uuid Pointer to a Characteristic value UUID to read.
* @param[in] p_handle_range A pointer to the range of handles to perform this procedure on.
@ -440,17 +440,17 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_b
/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure.
*
* @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* complete value.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute to be read.
* @param[in] offset Offset into the attribute value to be read.
@ -465,16 +465,16 @@ SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint
/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.
*
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_MULT_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.
* @param[in] handle_count The number of handles in p_handles.
@ -490,24 +490,24 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(ui
/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure.
*
* @details This function can perform all write procedures described in GATT.
* @details This function can perform all write procedures described in GATT.
*
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details.
*
* @events
* @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}
* @mmsc{@ref BLE_COMMON_APP_BUFF_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_write_params A pointer to a write parameters structure.
*
@ -524,11 +524,11 @@ SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, bl
/**@brief Send a Handle Value Confirmation to the GATT Server.
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_HVI_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute in the indication.
*
@ -561,7 +561,7 @@ SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discove
#ifdef __cplusplus
}
#endif
#endif /* BLE_GATTC_H__ */
#endif /* NRF_BLE_GATTC_H__ */
/**
@}

View File

@ -40,14 +40,14 @@
@brief Definitions and prototypes for the GATTS interface.
*/
#ifndef BLE_GATTS_H__
#define BLE_GATTS_H__
#ifndef NRF_BLE_GATTS_H__
#define NRF_BLE_GATTS_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "ble_l2cap.h"
#include "ble_gap.h"
#include "ble_gatt.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_l2cap.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_gatt.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -715,7 +715,7 @@ SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, b
#ifdef __cplusplus
}
#endif
#endif // BLE_GATTS_H__
#endif // NRF_BLE_GATTS_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,17 +31,17 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@addtogroup BLE_COMMON
@addtogroup BLE_COMMON
@{
*/
#ifndef BLE_HCI_H__
#define BLE_HCI_H__
#ifndef NRF_BLE_HCI_H__
#define NRF_BLE_HCI_H__
#ifdef __cplusplus
extern "C" {
#endif
@ -126,6 +126,6 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif // BLE_HCI_H__
#endif // NRF_BLE_HCI_H__
/** @} */

View File

@ -40,12 +40,12 @@
@brief Definitions and prototypes for the L2CAP interface.
*/
#ifndef BLE_L2CAP_H__
#define BLE_L2CAP_H__
#ifndef NRF_BLE_L2CAP_H__
#define NRF_BLE_L2CAP_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "ble_err.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_err.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -195,7 +195,7 @@ SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2ca
#ifdef __cplusplus
}
#endif
#endif // BLE_L2CAP_H__
#endif // NRF_BLE_L2CAP_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -54,8 +54,8 @@
which defines names of each individual SVC code based on the range start value.
*/
#ifndef BLE_RANGES_H__
#define BLE_RANGES_H__
#ifndef NRF_BLE_RANGES_H__
#define NRF_BLE_RANGES_H__
#ifdef __cplusplus
extern "C" {
@ -118,7 +118,7 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif /* BLE_RANGES_H__ */
#endif /* NRF_BLE_RANGES_H__ */
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -43,8 +43,8 @@
@brief Common types and macro definitions for the BLE SoftDevice.
*/
#ifndef BLE_TYPES_H__
#define BLE_TYPES_H__
#ifndef NRF_BLE_TYPES_H__
#define NRF_BLE_TYPES_H__
#include <stdint.h>
@ -181,7 +181,7 @@ extern "C" {
/** @brief 128 bit UUID values. */
typedef struct
{
{
uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */
} ble_uuid128_t;
@ -197,7 +197,7 @@ typedef struct
}
#endif
#endif /* BLE_TYPES_H__ */
#endif /* NRF_BLE_TYPES_H__ */
/**
@}

View File

@ -44,16 +44,16 @@
*/
#ifndef BLE_H__
#define BLE_H__
#ifndef NRF_BLE_H__
#define NRF_BLE_H__
#include "ble_ranges.h"
#include "ble_types.h"
#include "ble_gap.h"
#include "ble_l2cap.h"
#include "ble_gatt.h"
#include "ble_gattc.h"
#include "ble_gatts.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_l2cap.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_gattc.h"
#include "nrf_ble_gatts.h"
#ifdef __cplusplus
extern "C" {
@ -624,7 +624,7 @@ SVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_op
#ifdef __cplusplus
}
#endif
#endif /* BLE_H__ */
#endif /* NRF_BLE_H__ */
/**
@}

View File

@ -40,11 +40,11 @@
@brief Definitions and prototypes for the GAP interface.
*/
#ifndef BLE_GAP_H__
#define BLE_GAP_H__
#ifndef NRF_BLE_GAP_H__
#define NRF_BLE_GAP_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -659,8 +659,8 @@ typedef struct
typedef struct
{
uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
@ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */
} ble_gap_evt_passkey_display_t;
@ -680,7 +680,7 @@ typedef struct
/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */
typedef struct
{
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */
uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */
} ble_gap_evt_lesc_dhkey_request_t;
@ -720,7 +720,7 @@ typedef struct
ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */
ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */
ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */
} ble_gap_sec_keys_t;
@ -1367,8 +1367,8 @@ SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_
* @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.
* @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have
* already been provided during a previous call to @ref sd_ble_gap_authenticate.
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.
* Note that the SoftDevice expects the application to provide memory for storing the
* peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key
@ -1735,7 +1735,7 @@ SVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void));
#ifdef __cplusplus
}
#endif
#endif // BLE_GAP_H__
#endif // NRF_BLE_GAP_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -40,11 +40,11 @@
@brief Common definitions and prototypes for the GATT interfaces.
*/
#ifndef BLE_GATT_H__
#define BLE_GATT_H__
#ifndef NRF_BLE_GATT_H__
#define NRF_BLE_GATT_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#ifdef __cplusplus
extern "C" {
@ -202,7 +202,7 @@ typedef struct
#ifdef __cplusplus
}
#endif
#endif // BLE_GATT_H__
#endif // NRF_BLE_GATT_H__
/** @} */

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -40,12 +40,12 @@
@brief Definitions and prototypes for the GATT Client interface.
*/
#ifndef BLE_GATTC_H__
#define BLE_GATTC_H__
#ifndef NRF_BLE_GATTC_H__
#define NRF_BLE_GATTC_H__
#include "ble_gatt.h"
#include "ble_types.h"
#include "ble_ranges.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -215,10 +215,10 @@ typedef struct
} ble_gattc_evt_attr_info_disc_rsp_t;
/**@brief GATT read by UUID handle value pair. */
typedef struct
typedef struct
{
uint16_t handle; /**< Attribute Handle. */
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
Please note that this pointer is absolute to the memory provided by the user when retrieving the event,
so it will effectively point to a location inside the handle_value array. */
} ble_gattc_handle_value_t;
@ -305,7 +305,7 @@ typedef struct
/**@brief Initiate or continue a GATT Primary Service Discovery procedure.
*
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* If the last service has not been reached, this function must be called again with an updated start handle value to continue the search.
*
* @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with
@ -314,11 +314,11 @@ typedef struct
* @events
* @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] start_handle Handle to start searching from.
* @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned.
@ -340,11 +340,11 @@ SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_se
* @events
* @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_REL_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
@ -373,7 +373,7 @@ SVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t, sd_ble_gattc_relationships
* @mscs
* @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
@ -398,7 +398,7 @@ SVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t, sd_ble_gattc_characteris
* @mscs
* @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on.
*
@ -419,11 +419,11 @@ SVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t, sd_ble_gattc_descriptors_dis
* @events
* @event{BLE_GATTC_EVT_DESC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_UUID_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_uuid Pointer to a Characteristic value UUID to read.
* @param[in] p_handle_range A pointer to the range of handles to perform this procedure on.
@ -440,17 +440,17 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t, sd_ble_gattc_char_value_b
/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure.
*
* @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* complete value.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute to be read.
* @param[in] offset Offset into the attribute value to be read.
@ -465,16 +465,16 @@ SVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint
/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.
*
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_MULT_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.
* @param[in] handle_count The number of handles in p_handles.
@ -490,24 +490,24 @@ SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(ui
/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure.
*
* @details This function can perform all write procedures described in GATT.
* @details This function can perform all write procedures described in GATT.
*
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details.
*
* @events
* @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}
* @mmsc{@ref BLE_COMMON_APP_BUFF_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_write_params A pointer to a write parameters structure.
*
@ -524,11 +524,11 @@ SVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, bl
/**@brief Send a Handle Value Confirmation to the GATT Server.
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_HVI_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute in the indication.
*
@ -561,7 +561,7 @@ SVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t, sd_ble_gattc_attr_info_discove
#ifdef __cplusplus
}
#endif
#endif /* BLE_GATTC_H__ */
#endif /* NRF_BLE_GATTC_H__ */
/**
@}

View File

@ -40,14 +40,14 @@
@brief Definitions and prototypes for the GATTS interface.
*/
#ifndef BLE_GATTS_H__
#define BLE_GATTS_H__
#ifndef NRF_BLE_GATTS_H__
#define NRF_BLE_GATTS_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "ble_l2cap.h"
#include "ble_gap.h"
#include "ble_gatt.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_l2cap.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_gatt.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -715,7 +715,7 @@ SVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, b
#ifdef __cplusplus
}
#endif
#endif // BLE_GATTS_H__
#endif // NRF_BLE_GATTS_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,17 +31,17 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@addtogroup BLE_COMMON
@addtogroup BLE_COMMON
@{
*/
#ifndef BLE_HCI_H__
#define BLE_HCI_H__
#ifndef NRF_BLE_HCI_H__
#define NRF_BLE_HCI_H__
#ifdef __cplusplus
extern "C" {
#endif
@ -126,6 +126,6 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif // BLE_HCI_H__
#endif // NRF_BLE_HCI_H__
/** @} */

View File

@ -40,12 +40,12 @@
@brief Definitions and prototypes for the L2CAP interface.
*/
#ifndef BLE_L2CAP_H__
#define BLE_L2CAP_H__
#ifndef NRF_BLE_L2CAP_H__
#define NRF_BLE_L2CAP_H__
#include "ble_types.h"
#include "ble_ranges.h"
#include "ble_err.h"
#include "nrf_ble_types.h"
#include "nrf_ble_ranges.h"
#include "nrf_ble_err.h"
#include "nrf_svc.h"
#ifdef __cplusplus
@ -195,7 +195,7 @@ SVCALL(SD_BLE_L2CAP_TX, uint32_t, sd_ble_l2cap_tx(uint16_t conn_handle, ble_l2ca
#ifdef __cplusplus
}
#endif
#endif // BLE_L2CAP_H__
#endif // NRF_BLE_L2CAP_H__
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -54,8 +54,8 @@
which defines names of each individual SVC code based on the range start value.
*/
#ifndef BLE_RANGES_H__
#define BLE_RANGES_H__
#ifndef NRF_BLE_RANGES_H__
#define NRF_BLE_RANGES_H__
#ifdef __cplusplus
extern "C" {
@ -118,7 +118,7 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#endif /* BLE_RANGES_H__ */
#endif /* NRF_BLE_RANGES_H__ */
/**
@}

View File

@ -1,26 +1,26 @@
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
@ -43,8 +43,8 @@
@brief Common types and macro definitions for the BLE SoftDevice.
*/
#ifndef BLE_TYPES_H__
#define BLE_TYPES_H__
#ifndef NRF_BLE_TYPES_H__
#define NRF_BLE_TYPES_H__
#include <stdint.h>
@ -181,7 +181,7 @@ extern "C" {
/** @brief 128 bit UUID values. */
typedef struct
{
{
uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */
} ble_uuid128_t;
@ -197,7 +197,7 @@ typedef struct
}
#endif
#endif /* BLE_TYPES_H__ */
#endif /* NRF_BLE_TYPES_H__ */
/**
@}

View File

@ -17,7 +17,7 @@
* @ingroup ble_sdk_lib
* @brief Module for handling connectable BLE advertising.
*
* @details The Advertising Module handles connectable advertising for your application. It can
* @details The Advertising Module handles connectable advertising for your application. It can
* be configured with advertising modes to suit most typical use cases.
* Your main application can react to changes in advertising modes
* if an event handler is provided.
@ -34,8 +34,8 @@
#define BLE_ADVERTISING_H__
#include <stdint.h>
#include "ble_gattc.h"
#include "ble.h"
#include "nrf_ble_gattc.h"
#include "nrf_ble.h"
#include "nrf_error.h"
#include "ble_advdata.h"
@ -116,7 +116,7 @@ typedef struct
#define BLE_ADV_FAST_ENABLED true
#define BLE_ADV_FAST_DISABLED false
#define BLE_ADV_SLOW_ENABLED true
#define BLE_ADV_SLOW_DISABLED false
@ -176,7 +176,7 @@ uint32_t ble_advertising_init(ble_advdata_t const * p_advdata,
* @param[in] advertising_mode Advertising mode.
*
* @retval @ref NRF_SUCCESS On success, else an error code indicating reason for failure.
* @retval @ref NRF_ERROR_INVALID_STATE
* @retval @ref NRF_ERROR_INVALID_STATE
*/
uint32_t ble_advertising_start(ble_adv_mode_t advertising_mode);

View File

@ -11,7 +11,7 @@
#include "ble_db_discovery.h"
#include <stdlib.h>
#include "ble.h"
#include "nrf_ble.h"
#include "nrf_log.h"
#include "sdk_common.h"
@ -291,8 +291,8 @@ static void on_srv_disc_completion(ble_db_discovery_t * p_db_discovery,
* @param[in] p_db_discovery The pointer to the DB Discovery structure.
* @param[in] p_after_char The pointer to the last discovered characteristic.
*
* @retval True if a characteristic discovery is required.
* @retval False if a characteristic discovery is NOT required.
* @retval True if a characteristic discovery is required.
* @retval False if a characteristic discovery is NOT required.
*/
static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery,
ble_gattc_char_t * p_after_char)
@ -307,7 +307,7 @@ static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery,
// present. Hence a characteristic discovery is required.
return true;
}
return false;
}
@ -317,7 +317,7 @@ static bool is_char_discovery_reqd(ble_db_discovery_t * const p_db_discovery,
* @details This function finds out if there is a possibility of existence of descriptors between
* current characteristic and the next characteristic. If so, this function will compute
* the handle range on which the descriptors may be present and will return it.
* If the current characteristic is the last known characteristic, then this function
* If the current characteristic is the last known characteristic, then this function
* will use the service end handle to find out if the current characteristic can have
* descriptors.
*
@ -352,7 +352,7 @@ static bool is_desc_discovery_reqd(ble_db_discovery_t * p_db_discovery,
}
p_handle_range->start_handle = p_curr_char->characteristic.handle_value + 1;
// Since the current characteristic is the last characteristic in the service, the end
// handle should be the end handle of the service.
p_handle_range->end_handle =
@ -443,7 +443,7 @@ static uint32_t descriptors_discover(ble_db_discovery_t * const p_db_discovery,
ble_gattc_handle_range_t handle_range;
ble_gatt_db_char_t * p_curr_char_being_discovered;
ble_gatt_db_srv_t * p_srv_being_discovered;
bool is_discovery_reqd = false;
bool is_discovery_reqd = false;
p_srv_being_discovered = &(p_db_discovery->services[p_db_discovery->curr_srv_ind]);
@ -583,7 +583,7 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d
{
uint32_t err_code;
ble_gatt_db_srv_t * p_srv_being_discovered;
bool perform_desc_discov = false;
bool perform_desc_discov = false;
if (p_ble_gattc_evt->conn_handle != p_db_discovery->conn_handle)
{
@ -600,7 +600,7 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d
// Find out the number of characteristics that were previously discovered (in earlier
// characteristic discovery responses, if any).
uint8_t num_chars_prev_disc = p_srv_being_discovered->char_count;
// Find out the number of characteristics that are currently discovered (in the
// characteristic discovery response being handled).
uint8_t num_chars_curr_disc = p_char_disc_rsp_evt->count;
@ -628,9 +628,9 @@ static void on_characteristic_discovery_rsp(ble_db_discovery_t * const p_db_d
p_srv_being_discovered->charateristics[i].cccd_handle = BLE_GATT_HANDLE_INVALID;
}
ble_gattc_char_t * p_last_known_char;
p_last_known_char = &(p_srv_being_discovered->charateristics[i - 1].characteristic);
// If no more characteristic discovery is required, or if the maximum number of supported
@ -826,7 +826,7 @@ uint32_t ble_db_discovery_init(const ble_db_discovery_evt_handler_t evt_handler)
m_evt_handler = evt_handler;
return err_code;
}
@ -880,7 +880,7 @@ uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery,
DB_LOG("[DB]: Starting discovery of service with UUID 0x%x for Connection handle %d\r\n",
p_srv_being_discovered->srv_uuid.uuid, conn_handle);
uint32_t err_code;
err_code = sd_ble_gattc_primary_services_discover(conn_handle,

View File

@ -19,7 +19,7 @@
*
* @details This module contains the APIs and types exposed by the DB Discovery module. These APIs
* and types can be used by the application to perform discovery of a service and its
* characteristics at the peer server. This module can also be used to discover the
* characteristics at the peer server. This module can also be used to discover the
* desired services in multiple remote devices.
*
* @warning The maximum number of characteristics per service that can be discovered by this module
@ -42,8 +42,8 @@
#define BLE_DB_DISCOVERY_H__
#include <stdint.h>
#include "ble_gattc.h"
#include "ble.h"
#include "nrf_ble_gattc.h"
#include "nrf_ble.h"
#include "nrf_error.h"
#include "ble_srv_common.h"
#include "ble_gatt_db.h"
@ -66,7 +66,7 @@ typedef enum
/**@brief Structure for holding the information related to the GATT database at the server.
*
* @details This module identifies a remote database. Use one instance of this structure per
* @details This module identifies a remote database. Use one instance of this structure per
* connection.
*
* @warning This structure must be zero-initialized.
@ -103,7 +103,7 @@ typedef void (* ble_db_discovery_evt_handler_t)(ble_db_discovery_evt_t * p_evt);
/**@brief Function for initializing the DB Discovery module.
*
* @param[in] evt_handler Event handler to be called by the DB discovery module when any event
* @param[in] evt_handler Event handler to be called by the DB discovery module when any event
* related to discovery of the registered service occurs.
*
* @retval NRF_SUCCESS On successful initialization.
@ -125,48 +125,48 @@ uint32_t ble_db_discovery_close(void);
/**@brief Function for registering with the DB Discovery module.
*
* @details The application can use this function to inform which service it is interested in
* @details The application can use this function to inform which service it is interested in
* discovering at the server.
*
* @param[in] p_uuid Pointer to the UUID of the service to be discovered at the server.
*
* @note The total number of services that can be discovered by this module is @ref
* BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of
* registrations possible is equal to the @ref BLE_DB_DISCOVERY_MAX_SRV.
* @note The total number of services that can be discovered by this module is @ref
* BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of
* registrations possible is equal to the @ref BLE_DB_DISCOVERY_MAX_SRV.
*
* @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_NULL When a NULL pointer is passed as input.
* @retval NRF_ERROR_INVALID_STATE If this function is called without calling the
* @retval NRF_ERROR_INVALID_STATE If this function is called without calling the
* @ref ble_db_discovery_init.
* @retval NRF_ERROR_NO_MEM The maximum number of registrations allowed by this module
* has been reached.
*/
uint32_t ble_db_discovery_evt_register(const ble_uuid_t * const p_uuid);
/**@brief Function for starting the discovery of the GATT database at the server.
*
* @warning p_db_discovery structure must be zero-initialized.
*
* @param[out] p_db_discovery Pointer to the DB Discovery structure.
* @param[in] conn_handle The handle of the connection for which the discovery should be
* @param[in] conn_handle The handle of the connection for which the discovery should be
* started.
*
* @retval NRF_SUCCESS Operation success.
* @retval NRF_ERROR_NULL When a NULL pointer is passed as input.
* @retval NRF_ERROR_INVALID_STATE If this function is called without calling the
* @ref ble_db_discovery_init, or without calling
* @retval NRF_ERROR_INVALID_STATE If this function is called without calling the
* @ref ble_db_discovery_init, or without calling
* @ref ble_db_discovery_evt_register.
* @retval NRF_ERROR_BUSY If a discovery is already in progress for the current
* @retval NRF_ERROR_BUSY If a discovery is already in progress for the current
* connection.
*
* @return This API propagates the error code returned by the
* @return This API propagates the error code returned by the
* SoftDevice API @ref sd_ble_gattc_primary_services_discover.
*/
uint32_t ble_db_discovery_start(ble_db_discovery_t * const p_db_discovery,
uint16_t conn_handle);
/**@brief Function for handling the Application's BLE Stack events.
*
* @param[in,out] p_db_discovery Pointer to the DB Discovery structure.

View File

@ -22,9 +22,9 @@
#include <stdint.h>
#include <stdbool.h>
#include "ble.h"
#include "ble_types.h"
#include "ble.h"
#include "nrf_ble.h"
#include "nrf_ble_types.h"
#include "nrf_ble.h"
/**@brief Record Access Control Point opcodes. */
#define RACP_OPCODE_RESERVED 0 /**< Record Access Control Point opcode - Reserved for future use. */
@ -93,4 +93,3 @@ uint8_t ble_racp_encode(const ble_racp_value_t * p_racp_val, uint8_t * p_data);
#endif // BLE_RACP_H__
/** @} */

View File

@ -11,8 +11,8 @@
*/
#include "ble_dfu.h"
#include "ble_types.h"
#include "ble_gatts.h"
#include "nrf_ble_types.h"
#include "nrf_ble_gatts.h"
#include "ble_srv_common.h"
#include <stddef.h>
#include "sdk_common.h"
@ -314,7 +314,7 @@ static uint32_t on_ctrl_pt_write(ble_dfu_t * p_dfu, ble_gatts_evt_write_t * p_bl
(ble_dfu_procedure_t) p_ble_write_evt->data[0],
BLE_DFU_RESP_VAL_OPER_FAILED);
}
ble_dfu_evt.evt.ble_dfu_pkt_write.len = 1;
ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &(p_ble_write_evt->data[1]);
@ -401,7 +401,7 @@ static void on_rw_authorize_req(ble_dfu_t * p_dfu, ble_evt_t * p_ble_evt)
(p_authorize_request->type == BLE_GATTS_AUTHORIZE_TYPE_WRITE)
&&
(p_authorize_request->request.write.handle == p_dfu->dfu_ctrl_pt_handles.value_handle)
&&
&&
(p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_PREP_WRITE_REQ)
&&
(p_ble_evt->evt.gatts_evt.params.authorize_request.request.write.op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW)

View File

@ -28,9 +28,9 @@
#define BLE_DFU_H__
#include <stdint.h>
#include "ble_gatts.h"
#include "ble_gap.h"
#include "ble.h"
#include "nrf_ble_gatts.h"
#include "nrf_ble_gap.h"
#include "nrf_ble.h"
#include "ble_srv_common.h"
#define BLE_DFU_SERVICE_UUID 0x1530 /**< The UUID of the DFU Service. */

View File

@ -11,7 +11,7 @@
*/
#include "ble_advdata.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "ble_srv_common.h"
#include "sdk_common.h"
@ -156,7 +156,7 @@ static uint32_t name_encode(const ble_advdata_t * p_advdata,
err_code = sd_ble_gap_device_name_get(&p_encoded_data[(*p_offset) + ADV_AD_DATA_OFFSET],
&actual_length);
VERIFY_SUCCESS(err_code);
// Check if device intend to use short name and it can fit available data size.
if ((p_advdata->name_type == BLE_ADVDATA_FULL_NAME) && (actual_length <= rem_adv_data_len))
{
@ -312,7 +312,7 @@ static uint32_t uuid_list_sized_encode(const ble_advdata_uuid_list_t * p_uuid_li
uint32_t err_code;
uint8_t encoded_size;
ble_uuid_t uuid = p_uuid_list->p_uuids[i];
// Find encoded uuid size.
err_code = sd_ble_uuid_encode(&uuid, &encoded_size, NULL);
VERIFY_SUCCESS(err_code);
@ -321,7 +321,7 @@ static uint32_t uuid_list_sized_encode(const ble_advdata_uuid_list_t * p_uuid_li
if (encoded_size == uuid_size)
{
uint8_t heading_bytes = (is_heading_written) ? 0 : ADV_AD_DATA_OFFSET;
// Check for buffer overflow
if (((*p_offset) + encoded_size + heading_bytes) > max_size)
{
@ -405,9 +405,9 @@ static uint32_t conn_int_check(const ble_advdata_conn_int_t *p_conn_int)
}
// Check Maximum Connection Interval.
if ((p_conn_int->max_conn_interval < 0x0006) ||
if ((p_conn_int->max_conn_interval < 0x0006) ||
(
(p_conn_int->max_conn_interval > 0x0c80) &&
(p_conn_int->max_conn_interval > 0x0c80) &&
(p_conn_int->max_conn_interval != 0xffff)
)
)
@ -483,10 +483,10 @@ static uint32_t manuf_specific_data_encode(const ble_advdata_manuf_data_t * p_ma
*p_offset += ADV_LENGTH_FIELD_SIZE;
p_encoded_data[*p_offset] = BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA;
*p_offset += ADV_AD_TYPE_FIELD_SIZE;
// Encode Company Identifier.
*p_offset += uint16_encode(p_manuf_sp_data->company_identifier, &p_encoded_data[*p_offset]);
// Encode additional manufacturer specific data.
if (p_manuf_sp_data->data.size > 0)
{
@ -571,7 +571,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata,
max_size);
VERIFY_SUCCESS(err_code);
}
// Encode Security Manager TK value
if (NULL != p_advdata->p_tk_value)
{
@ -605,7 +605,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata,
{
err_code = flags_encode(p_advdata->flags, p_encoded_data, p_len, max_size);
VERIFY_SUCCESS(err_code);
}
}
// Encode TX power level.
if (p_advdata->p_tx_power_level != NULL)
@ -616,7 +616,7 @@ uint32_t adv_data_encode(ble_advdata_t const * const p_advdata,
max_size);
VERIFY_SUCCESS(err_code);
}
// Encode 'more available' uuid list.
if (p_advdata->uuids_more_available.uuid_cnt > 0)
{

View File

@ -25,7 +25,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "ble.h"
#include "nrf_ble.h"
#include "app_util.h"

View File

@ -13,7 +13,7 @@
#include "ble_conn_params.h"
#include <stdlib.h>
#include "nordic_common.h"
#include "ble_hci.h"
#include "nrf_ble_hci.h"
#include "app_timer.h"
#include "ble_srv_common.h"
#include "app_util.h"
@ -35,7 +35,7 @@ static bool is_conn_params_ok(ble_gap_conn_params_t * p_conn_params)
// the client's connection interval.
if (
(p_conn_params->max_conn_interval >= m_preferred_conn_params.min_conn_interval)
&&
&&
(p_conn_params->max_conn_interval <= m_preferred_conn_params.max_conn_interval)
)
{

View File

@ -22,7 +22,7 @@
#define BLE_CONN_PARAMS_H__
#include <stdint.h>
#include "ble.h"
#include "nrf_ble.h"
#include "ble_srv_common.h"
/**@brief Connection Parameters Module event type. */
@ -58,7 +58,7 @@ typedef struct
/**@brief Function for initializing the Connection Parameters module.
*
* @note If the negotiation procedure should be triggered when notification/indication of
* @note If the negotiation procedure should be triggered when notification/indication of
* any characteristic is enabled by the peer, then this function must be called after
* having initialized the services.
*
@ -83,7 +83,7 @@ uint32_t ble_conn_params_stop(void);
/**@brief Function for changing the current connection parameters to a new set.
*
* @details Use this function to change the connection parameters to a new set of parameter
* @details Use this function to change the connection parameters to a new set of parameter
* (ie different from the ones given at init of the module).
* This function is usefull for scenario where most of the time the application
* needs a relatively big connection interval, and just sometimes, for a temporary

View File

@ -14,7 +14,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "ble.h"
#include "nrf_ble.h"
#include "sdk_mapped_flags.h"
#include "app_error.h"

View File

@ -42,7 +42,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "ble.h"
#include "nrf_ble.h"
#include "sdk_mapped_flags.h"
/**@brief Connection handle statuses.

View File

@ -8,20 +8,20 @@
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* the file.
*/
/**@file
*
* @defgroup ble_sdk_lib_gatt_db GATT Database Service Structure
* @{
* @ingroup app_common
*/
#ifndef BLE_GATT_DB_H__
#define BLE_GATT_DB_H__
#include <stdint.h>
#include "ble.h"
#include "ble_gattc.h"
#include "nrf_ble.h"
#include "nrf_ble_gattc.h"
#define BLE_GATT_DB_MAX_CHARS 5 /**< The maximum number of characteristics present in a service record. */
@ -38,7 +38,7 @@ typedef struct
*/
typedef struct
{
ble_uuid_t srv_uuid; /**< UUID of the service. */
ble_uuid_t srv_uuid; /**< UUID of the service. */
uint8_t char_count; /**< Number of characteristics present in the service. */
ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */
ble_gatt_db_char_t charateristics[BLE_GATT_DB_MAX_CHARS]; /**< Array of information related to the characteristics present in the service. This list can extend further than one. */

View File

@ -11,7 +11,7 @@
*/
/* Attention!
* To maintain compliance with Nordic Semiconductor ASAs Bluetooth profile
* To maintain compliance with Nordic Semiconductor ASA<EFBFBD>s Bluetooth profile
* qualification listings, this section of source code must not be modified.
*/
@ -19,7 +19,7 @@
#include <string.h>
#include "nordic_common.h"
#include "app_error.h"
#include "ble.h"
#include "nrf_ble.h"
uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer,
const ble_srv_report_ref_t * p_report_ref)

View File

@ -23,11 +23,11 @@
#include <stdint.h>
#include <stdbool.h>
#include "ble_types.h"
#include "nrf_ble_types.h"
#include "app_util.h"
#include "ble.h"
#include "ble_gap.h"
#include "ble_gatt.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_gatt.h"
/** @defgroup UUID_SERVICES Service UUID definitions
* @{ */
@ -169,7 +169,7 @@ typedef void (*ble_srv_error_handler_t) (uint32_t nrf_error);
/**@brief Value of a Report Reference descriptor.
/**@brief Value of a Report Reference descriptor.
*
* @details This is mapping information that maps the parent characteristic to the Report ID(s) and
* Report Type(s) defined within a Report Map characteristic.
@ -225,7 +225,7 @@ static __INLINE bool ble_srv_is_notification_enabled(uint8_t const * p_encoded_d
uint16_t cccd_value = uint16_decode(p_encoded_data);
return ((cccd_value & BLE_GATT_HVX_NOTIFICATION) != 0);
}
/**@brief Function for decoding a CCCD value, and then testing if indication is
* enabled.
*
@ -333,7 +333,7 @@ typedef struct
} ble_add_descr_params_t;
/**@brief Function for adding a characteristic to a given service.
/**@brief Function for adding a characteristic to a given service.
*
* If no pointer is given for the initial value,
* the initial length parameter will be ignored and the initial length will be 0.

View File

@ -30,7 +30,7 @@
* all contextual information is flushed. For example, SMP Information Exchanged during
* pairing and GATT Configuration is not retained on disconnection.
*
* Note that this module allows management of contextual information but
* Note that this module allows management of contextual information but
* does not provide an interface for connection management. Therefore, entering connectible
* mode, connection establishment, or disconnection of a link with peer is not in scope
* of this module.
@ -67,8 +67,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "sdk_common.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "device_manager_cnfg.h"
/**
@ -79,7 +79,7 @@
* @details Possible Service/Protocol context per peer device. The Device Manager provides the
* functionality of persistently storing the Service/Protocol context and can automatically
* load them when needed.
* For example system attributes for a GATT Server. Based on the nature of the application,
* For example system attributes for a GATT Server. Based on the nature of the application,
* not all service types may be needed. The application can specify
* only the service/protocol context it wants to use at the time of registration.
* @{
@ -193,7 +193,7 @@ typedef uint8_t dm_application_instance_t;
/**
* @brief Connection Instance.
*
* @details Identifies connection instance for an active device. This instance is allocated by the
* @details Identifies connection instance for an active device. This instance is allocated by the
* device manager when a connection is established and is notified with DM_EVT_CONNECTION
* with the event result NRF_SUCCESS.
*/
@ -254,7 +254,7 @@ typedef struct dm_sign_key
/** @brief Security keys. */
typedef struct dm_sec_keyset
{
union
union
{
dm_enc_key_t * p_enc_key; /**< Pointer to Device Manager encryption information structure. */
} enc_key;
@ -364,7 +364,7 @@ typedef struct
* @param[in] p_handle Identifies the peer for which the event is being notified.
* @param[in] p_event Identifies the event, any associated parameters and parameter length.
* See \ref dm_events for details on event types and their significance.
* @param[in,out] event_result Provide additional information on the event.
* @param[in,out] event_result Provide additional information on the event.
* In addition to SDK error codes there is also a return value
* indicating if maximum number of connections has been reached when connecting or bonding.
*
@ -423,7 +423,7 @@ typedef enum
* - Context Management APIs.
* - Utility APIs.
*
* MSCs describe usage of these APIs.
* MSCs describe usage of these APIs.
* See @ref dm_msc.
* @{
*/
@ -462,7 +462,7 @@ ret_code_t dm_init(dm_init_param_t const * p_init_param);
* Maximum number of application instances device manager can support is determined
* by DM_MAX_APPLICATIONS.
*
* All applications must be registered before initiating or accepting connections from the peer.
* All applications must be registered before initiating or accepting connections from the peer.
*
* @param[in] p_appl_param Application parameters.
* @param[out] p_appl_instance Application Instance Identifier in case registration is successful.
@ -551,7 +551,7 @@ ret_code_t dm_security_status_req(dm_handle_t const * p_handle, dm_security_stat
* @param[in,out] p_whitelist Pointer where created whitelist is provided to the application.
*
* @note 'addr_count' and 'irk_count' fields of the structure should be populated with the maximum
* number of devices that the application wishes to request in the whitelist.
* number of devices that the application wishes to request in the whitelist.
* If the number of bonded devices is less than requested, the fields are updated with that number of devices.
* If the number of devices are more than requested, the module will populate the list
* with devices in the order the bond was established with the peer devices. Also, if this routine is
@ -686,7 +686,7 @@ ret_code_t dm_service_context_get(dm_handle_t const * p_handle,
*
* @details This API allows application to delete a Service Context identified for a peer device
* identified by the 'p_handle' parameter. If this API returns NRF_SUCCESS,
* DM_EVT_SERVICE_CONTEXT_DELETED event is notified to the application.
* DM_EVT_SERVICE_CONTEXT_DELETED event is notified to the application.
* Event result is notified along with the event and indicates success or failure of this
* procedure.
*
@ -830,7 +830,7 @@ ret_code_t dm_peer_addr_get(dm_handle_t const * p_handle,
* @retval NRF_ERROR_INVALID_PARAM If this procedure is requested while connected to the peer or if the address
* type was set to BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE.
*
* @note Setting or updating a peer's device address is permitted
* @note Setting or updating a peer's device address is permitted
* only for a peer that is bonded and disconnected.
* @note Updated address is reflected only after DM_EVT_DEVICE_CONTEXT_STORED is notified to the
* application for this bonded device instance. In order to avoid abnormal behaviour, it is
@ -871,8 +871,8 @@ ret_code_t dm_distributed_keys_get(dm_handle_t const * p_handle,
* @brief Function for getting the corresponding dm_handle_t based on the connection handle.
*
* @param[in] conn_handle Connection handle as provided by the SoftDevice.
* @param[in,out] p_handle Pointer to the p_handle containg the application instance for the
* registered application. If the application instance is valid then
* @param[in,out] p_handle Pointer to the p_handle containg the application instance for the
* registered application. If the application instance is valid then
* the p_handle will be filled with requested data.
*
* @retval NRF_SUCCESS On success, else an error code indicating reason for failure.
@ -885,4 +885,3 @@ ret_code_t dm_handle_get(uint16_t conn_handle, dm_handle_t * p_handle);
/** @} */
/** @} */
#endif // DEVICE_MANAGER_H__

View File

@ -12,7 +12,7 @@
#include "device_manager.h"
#include "app_trace.h"
#include "pstorage.h"
#include "ble_hci.h"
#include "nrf_ble_hci.h"
#include "app_error.h"
#if defined ( __CC_ARM )
@ -189,7 +189,7 @@ typedef enum
* @defgroup api_param_check API Parameters check macros.
*
* @details Macros for verifying parameters passed to the module in the APIs. These macros
* could be mapped to nothing in the final version of the code in order to save execution
* could be mapped to nothing in the final version of the code in order to save execution
* time and program size.
* @{
*/
@ -362,7 +362,7 @@ typedef enum
/**@brief Peer identification information.
*/
typedef struct
{
{
ble_gap_id_key_t peer_id; /**< IRK and/or address of peer. */
uint16_t ediv; /**< Peer's encrypted diversifier. */
uint8_t id_bitmap; /**< Contains information if above field is valid. */
@ -602,11 +602,11 @@ static __INLINE void application_instance_init(uint32_t index)
static __INLINE void connection_instance_init(uint32_t index)
{
DM_TRC("[DM]: Initializing Connection Instance 0x%08X.\r\n", index);
m_connection_table[index].state = STATE_IDLE;
m_connection_table[index].conn_handle = BLE_CONN_HANDLE_INVALID;
m_connection_table[index].bonded_dev_id = DM_INVALID_ID;
memset(&m_connection_table[index].peer_addr, 0, sizeof (ble_gap_addr_t));
}
@ -618,7 +618,7 @@ static __INLINE void connection_instance_init(uint32_t index)
static __INLINE void peer_instance_init(uint32_t index)
{
DM_TRC("[DM]: Initializing Peer Instance 0x%08X.\r\n", index);
memset(m_peer_table[index].peer_id.id_addr_info.addr, 0, BLE_GAP_ADDR_LEN);
memset(m_peer_table[index].peer_id.id_info.irk, 0, BLE_GAP_SEC_KEY_LEN);
@ -735,7 +735,7 @@ static __INLINE ret_code_t device_instance_allocate(uint8_t * p_dev
err_code = NRF_SUCCESS;
DM_LOG("[DM]: Allocated device instance 0x%02X\r\n", index);
break;
}
}
@ -789,7 +789,7 @@ static ret_code_t device_instance_find(ble_gap_addr_t const * p_addr, uint32_t *
uint32_t index;
err_code = NRF_ERROR_NOT_FOUND;
if (NULL != p_addr)
{
DM_TRC("[DM]: Searching for device 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\r\n",
@ -872,12 +872,12 @@ static __INLINE uint32_t connection_instance_allocate(uint32_t * p_instance)
if (err_code == NRF_SUCCESS)
{
DM_LOG("[DM]:[%02X]: Connection Instance Allocated.\r\n", (*p_instance));
DM_LOG("[DM]:[%02X]: Connection Instance Allocated.\r\n", (*p_instance));
m_connection_table[*p_instance].state = STATE_CONNECTED;
}
else
{
DM_LOG("[DM]: No free connection instances available\r\n");
DM_LOG("[DM]: No free connection instances available\r\n");
err_code = NRF_ERROR_NO_MEM;
}
@ -2716,7 +2716,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
p_ble_evt->evt.gap_evt.params.sec_params_request.peer_params.bond);
keys_exchanged.keys_peer.p_enc_key = NULL;
keys_exchanged.keys_peer.p_id_key = &m_peer_table[m_connection_table[index].bonded_dev_id].peer_id;
keys_exchanged.keys_peer.p_id_key = &m_peer_table[m_connection_table[index].bonded_dev_id].peer_id;
keys_exchanged.keys_peer.p_sign_key = NULL;
keys_exchanged.keys_peer.p_pk = NULL;
keys_exchanged.keys_own.p_enc_key = &m_bond_table[index].peer_enc_key;
@ -2726,7 +2726,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle,
BLE_GAP_SEC_STATUS_SUCCESS,
&m_application_table[0].sec_param,
&m_application_table[0].sec_param,
&keys_exchanged);
if (err_code != NRF_SUCCESS)
@ -2735,19 +2735,19 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
event_result = err_code;
notify_app = false;
}
}
else
{
//Bond/key refresh.
//Bond/key refresh.
DM_LOG("[DM]: !!! Bond/key refresh !!!\r\n");
//Set the update flag for bond data.
m_connection_table[index].state |= STATE_BOND_INFO_UPDATE;
event.event_id = DM_EVT_SECURITY_SETUP_REFRESH;
err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle,
BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP,
NULL,
NULL,
NULL);
if (err_code != NRF_SUCCESS)
@ -2756,7 +2756,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
event_result = err_code;
notify_app = false;
}
}
break;
@ -2846,7 +2846,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
{
//Lost bond case, generate a security refresh event!
memset(m_gatts_table[index].attributes, 0, DM_GATT_SERVER_ATTR_MAX_SIZE);
event.event_id = DM_EVT_SECURITY_SETUP_REFRESH;
m_connection_table[index].state |= STATE_PAIRING_PENDING;
m_connection_table[index].state |= STATE_BOND_INFO_UPDATE;
@ -2863,7 +2863,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
if (err_code != NRF_SUCCESS)
{
DM_ERR("[DM]:[CI 0x%02X]:[DI 0x%02X]: Failed to apply service context\r\n",
handle.connection_id,
handle.connection_id,
handle.device_id);
event_result = DM_SERVICE_CONTEXT_NOT_APPLIED;
@ -2871,7 +2871,7 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
}
event_result = NRF_SUCCESS;
notify_app = true;
break;
case BLE_GATTS_EVT_SYS_ATTR_MISSING:
@ -2883,14 +2883,14 @@ void dm_ble_evt_handler(ble_evt_t * p_ble_evt)
case BLE_GAP_EVT_SEC_REQUEST:
DM_LOG("[DM]: >> BLE_GAP_EVT_SEC_REQUEST\r\n");
//Verify if the device is already bonded, and if it is bonded, initiate encryption.
//If the device is not bonded, an instance needs to be allocated in order to initiate
//bonding. The application have to initiate the procedure, the module will not do this
//If the device is not bonded, an instance needs to be allocated in order to initiate
//bonding. The application have to initiate the procedure, the module will not do this
//automatically.
event.event_id = DM_EVT_SECURITY_SETUP;
notify_app = true;
break;
default:

View File

@ -13,7 +13,7 @@
#include "gatt_cache_manager.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "ble_conn_state.h"
#include "peer_manager_types.h"
#include "peer_manager_internal.h"

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -202,7 +202,7 @@ ret_code_t gcm_local_db_cache_get(pm_peer_id_t peer_id, pm_peer_data_local_gatt_
*/
void gcm_local_database_has_changed(void);
/** @}
/** @}
* @endcond
*/

View File

@ -13,7 +13,7 @@
#include "gattc_cache_manager.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "ble_conn_state.h"
#include "peer_manager_types.h"
#include "peer_database.h"

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -98,8 +98,8 @@ ret_code_t gccm_remote_db_retrieve(pm_peer_id_t peer_id,
uint32_t * p_n_services);
/** @}
* @endcond
/** @}
* @endcond
*/
#endif /* GATTC_CACHE_MANAGER_H__ */

View File

@ -14,7 +14,7 @@
#include "gatts_cache_manager.h"
#include <string.h>
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "ble_conn_state.h"
#include "peer_manager_types.h"
#include "peer_manager_internal.h"

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -194,7 +194,7 @@ ret_code_t gscm_service_changed_ind_send(uint16_t conn_handle);
*/
void gscm_db_change_notification_done(pm_peer_id_t peer_id);
/** @}
/** @}
* @endcond
*/

View File

@ -15,7 +15,7 @@
#include <string.h>
#include "nrf_soc.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "ble_conn_state.h"
#include "peer_manager_types.h"
#include "peer_database.h"

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -235,6 +235,38 @@ ret_code_t im_whitelist_create(pm_peer_id_t * p_peer_ids,
*/
bool im_address_resolve(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * p_irk);
/**@brief Function for calculating the ah() hash function described in Bluetooth core specification
* 4.2 section 3.H.2.2.2.
*
* @detail BLE uses a hash function to calculate the first half of a resolvable address
* from the second half of the address and an irk. This function will use the ECB
* periferal to hash these data acording to the Bluetooth core specification.
*
* @note The ECB expect little endian input and output.
* This function expect big endian and will reverse the data as necessary.
*
* @param[in] p_k The key used in the hash function.
* For address resolution this is should be the irk.
* The array must have a length of 16.
* @param[in] p_r The rand used in the hash function. For generating a new address
* this would be a random number. For resolving a resolvable address
* this would be the last half of the address being resolved.
* The array must have a length of 3.
* @param[out] p_local_hash The result of the hash operation. For address resolution this
* will match the first half of the address being resolved if and only
* if the irk used in the hash function is the same one used to generate
* the address.
* The array must have a length of 16.
*
* @note ====IMPORTANT====
* This is a special modification to the original nRF5x SDK required by the mbed BLE API
* to be able to generate BLE private resolvable addresses. This function is used by
* the BLE API implementation for nRF5xSecurityManager::getAddressFromBondTable() in the
* ble-nrf52832 yotta module.
* =================
*/
void ah(uint8_t const * p_k, uint8_t const * p_r, uint8_t * p_local_hash);
/** @}
* @endcond
*/

View File

@ -17,7 +17,7 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
#include "peer_manager_internal.h"

View File

@ -17,7 +17,7 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -125,7 +125,7 @@ pm_peer_id_t peer_id_get_next_deleted(pm_peer_id_t prev_peer_id);
*/
uint32_t peer_id_n_ids(void);
/** @}
/** @}
* @endcond
*/

View File

@ -32,8 +32,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "sdk_common.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
#include "peer_database.h"

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"

View File

@ -25,8 +25,8 @@
#include <stdbool.h>
#include <stddef.h>
#include "nrf.h"
#include "ble_gap.h"
#include "ble_hci.h"
#include "nrf_ble_gap.h"
#include "nrf_ble_hci.h"
#include "app_util.h"
#include "app_util_platform.h"
#include "ble_gatt_db.h"

View File

@ -14,8 +14,8 @@
#include "security_dispatcher.h"
#include <string.h>
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "ble_conn_state.h"
#include "peer_manager_types.h"
#include "peer_database.h"
@ -881,4 +881,3 @@ void smd_ble_evt_handler(ble_evt_t * p_ble_evt)
break;
};
}

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
@ -247,7 +247,7 @@ ret_code_t smd_link_secure(uint16_t conn_handle,
ble_gap_sec_params_t * p_sec_params,
bool force_repairing);
/** @}
/** @}
* @endcond
*/

View File

@ -16,8 +16,8 @@
#include <stdint.h>
#include "sdk_errors.h"
#include "ble.h"
#include "ble_gap.h"
#include "nrf_ble.h"
#include "nrf_ble_gap.h"
#include "peer_manager_types.h"
#include "security_dispatcher.h"

View File

@ -15,8 +15,8 @@
#include "bootloader_util.h"
#include "nrf.h"
#include "nrf_sdm.h"
#include "ble_gatt.h"
#include "ble_gatts.h"
#include "nrf_ble_gatt.h"
#include "nrf_ble_gatts.h"
#include "app_error.h"
#include "dfu_ble_svc.h"
#include "device_manager.h"
@ -165,7 +165,7 @@ void dfu_app_on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt)
default:
{
// Unsupported event received from DFU Service.
// Unsupported event received from DFU Service.
// Send back BLE_DFU_RESP_VAL_NOT_SUPPORTED message to peer.
uint32_t err_code = ble_dfu_response_send(p_dfu,
BLE_DFU_START_PROCEDURE,
@ -186,7 +186,7 @@ void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func)
void dfu_app_dm_appl_instance_set(dm_application_instance_t app_instance)
{
uint32_t err_code;
err_code = dm_application_instance_set(&app_instance, &m_dm_handle);
APP_ERROR_CHECK(err_code);
}

View File

@ -9,39 +9,39 @@
* the file.
*
*/
/** @file
*
* @defgroup nrf_dfu_ble_svc DFU BLE SVC
* @defgroup nrf_dfu_ble_svc DFU BLE SVC
* @{
*
* @brief DFU BLE SVC in bootloader. The DFU BLE SuperVisor Calls allow an application to execute
* functions in the installed bootloader.
* functions in the installed bootloader.
*
* @details This module implements handling of SuperVisor Calls in the bootloader.
* @details This module implements handling of SuperVisor Calls in the bootloader.
* SuperVisor Calls allow for an application to execute calls into the bootloader.
* Currently, it is possible to exchange bonding information (like keys) from the
* application to a bootloader supporting DFU OTA using BLE, so the update process can be
* Currently, it is possible to exchange bonding information (like keys) from the
* application to a bootloader supporting DFU OTA using BLE, so the update process can be
* done through an already existing bond.
*
* @note The application must make sure that all SuperVisor Calls (SVC) are forwarded to the
* bootloader to ensure correct behavior. Forwarding of SVCs to the bootloader is
* done using the SoftDevice SVC @ref sd_softdevice_vector_table_base_set with the value
* @note The application must make sure that all SuperVisor Calls (SVC) are forwarded to the
* bootloader to ensure correct behavior. Forwarding of SVCs to the bootloader is
* done using the SoftDevice SVC @ref sd_softdevice_vector_table_base_set with the value
* present in @c NRF_UICR->NRFFW[0].
*/
#ifndef DFU_BLE_SVC_H__
#define DFU_BLE_SVC_H__
#include "nrf_svc.h"
#include <stdint.h>
#include "ble_gap.h"
#include "nrf_ble_gap.h"
#include "nrf.h"
#include "nrf_soc.h"
#include "nrf_error_sdm.h"
#define BOOTLOADER_SVC_BASE 0x0 /**< The number of the lowest SVC number reserved for the bootloader. */
#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */
#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */
/**@brief The SVC numbers used by the SVC functions in the SoC library. */
enum BOOTLOADER_SVCS

View File

@ -43,6 +43,7 @@
*/
/*lint -save -e14 */
#if 0
void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)
{
error_info_t error_info =
@ -55,6 +56,7 @@ void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t *
UNUSED_VARIABLE(error_info);
}
#endif
/*lint -save -e14 */
void app_error_handler_bare(ret_code_t error_code)

View File

@ -25,7 +25,7 @@
#ifdef BLE_STACK_SUPPORT_REQD
#include <stdlib.h>
#include "ble.h"
#include "nrf_ble.h"
#include "nrf_sdm.h"
#include "app_error.h"
#include "app_util.h"

View File

@ -32,7 +32,7 @@
#elif defined(ANT_STACK_SUPPORT_REQD)
#include "ant_interface.h"
#elif defined(BLE_STACK_SUPPORT_REQD)
#include "ble.h"
#include "nrf_ble.h"
#endif
@ -437,7 +437,7 @@ uint32_t sd_check_ram_start(uint32_t sd_req_ram_start)
#endif //NRF_LOG_USES_RTT
return NRF_SUCCESS;
}
#endif//defined(S130) || defined(S132) || defined(S332)
#endif//defined(S130) || defined(S132) || defined(S332)
return NRF_SUCCESS;
}

View File

@ -40,7 +40,7 @@
#include "ble_stack_handler_types.h"
#include "ant_stack_handler_types.h"
#if defined(BLE_STACK_SUPPORT_REQD)
#include "ble.h"
#include "nrf_ble.h"
#endif
#include "app_ram_base.h"
#define SOFTDEVICE_SCHED_EVT_SIZE 0 /**< Size of button events being passed through the scheduler (is to be used for computing the maximum size of scheduler events). For SoftDevice events, this size is 0, since the events are being pulled in the event handler. */
@ -124,7 +124,7 @@ bool softdevice_handler_isEnabled(void);
* used, this buffer must be provided by the application. The
* buffer must be large enough to hold the biggest stack event the
* application is supposed to handle. The buffer must be aligned to
* a 4 byte boundary. This parameter is unused if BLE stack support
* a 4 byte boundary. This parameter is unused if BLE stack support
* is not required.
* @param[in] ble_evt_buffer_size Size of SoftDevice BLE event buffer. This parameter is unused if
* BLE stack support is not required.
@ -182,7 +182,7 @@ uint32_t softdevice_sys_evt_handler_set(sys_evt_handler_t sys_evt_handler);
*
* @retval NRF_SUCCESS If the operation was successful.
*/
uint32_t softdevice_enable_get_default_config(uint8_t central_links_count,
uint32_t softdevice_enable_get_default_config(uint8_t central_links_count,
uint8_t periph_links_count,
ble_enable_params_t * p_ble_enable_params);