Skip to content

Commit c71548c

Browse files
ydamigoshenrikbrixandersen
authored andcommitted
include: bluetooth: Deprecate bt_hci_bus enumeration
bt_hci_bus enumeration is not used anymore. This commit deprecates it. Signed-off-by: Ioannis Damigos <[email protected]>
1 parent b47f5fd commit c71548c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/zephyr/drivers/bluetooth.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ enum {
6666
};
6767

6868
/** Possible values for the 'bus' member of the bt_hci_driver struct */
69-
enum bt_hci_bus {
69+
enum __deprecated bt_hci_bus { /* Use macro BT_DT_HCI_BUS_GET() instead */
7070
BT_HCI_BUS_VIRTUAL = 0,
7171
BT_HCI_BUS_USB = 1,
7272
BT_HCI_BUS_PCCARD = 2,
@@ -94,7 +94,9 @@ enum bt_hci_bus {
9494
#define BT_DT_HCI_NAME_GET(node_id) DT_PROP_OR(node_id, bt_hci_name, "HCI")
9595
#define BT_DT_HCI_NAME_INST_GET(inst) BT_DT_HCI_NAME_GET(DT_DRV_INST(inst))
9696

97-
#define BT_DT_HCI_BUS_GET(node_id) DT_ENUM_IDX_OR(node_id, bt_hci_bus, BT_HCI_BUS_VIRTUAL)
97+
/* Fallback default when there's no property, same as "virtual" */
98+
#define BT_PRIV_HCI_BUS_DEFAULT (0)
99+
#define BT_DT_HCI_BUS_GET(node_id) DT_ENUM_IDX_OR(node_id, bt_hci_bus, BT_PRIV_HCI_BUS_DEFAULT)
98100

99101
#define BT_DT_HCI_BUS_INST_GET(inst) BT_DT_HCI_BUS_GET(DT_DRV_INST(inst))
100102

0 commit comments

Comments
 (0)