Skip to content

Commit 1b826f2

Browse files
committed
Namespace softdevice headers to avoid conflict wih other headers.
1 parent 7ad0af3 commit 1b826f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+460
-429
lines changed

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/ble.h renamed to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@
4444
4545
*/
4646

47-
#ifndef BLE_H__
48-
#define BLE_H__
47+
#ifndef NRF_BLE_H__
48+
#define NRF_BLE_H__
4949

50-
#include "ble_ranges.h"
51-
#include "ble_types.h"
52-
#include "ble_gap.h"
53-
#include "ble_l2cap.h"
54-
#include "ble_gatt.h"
55-
#include "ble_gattc.h"
56-
#include "ble_gatts.h"
50+
#include "nrf_ble_ranges.h"
51+
#include "nrf_ble_types.h"
52+
#include "nrf_ble_gap.h"
53+
#include "nrf_ble_l2cap.h"
54+
#include "nrf_ble_gatt.h"
55+
#include "nrf_ble_gattc.h"
56+
#include "nrf_ble_gatts.h"
5757

5858
#ifdef __cplusplus
5959
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
624624
#ifdef __cplusplus
625625
}
626626
#endif
627-
#endif /* BLE_H__ */
627+
#endif /* NRF_BLE_H__ */
628628

629629
/**
630630
@}

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gap.h renamed to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gap.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
@brief Definitions and prototypes for the GAP interface.
4141
*/
4242

43-
#ifndef BLE_GAP_H__
44-
#define BLE_GAP_H__
43+
#ifndef NRF_BLE_GAP_H__
44+
#define NRF_BLE_GAP_H__
4545

46-
#include "ble_types.h"
47-
#include "ble_ranges.h"
46+
#include "nrf_ble_types.h"
47+
#include "nrf_ble_ranges.h"
4848
#include "nrf_svc.h"
4949

5050
#ifdef __cplusplus
@@ -659,8 +659,8 @@ typedef struct
659659
typedef struct
660660
{
661661
uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
662-
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
663-
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
662+
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
663+
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
664664
@ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */
665665
} ble_gap_evt_passkey_display_t;
666666

@@ -680,7 +680,7 @@ typedef struct
680680
/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */
681681
typedef struct
682682
{
683-
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
683+
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
684684
inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */
685685
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. */
686686
} ble_gap_evt_lesc_dhkey_request_t;
@@ -720,7 +720,7 @@ typedef struct
720720
ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */
721721
ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */
722722
ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */
723-
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
723+
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
724724
in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */
725725
} ble_gap_sec_keys_t;
726726

@@ -1367,8 +1367,8 @@ SVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t, sd_ble_gap_authenticate(uint16_t conn_
13671367
* @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.
13681368
* @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
13691369
* already been provided during a previous call to @ref sd_ble_gap_authenticate.
1370-
* @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
1371-
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
1370+
* @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
1371+
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
13721372
* upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.
13731373
* Note that the SoftDevice expects the application to provide memory for storing the
13741374
* 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));
17351735
#ifdef __cplusplus
17361736
}
17371737
#endif
1738-
#endif // BLE_GAP_H__
1738+
#endif // NRF_BLE_GAP_H__
17391739

17401740
/**
17411741
@}

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/sdk/softdevice/s132/headers/ble_gatt.h renamed to hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/sdk/softdevice/s130/headers/nrf_ble_gatt.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
/*
1+
/*
22
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
4-
*
4+
*
55
* Redistribution and use in source and binary forms, with or without modification,
66
* are permitted provided that the following conditions are met:
7-
*
7+
*
88
* 1. Redistributions of source code must retain the above copyright notice, this
99
* list of conditions and the following disclaimer.
10-
*
10+
*
1111
* 2. Redistributions in binary form must reproduce the above copyright notice, this
1212
* list of conditions and the following disclaimer in the documentation and/or
1313
* other materials provided with the distribution.
14-
*
14+
*
1515
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
1616
* contributors to this software may be used to endorse or promote products
1717
* derived from this software without specific prior written permission.
18-
*
18+
*
1919
* 4. This software must only be used in a processor manufactured by Nordic
2020
* Semiconductor ASA, or in a processor manufactured by a third party that
2121
* is used in combination with a processor manufactured by Nordic Semiconductor.
22-
*
23-
*
22+
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2525
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2626
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -31,7 +31,7 @@
3131
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3232
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3333
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34-
*
34+
*
3535
*/
3636

3737
/**
@@ -40,11 +40,11 @@
4040
@brief Common definitions and prototypes for the GATT interfaces.
4141
*/
4242

43-
#ifndef BLE_GATT_H__
44-
#define BLE_GATT_H__
43+
#ifndef NRF_BLE_GATT_H__
44+
#define NRF_BLE_GATT_H__
4545

46-
#include "ble_types.h"
47-
#include "ble_ranges.h"
46+
#include "nrf_ble_types.h"
47+
#include "nrf_ble_ranges.h"
4848

4949
#ifdef __cplusplus
5050
extern "C" {
@@ -202,7 +202,7 @@ typedef struct
202202
#ifdef __cplusplus
203203
}
204204
#endif
205-
#endif // BLE_GATT_H__
205+
#endif // NRF_BLE_GATT_H__
206206

207207
/** @} */
208208

0 commit comments

Comments
 (0)