Skip to content

Commit 501b0ae

Browse files
ysoldakdeadprogram
authored andcommitted
nrf: update s140v7 SoftDevice version to latest, 7.3.0
1 parent 899467b commit 501b0ae

23 files changed

+9869
-9788
lines changed

adapter_s140v7.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#undef __STATIC_INLINE
1414
#define __STATIC_INLINE
1515

16-
#include "s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_sdm.h"
17-
#include "s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/nrf_nvic.h"
18-
#include "s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble.h"
16+
#include "s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/nrf_sdm.h"
17+
#include "s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/nrf_nvic.h"
18+
#include "s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/ble.h"
1919

2020
// Define nrf_nvic_state, which is used by sd_nvic_critical_region_enter and
2121
// sd_nvic_critical_region_exit.

adapter_s140v7.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ package bluetooth
55
/*
66
// Add the correct SoftDevice include path to CFLAGS, so #include will work as
77
// expected.
8-
#cgo CFLAGS: -Is140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include
8+
#cgo CFLAGS: -Is140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include
99
*/
1010
import "C"

s140_nrf52_7.0.1/s140_nrf52_7.0.1_softdevice.hex

Lines changed: 0 additions & 9742 deletions
This file was deleted.

s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble.h renamed to s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/ble.h

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012 - 2019, Nordic Semiconductor ASA
2+
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without modification,
@@ -89,8 +89,9 @@ enum BLE_COMMON_SVCS
8989
*/
9090
enum BLE_COMMON_EVTS
9191
{
92-
BLE_EVT_USER_MEM_REQUEST = BLE_EVT_BASE + 0, /**< User Memory request. @ref ble_evt_user_mem_request_t */
93-
BLE_EVT_USER_MEM_RELEASE = BLE_EVT_BASE + 1, /**< User Memory release. @ref ble_evt_user_mem_release_t */
92+
BLE_EVT_USER_MEM_REQUEST = BLE_EVT_BASE + 0, /**< User Memory request. See @ref ble_evt_user_mem_request_t
93+
\n Reply with @ref sd_ble_user_mem_reply. */
94+
BLE_EVT_USER_MEM_RELEASE = BLE_EVT_BASE + 1, /**< User Memory release. See @ref ble_evt_user_mem_release_t */
9495
};
9596

9697
/**@brief BLE Connection Configuration IDs.
@@ -316,6 +317,7 @@ typedef union
316317
{
317318
ble_common_opt_t common_opt; /**< COMMON options, opt_id in @ref BLE_COMMON_OPTS series. */
318319
ble_gap_opt_t gap_opt; /**< GAP option, opt_id in @ref BLE_GAP_OPTS series. */
320+
ble_gattc_opt_t gattc_opt; /**< GATTC option, opt_id in @ref BLE_GATTC_OPTS series. */
319321
} ble_opt_t;
320322

321323
/**@brief BLE connection configuration type, wrapping the module specific configurations, set with
@@ -388,6 +390,21 @@ typedef union
388390
* application RAM region (APP_RAM_BASE). On return, this will
389391
* contain the minimum start address of the application RAM region
390392
* required by the SoftDevice for this configuration.
393+
* @warning After this call, the SoftDevice may generate several events. The list of events provided
394+
* below require the application to initiate a SoftDevice API call. The corresponding API call
395+
* is referenced in the event documentation.
396+
* If the application fails to do so, the BLE connection may timeout, or the SoftDevice may stop
397+
* communicating with the peer device.
398+
* - @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST
399+
* - @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST
400+
* - @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST
401+
* - @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST
402+
* - @ref BLE_GAP_EVT_SEC_INFO_REQUEST
403+
* - @ref BLE_GAP_EVT_SEC_REQUEST
404+
* - @ref BLE_GAP_EVT_AUTH_KEY_REQUEST
405+
* - @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST
406+
* - @ref BLE_EVT_USER_MEM_REQUEST
407+
* - @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST
391408
*
392409
* @note The memory requirement for a specific configuration will not increase between SoftDevices
393410
* with the same major version number.
@@ -521,8 +538,8 @@ SVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_v
521538

522539

523540
/**@brief Remove a Vendor Specific base UUID.
524-
*
525-
* @details This call removes a Vendor Specific base UUID that has been added with @ref sd_ble_uuid_vs_add. This function allows
541+
*
542+
* @details This call removes a Vendor Specific base UUID. This function allows
526543
* the application to reuse memory allocated for Vendor Specific base UUIDs.
527544
*
528545
* @note Currently this function can only be called with a p_uuid_type set to @ref BLE_UUID_TYPE_UNKNOWN or the last added UUID type.
@@ -544,7 +561,7 @@ SVCALL(SD_BLE_UUID_VS_REMOVE, uint32_t, sd_ble_uuid_vs_remove(uint8_t *p_uuid_ty
544561
/** @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure.
545562
*
546563
* @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared
547-
* to the corresponding ones in each entry of the table of Vendor Specific base UUIDs populated with @ref sd_ble_uuid_vs_add
564+
* to the corresponding ones in each entry of the table of Vendor Specific base UUIDs
548565
* to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index
549566
* relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type.
550567
*
@@ -619,8 +636,8 @@ SVCALL(SD_BLE_USER_MEM_REPLY, uint32_t, sd_ble_user_mem_reply(uint16_t conn_hand
619636
*
620637
* @details This call allows the application to set the value of an option.
621638
*
622-
* @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS.
623-
* @param[in] p_opt Pointer to a ble_opt_t structure containing the option value.
639+
* @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS, @ref BLE_GAP_OPTS, and @ref BLE_GATTC_OPTS.
640+
* @param[in] p_opt Pointer to a @ref ble_opt_t structure containing the option value.
624641
*
625642
* @retval ::NRF_SUCCESS Option set successfully.
626643
* @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.

s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_err.h renamed to s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/ble_err.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012 - 2018, Nordic Semiconductor ASA
2+
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without modification,

s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_gap.h renamed to s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/ble_gap.h

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011 - 2019, Nordic Semiconductor ASA
2+
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without modification,
@@ -128,7 +128,9 @@ enum BLE_GAP_EVTS
128128
BLE_GAP_EVT_TIMEOUT = BLE_GAP_EVT_BASE + 11, /**< Timeout expired. \n See @ref ble_gap_evt_timeout_t. */
129129
BLE_GAP_EVT_RSSI_CHANGED = BLE_GAP_EVT_BASE + 12, /**< RSSI report. \n See @ref ble_gap_evt_rssi_changed_t. */
130130
BLE_GAP_EVT_ADV_REPORT = BLE_GAP_EVT_BASE + 13, /**< Advertising report. \n See @ref ble_gap_evt_adv_report_t. */
131-
BLE_GAP_EVT_SEC_REQUEST = BLE_GAP_EVT_BASE + 14, /**< Security Request. \n See @ref ble_gap_evt_sec_request_t. */
131+
BLE_GAP_EVT_SEC_REQUEST = BLE_GAP_EVT_BASE + 14, /**< Security Request. \n Reply with @ref sd_ble_gap_authenticate
132+
\n or with @ref sd_ble_gap_encrypt if required security information is available
133+
. \n See @ref ble_gap_evt_sec_request_t. */
132134
BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST = BLE_GAP_EVT_BASE + 15, /**< Connection Parameter Update Request. \n Reply with @ref sd_ble_gap_conn_param_update. \n See @ref ble_gap_evt_conn_param_update_request_t. */
133135
BLE_GAP_EVT_SCAN_REQ_REPORT = BLE_GAP_EVT_BASE + 16, /**< Scan request report. \n See @ref ble_gap_evt_scan_req_report_t. */
134136
BLE_GAP_EVT_PHY_UPDATE_REQUEST = BLE_GAP_EVT_BASE + 17, /**< PHY Update Request. \n Reply with @ref sd_ble_gap_phy_update. \n See @ref ble_gap_evt_phy_update_request_t. */
@@ -675,6 +677,20 @@ enum BLE_GAP_TX_POWER_ROLES
675677
#define BLE_GAP_CAR_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE) /**< Included by default. */
676678
/**@} */
677679

680+
/** @defgroup BLE_GAP_SLAVE_LATENCY Slave latency configuration options
681+
* @{ */
682+
#define BLE_GAP_SLAVE_LATENCY_ENABLE (0) /**< Slave latency is enabled. When slave latency is enabled,
683+
the slave will wake up every time it has data to send,
684+
and/or every slave latency number of connection events. */
685+
#define BLE_GAP_SLAVE_LATENCY_DISABLE (1) /**< Disable slave latency. The slave will wake up every connection event
686+
regardless of the requested slave latency.
687+
This option consumes the most power. */
688+
#define BLE_GAP_SLAVE_LATENCY_WAIT_FOR_ACK (2) /**< The slave will wake up every connection event if it has not received
689+
an ACK from the master for at least slave latency events. This
690+
configuration may increase the power consumption in environments
691+
with a lot of radio activity. */
692+
/**@} */
693+
678694
/**@addtogroup BLE_GAP_STRUCTURES Structures
679695
* @{ */
680696

@@ -1242,7 +1258,7 @@ typedef struct
12421258
typedef struct
12431259
{
12441260
int8_t rssi; /**< Received Signal Strength Indication in dBm.
1245-
@note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement. */
1261+
@note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement. */
12461262
uint8_t ch_index; /**< Data Channel Index on which the Signal Strength is measured (0-36). */
12471263
} ble_gap_evt_rssi_changed_t;
12481264

@@ -1292,7 +1308,7 @@ typedef struct
12921308
last received packet did not contain the Tx Power field.
12931309
@note TX Power is only included in extended advertising packets. */
12941310
int8_t rssi; /**< Received Signal Strength Indication in dBm of the last packet received.
1295-
@note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement. */
1311+
@note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement. */
12961312
uint8_t ch_index; /**< Channel Index on which the last advertising packet is received (0-39). */
12971313
uint8_t set_id; /**< Set ID of the received advertising data. Set ID is not present
12981314
if set to @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */
@@ -1331,7 +1347,7 @@ typedef struct
13311347
{
13321348
uint8_t adv_handle; /**< Advertising handle for the advertising set which received the Scan Request */
13331349
int8_t rssi; /**< Received Signal Strength Indication in dBm.
1334-
@note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement. */
1350+
@note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement. */
13351351
ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. If the peer_addr resolved: @ref ble_gap_addr_t::addr_id_peer is set to 1
13361352
and the address is the device's identity address. */
13371353
} ble_gap_evt_scan_req_report_t;
@@ -1578,7 +1594,7 @@ typedef struct
15781594
typedef struct
15791595
{
15801596
uint16_t conn_handle; /**< Connection Handle */
1581-
uint8_t disable : 1; /**< Set to 1 to disable slave latency. Set to 0 enable it again.*/
1597+
uint8_t disable; /**< For allowed values see @ref BLE_GAP_SLAVE_LATENCY */
15821598
} ble_gap_opt_slave_latency_disable_t;
15831599

15841600
/**@brief Passkey Option.
@@ -1735,7 +1751,7 @@ SVCALL(SD_BLE_GAP_ADDR_GET, uint32_t, sd_ble_gap_addr_get(ble_gap_addr_t *p_addr
17351751
*
17361752
* @retval ::NRF_SUCCESS Address successfully retrieved.
17371753
* @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied.
1738-
* @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found.
1754+
* @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found.
17391755
* @retval ::NRF_ERROR_INVALID_STATE The advertising set is currently not advertising.
17401756
*/
17411757
SVCALL(SD_BLE_GAP_ADV_ADDR_GET, uint32_t, sd_ble_gap_adv_addr_get(uint8_t adv_handle, ble_gap_addr_t *p_addr));
@@ -1891,6 +1907,9 @@ SVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t, sd_ble_gap_adv_set_configure(uint
18911907
*
18921908
* @note Only one advertiser may be active at any time.
18931909
*
1910+
* @note If privacy is enabled, the advertiser's private address will be refreshed when this function is called.
1911+
* See @ref sd_ble_gap_privacy_set().
1912+
*
18941913
* @events
18951914
* @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.}
18961915
* @event{@ref BLE_GAP_EVT_ADV_SET_TERMINATED, Advertising set has terminated.}
@@ -2023,7 +2042,9 @@ SVCALL(SD_BLE_GAP_DISCONNECT, uint32_t, sd_ble_gap_disconnect(uint16_t conn_hand
20232042
* - For all other roles handle is ignored.
20242043
* @param[in] tx_power Radio transmit power in dBm (see note for accepted values).
20252044
*
2026-
* @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +2dBm, +3dBm, +4dBm, +5dBm, +6dBm, +7dBm and +8dBm.
2045+
* @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm.
2046+
* In addition, on some chips following values are supported: +2dBm, +5dBm, +6dBm, +7dBm and +8dBm.
2047+
* Setting these values on a chip that does not support them will result in undefined behaviour.
20272048
* @note The initiator will have the same transmit power as the scanner.
20282049
* @note When a connection is created it will inherit the transmit power from the initiator or
20292050
* advertiser leading to the connection.
@@ -2428,7 +2449,7 @@ SVCALL(SD_BLE_GAP_ENCRYPT, uint32_t, sd_ble_gap_encrypt(uint16_t conn_handle, bl
24282449
* @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.
24292450
* @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:
24302451
* - No link has been established.
2431-
* - No @ref BLE_GAP_EVT_SEC_REQUEST pending.
2452+
* - No @ref BLE_GAP_EVT_SEC_INFO_REQUEST pending.
24322453
* - Encryption information provided by the app without being requested. See @ref ble_gap_evt_sec_info_request_t::enc_info.
24332454
* @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.
24342455
*/
@@ -2496,7 +2517,7 @@ SVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle
24962517
*
24972518
* @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND
24982519
* will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start.
2499-
* @note ERRATA-153 requires the rssi sample to be compensated based on a temperature measurement.
2520+
* @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement.
25002521
* @mscs
25012522
* @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}
25022523
* @endmscs

s140_nrf52_7.0.1/s140_nrf52_7.0.1_API/include/ble_gatt.h renamed to s140_nrf52_7.3.0/s140_nrf52_7.3.0_API/include/ble_gatt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013 - 2018, Nordic Semiconductor ASA
2+
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without modification,

0 commit comments

Comments
 (0)