Bluetooth: Update terms in public API to spec v5.3

The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2021-09-14 12:28:45 +02:00 committed by Johan Hedberg
commit 6de4747979
18 changed files with 152 additions and 105 deletions

View file

@ -347,7 +347,7 @@ enum {
* Don't try to resume connectable advertising after a connection.
* This option is only meaningful when used together with
* BT_LE_ADV_OPT_CONNECTABLE. If set the advertising will be stopped
* when bt_le_adv_stop() is called or when an incoming (slave)
* when bt_le_adv_stop() is called or when an incoming (peripheral)
* connection happens. If this option is not set the stack will
* take care of keeping advertising enabled even as connections
* occur.
@ -413,11 +413,12 @@ enum {
*/
BT_LE_ADV_OPT_DIR_ADDR_RPA = BIT(5),
/** Use whitelist to filter devices that can request scan response data.
/** Use filter accept list to filter devices that can request scan
* response data.
*/
BT_LE_ADV_OPT_FILTER_SCAN_REQ = BIT(6),
/** Use whitelist to filter devices that can connect. */
/** Use filter accept list to filter devices that can connect. */
BT_LE_ADV_OPT_FILTER_CONN = BIT(7),
/** Notify the application when a scan response data has been sent to an
@ -1596,6 +1597,7 @@ int bt_le_per_adv_list_remove(const bt_addr_le_t *addr, uint8_t sid);
*/
int bt_le_per_adv_list_clear(void);
enum {
/** Convenience value when no options are specified. */
BT_LE_SCAN_OPT_NONE = 0,
@ -1603,8 +1605,8 @@ enum {
/** Filter duplicates. */
BT_LE_SCAN_OPT_FILTER_DUPLICATE = BIT(0),
/** Filter using whitelist. */
BT_LE_SCAN_OPT_FILTER_WHITELIST = BIT(1),
/** Filter using filter accept list. */
BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST = BIT(1),
/** Enable scan on coded PHY (Long Range).*/
BT_LE_SCAN_OPT_CODED = BIT(2),
@ -1617,6 +1619,8 @@ enum {
BT_LE_SCAN_OPT_NO_1M = BIT(3),
};
#define BT_LE_SCAN_OPT_FILTER_WHITELIST __DEPRECATED_MACRO BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST
enum {
/** Scan without requesting additional information from advertisers. */
BT_LE_SCAN_TYPE_PASSIVE = 0x00,
@ -1852,50 +1856,65 @@ void bt_le_scan_cb_register(struct bt_le_scan_cb *cb);
void bt_le_scan_cb_unregister(struct bt_le_scan_cb *cb);
/**
* @brief Add device (LE) to whitelist.
* @brief Add device (LE) to filter accept list.
*
* Add peer device LE address to the whitelist.
* Add peer device LE address to the filter accept list.
*
* @note The whitelist cannot be modified when an LE role is using
* the whitelist, i.e advertiser or scanner using a whitelist or automatic
* connecting to devices using whitelist.
* @note The filter accept list cannot be modified when an LE role is using
* the filter accept list, i.e advertiser or scanner using a filter accept list
* or automatic connecting to devices using filter accept list.
*
* @param addr Bluetooth LE identity address.
*
* @return Zero on success or error code otherwise, positive in case of
* protocol error or negative (POSIX) in case of stack internal error.
*/
int bt_le_whitelist_add(const bt_addr_le_t *addr);
int bt_le_filter_accept_list_add(const bt_addr_le_t *addr);
__deprecated
static inline int bt_le_whitelist_add(const bt_addr_le_t *addr)
{
return bt_le_filter_accept_list_add(addr);
}
/**
* @brief Remove device (LE) from whitelist.
* @brief Remove device (LE) from filter accept list.
*
* Remove peer device LE address from the whitelist.
* Remove peer device LE address from the filter accept list.
*
* @note The whitelist cannot be modified when an LE role is using
* the whitelist, i.e advertiser or scanner using a whitelist or automatic
* connecting to devices using whitelist.
* @note The filter accept list cannot be modified when an LE role is using
* the filter accept list, i.e advertiser or scanner using a filter accept list
* or automatic connecting to devices using filter accept list.
*
* @param addr Bluetooth LE identity address.
*
* @return Zero on success or error code otherwise, positive in case of
* protocol error or negative (POSIX) in case of stack internal error.
*/
int bt_le_whitelist_rem(const bt_addr_le_t *addr);
int bt_le_filter_accept_list_remove(const bt_addr_le_t *addr);
__deprecated
static inline int bt_le_whitelist_rem(const bt_addr_le_t *addr)
{
return bt_le_filter_accept_list_remove(addr);
}
/**
* @brief Clear whitelist.
* @brief Clear filter accept list.
*
* Clear all devices from the whitelist.
* Clear all devices from the filter accept list.
*
* @note The whitelist cannot be modified when an LE role is using
* the whitelist, i.e advertiser or scanner using a whitelist or automatic
* connecting to devices using whitelist.
* @note The filter accept list cannot be modified when an LE role is using
* the filter accept list, i.e advertiser or scanner using a filter accept
* list or automatic connecting to devices using filter accept list.
*
* @return Zero on success or error code otherwise, positive in case of
* protocol error or negative (POSIX) in case of stack internal error.
*/
int bt_le_whitelist_clear(void);
int bt_le_filter_accept_list_clear(void);
__deprecated
static inline int bt_le_whitelist_clear(void)
{
return bt_le_filter_accept_list_clear();
}
/**
* @brief Set (LE) channel map.

View file

@ -285,7 +285,7 @@ struct bt_conn_le_info {
/** Remote device address used during connection setup. */
const bt_addr_le_t *remote;
uint16_t interval; /** Connection interval */
uint16_t latency; /** Connection slave latency */
uint16_t latency; /** Connection peripheral latency */
uint16_t timeout; /** Connection supervision timeout */
#if defined(CONFIG_BT_USER_PHY_UPDATE)
@ -303,12 +303,15 @@ struct bt_conn_br_info {
const bt_addr_t *dst; /** Destination (Remote) BR/EDR address */
};
/** Connection role (master or slave) */
enum {
BT_CONN_ROLE_MASTER,
BT_CONN_ROLE_SLAVE,
BT_CONN_ROLE_CENTRAL = 0,
BT_CONN_ROLE_PERIPHERAL = 1,
};
/** Connection role (central or peripheral) */
#define BT_CONN_ROLE_MASTER __DEPRECATED_MACRO BT_CONN_ROLE_CENTRAL
#define BT_CONN_ROLE_SLAVE __DEPRECATED_MACRO BT_CONN_ROLE_PERIPHERAL
/** Connection Info Structure */
struct bt_conn_info {
/** Connection Type. */
@ -582,7 +585,7 @@ struct bt_conn_le_create_param {
BT_GAP_SCAN_FAST_INTERVAL, \
BT_GAP_SCAN_FAST_INTERVAL)
/** Default LE create connection using whitelist parameters.
/** Default LE create connection using filter accept list parameters.
* Scan window: 30 ms.
* Scan interval: 60 ms.
*/
@ -615,14 +618,14 @@ int bt_conn_le_create(const bt_addr_le_t *peer,
const struct bt_le_conn_param *conn_param,
struct bt_conn **conn);
/** @brief Automatically connect to remote devices in whitelist.
/** @brief Automatically connect to remote devices in the filter accept list..
*
* This uses the Auto Connection Establishment procedure.
* The procedure will continue until a single connection is established or the
* procedure is stopped through @ref bt_conn_create_auto_stop.
* To establish connections to all devices in the whitelist the procedure
* should be started again in the connected callback after a new connection has
* been established.
* To establish connections to all devices in the the filter accept list the
* procedure should be started again in the connected callback after a
* new connection has been established.
*
* @param create_param Create connection parameters
* @param conn_param Initial connection parameters.