Bluetooth: host: Rename BT_LE_CONN_OPT to BT_CONN_LE_OPT
Rename connection options to be consistent with the rest of the API names in conn.h Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
8b70079ebe
commit
fdb3da8aff
3 changed files with 14 additions and 14 deletions
|
@ -288,21 +288,21 @@ int bt_conn_disconnect(struct bt_conn *conn, u8_t reason);
|
|||
|
||||
enum {
|
||||
/** Convenience value when no options are specified. */
|
||||
BT_LE_CONN_OPT_NONE = 0,
|
||||
BT_CONN_LE_OPT_NONE = 0,
|
||||
|
||||
/** @brief Enable LE Coded PHY.
|
||||
*
|
||||
* Enable scanning on the LE Coded PHY.
|
||||
*/
|
||||
BT_LE_CONN_OPT_CODED = BIT(0),
|
||||
BT_CONN_LE_OPT_CODED = BIT(0),
|
||||
|
||||
/** @brief Disable LE 1M PHY.
|
||||
*
|
||||
* Disable scanning on the LE 1M PHY.
|
||||
*
|
||||
* @note Requires @ref BT_LE_CONN_OPT_CODED.
|
||||
* @note Requires @ref BT_CONN_LE_OPT_CODED.
|
||||
*/
|
||||
BT_LE_CONN_OPT_NO_1M = BIT(1),
|
||||
BT_CONN_LE_OPT_NO_1M = BIT(1),
|
||||
};
|
||||
|
||||
struct bt_conn_le_create_param {
|
||||
|
@ -369,7 +369,7 @@ struct bt_conn_le_create_param {
|
|||
* Scan continuously by setting scan interval equal to scan window.
|
||||
*/
|
||||
#define BT_CONN_LE_CREATE_CONN \
|
||||
BT_CONN_LE_CREATE_PARAM(BT_LE_CONN_OPT_NONE, \
|
||||
BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
|
||||
BT_GAP_SCAN_FAST_INTERVAL, \
|
||||
BT_GAP_SCAN_FAST_INTERVAL)
|
||||
|
||||
|
@ -378,7 +378,7 @@ struct bt_conn_le_create_param {
|
|||
* Scan interval: 60 ms.
|
||||
*/
|
||||
#define BT_CONN_LE_CREATE_CONN_AUTO \
|
||||
BT_CONN_LE_CREATE_PARAM(BT_LE_CONN_OPT_NONE, \
|
||||
BT_CONN_LE_CREATE_PARAM(BT_CONN_LE_OPT_NONE, \
|
||||
BT_GAP_SCAN_FAST_INTERVAL, \
|
||||
BT_GAP_SCAN_FAST_WINDOW)
|
||||
|
||||
|
|
|
@ -1442,9 +1442,9 @@ int bt_le_create_conn_ext(const struct bt_conn *conn)
|
|||
}
|
||||
|
||||
num_phys = (!(bt_dev.create_param.options &
|
||||
BT_LE_CONN_OPT_NO_1M) ? 1 : 0) +
|
||||
BT_CONN_LE_OPT_NO_1M) ? 1 : 0) +
|
||||
((bt_dev.create_param.options &
|
||||
BT_LE_CONN_OPT_CODED) ? 1 : 0);
|
||||
BT_CONN_LE_OPT_CODED) ? 1 : 0);
|
||||
|
||||
buf = bt_hci_cmd_create(BT_HCI_OP_LE_EXT_CREATE_CONN, sizeof(*cp) +
|
||||
num_phys * sizeof(*phy));
|
||||
|
@ -1476,7 +1476,7 @@ int bt_le_create_conn_ext(const struct bt_conn *conn)
|
|||
cp->own_addr_type = own_addr_type;
|
||||
cp->phys = 0;
|
||||
|
||||
if (!(bt_dev.create_param.options & BT_LE_CONN_OPT_NO_1M)) {
|
||||
if (!(bt_dev.create_param.options & BT_CONN_LE_OPT_NO_1M)) {
|
||||
cp->phys |= BT_HCI_LE_EXT_SCAN_PHY_1M;
|
||||
phy = net_buf_add(buf, sizeof(*phy));
|
||||
phy->scan_interval = sys_cpu_to_le16(
|
||||
|
@ -1486,7 +1486,7 @@ int bt_le_create_conn_ext(const struct bt_conn *conn)
|
|||
set_phy_conn_param(conn, phy);
|
||||
}
|
||||
|
||||
if (bt_dev.create_param.options & BT_LE_CONN_OPT_CODED) {
|
||||
if (bt_dev.create_param.options & BT_CONN_LE_OPT_CODED) {
|
||||
cp->phys |= BT_HCI_LE_EXT_SCAN_PHY_CODED;
|
||||
phy = net_buf_add(buf, sizeof(*phy));
|
||||
phy->scan_interval = sys_cpu_to_le16(
|
||||
|
|
|
@ -1210,9 +1210,9 @@ static int cmd_connect_le(const struct shell *shell, size_t argc, char *argv[])
|
|||
const char *arg = argv[argn];
|
||||
|
||||
if (!strcmp(arg, "coded")) {
|
||||
options |= BT_LE_CONN_OPT_CODED;
|
||||
options |= BT_CONN_LE_OPT_CODED;
|
||||
} else if (!strcmp(arg, "no-1m")) {
|
||||
options |= BT_LE_CONN_OPT_NO_1M;
|
||||
options |= BT_CONN_LE_OPT_NO_1M;
|
||||
} else {
|
||||
shell_help(shell);
|
||||
return SHELL_CMD_HELP_PRINTED;
|
||||
|
@ -2130,9 +2130,9 @@ static int cmd_wl_connect(const struct shell *shell, size_t argc, char *argv[])
|
|||
const char *arg = argv[argn];
|
||||
|
||||
if (!strcmp(arg, "coded")) {
|
||||
options |= BT_LE_CONN_OPT_CODED;
|
||||
options |= BT_CONN_LE_OPT_CODED;
|
||||
} else if (!strcmp(arg, "no-1m")) {
|
||||
options |= BT_LE_CONN_OPT_NO_1M;
|
||||
options |= BT_CONN_LE_OPT_NO_1M;
|
||||
} else {
|
||||
shell_help(shell);
|
||||
return SHELL_CMD_HELP_PRINTED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue