Bluetooth: H4: added support for HCI vendor-specific Setup feature.
Updated H4 driver to initialize setup function. Finally bt_h4_vnd_setup function must be implemented in vendor-specific HCI extension module if CONFIG_BT_HCI_SETUP is enabled. BT_HCI_SETUP feature is useful when the BT Controller requires execution of the vendor-specific commands sequence to initialize the BT Controller before the BT Host executes a Reset sequence. To enable this feature the CONFIG_BT_HCI_SETUP should be enable. Fixes #41140 Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This commit is contained in:
parent
db1538e7cf
commit
29eec8b3f7
1 changed files with 18 additions and 0 deletions
|
@ -528,11 +528,29 @@ static int h4_open(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_HCI_SETUP)
|
||||||
|
static int h4_setup(void)
|
||||||
|
{
|
||||||
|
/* Extern bt_h4_vnd_setup function.
|
||||||
|
* This function executes vendor-specific commands sequence to
|
||||||
|
* initialize BT Controller before BT Host executes Reset sequence.
|
||||||
|
* bt_h4_vnd_setup function must be implemented in vendor-specific HCI
|
||||||
|
* extansion module if CONFIG_BT_HCI_SETUP is enabled.
|
||||||
|
*/
|
||||||
|
extern int bt_h4_vnd_setup(const struct device *dev);
|
||||||
|
|
||||||
|
return bt_h4_vnd_setup(h4_dev);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct bt_hci_driver drv = {
|
static const struct bt_hci_driver drv = {
|
||||||
.name = "H:4",
|
.name = "H:4",
|
||||||
.bus = BT_HCI_DRIVER_BUS_UART,
|
.bus = BT_HCI_DRIVER_BUS_UART,
|
||||||
.open = h4_open,
|
.open = h4_open,
|
||||||
.send = h4_send,
|
.send = h4_send,
|
||||||
|
#if defined(CONFIG_BT_HCI_SETUP)
|
||||||
|
.setup = h4_setup
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static int bt_uart_init(const struct device *unused)
|
static int bt_uart_init(const struct device *unused)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue