|
1 | 1 | /* |
2 | | - * Copyright (c) 2011 - 2019, Nordic Semiconductor ASA |
| 2 | + * Copyright (c) Nordic Semiconductor ASA |
3 | 3 | * All rights reserved. |
4 | 4 | * |
5 | 5 | * Redistribution and use in source and binary forms, with or without modification, |
@@ -128,7 +128,9 @@ enum BLE_GAP_EVTS |
128 | 128 | BLE_GAP_EVT_TIMEOUT = BLE_GAP_EVT_BASE + 11, /**< Timeout expired. \n See @ref ble_gap_evt_timeout_t. */ |
129 | 129 | BLE_GAP_EVT_RSSI_CHANGED = BLE_GAP_EVT_BASE + 12, /**< RSSI report. \n See @ref ble_gap_evt_rssi_changed_t. */ |
130 | 130 | 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. */ |
132 | 134 | 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. */ |
133 | 135 | BLE_GAP_EVT_SCAN_REQ_REPORT = BLE_GAP_EVT_BASE + 16, /**< Scan request report. \n See @ref ble_gap_evt_scan_req_report_t. */ |
134 | 136 | 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 |
675 | 677 | #define BLE_GAP_CAR_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE) /**< Included by default. */ |
676 | 678 | /**@} */ |
677 | 679 |
|
| 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 | + |
678 | 694 | /**@addtogroup BLE_GAP_STRUCTURES Structures |
679 | 695 | * @{ */ |
680 | 696 |
|
@@ -1242,7 +1258,7 @@ typedef struct |
1242 | 1258 | typedef struct |
1243 | 1259 | { |
1244 | 1260 | 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. */ |
1246 | 1262 | uint8_t ch_index; /**< Data Channel Index on which the Signal Strength is measured (0-36). */ |
1247 | 1263 | } ble_gap_evt_rssi_changed_t; |
1248 | 1264 |
|
@@ -1292,7 +1308,7 @@ typedef struct |
1292 | 1308 | last received packet did not contain the Tx Power field. |
1293 | 1309 | @note TX Power is only included in extended advertising packets. */ |
1294 | 1310 | 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. */ |
1296 | 1312 | uint8_t ch_index; /**< Channel Index on which the last advertising packet is received (0-39). */ |
1297 | 1313 | uint8_t set_id; /**< Set ID of the received advertising data. Set ID is not present |
1298 | 1314 | if set to @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */ |
@@ -1331,7 +1347,7 @@ typedef struct |
1331 | 1347 | { |
1332 | 1348 | uint8_t adv_handle; /**< Advertising handle for the advertising set which received the Scan Request */ |
1333 | 1349 | 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. */ |
1335 | 1351 | 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 |
1336 | 1352 | and the address is the device's identity address. */ |
1337 | 1353 | } ble_gap_evt_scan_req_report_t; |
@@ -1578,7 +1594,7 @@ typedef struct |
1578 | 1594 | typedef struct |
1579 | 1595 | { |
1580 | 1596 | 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 */ |
1582 | 1598 | } ble_gap_opt_slave_latency_disable_t; |
1583 | 1599 |
|
1584 | 1600 | /**@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 |
1735 | 1751 | * |
1736 | 1752 | * @retval ::NRF_SUCCESS Address successfully retrieved. |
1737 | 1753 | * @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. |
1739 | 1755 | * @retval ::NRF_ERROR_INVALID_STATE The advertising set is currently not advertising. |
1740 | 1756 | */ |
1741 | 1757 | 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 |
1891 | 1907 | * |
1892 | 1908 | * @note Only one advertiser may be active at any time. |
1893 | 1909 | * |
| 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 | + * |
1894 | 1913 | * @events |
1895 | 1914 | * @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.} |
1896 | 1915 | * @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 |
2023 | 2042 | * - For all other roles handle is ignored. |
2024 | 2043 | * @param[in] tx_power Radio transmit power in dBm (see note for accepted values). |
2025 | 2044 | * |
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. |
2027 | 2048 | * @note The initiator will have the same transmit power as the scanner. |
2028 | 2049 | * @note When a connection is created it will inherit the transmit power from the initiator or |
2029 | 2050 | * 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 |
2428 | 2449 | * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. |
2429 | 2450 | * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either: |
2430 | 2451 | * - No link has been established. |
2431 | | - * - No @ref BLE_GAP_EVT_SEC_REQUEST pending. |
| 2452 | + * - No @ref BLE_GAP_EVT_SEC_INFO_REQUEST pending. |
2432 | 2453 | * - Encryption information provided by the app without being requested. See @ref ble_gap_evt_sec_info_request_t::enc_info. |
2433 | 2454 | * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. |
2434 | 2455 | */ |
@@ -2496,7 +2517,7 @@ SVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle |
2496 | 2517 | * |
2497 | 2518 | * @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND |
2498 | 2519 | * 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. |
2500 | 2521 | * @mscs |
2501 | 2522 | * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC} |
2502 | 2523 | * @endmscs |
|
0 commit comments