drivers/bluetooth/hci: stm32wb: Move RX thread creation to open
In order to enable RX thread abortion on close, move creation to from init to open. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
a099c79234
commit
49b15c8306
1 changed files with 7 additions and 7 deletions
|
@ -530,6 +530,13 @@ static int bt_ipm_open(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
/* Start RX thread */
|
||||||
|
k_thread_create(&ipm_rx_thread_data, ipm_rx_stack,
|
||||||
|
K_KERNEL_STACK_SIZEOF(ipm_rx_stack),
|
||||||
|
(k_thread_entry_t)bt_ipm_rx_thread, NULL, NULL, NULL,
|
||||||
|
K_PRIO_COOP(CONFIG_BT_DRIVER_RX_HIGH_PRIO),
|
||||||
|
0, K_NO_WAIT);
|
||||||
|
|
||||||
err = bt_ipm_ble_init();
|
err = bt_ipm_ble_init();
|
||||||
if (err) {
|
if (err) {
|
||||||
return err;
|
return err;
|
||||||
|
@ -556,13 +563,6 @@ static int _bt_ipm_init(const struct device *unused)
|
||||||
|
|
||||||
start_ble_rf();
|
start_ble_rf();
|
||||||
|
|
||||||
/* Start RX thread */
|
|
||||||
k_thread_create(&ipm_rx_thread_data, ipm_rx_stack,
|
|
||||||
K_KERNEL_STACK_SIZEOF(ipm_rx_stack),
|
|
||||||
(k_thread_entry_t)bt_ipm_rx_thread, NULL, NULL, NULL,
|
|
||||||
K_PRIO_COOP(CONFIG_BT_DRIVER_RX_HIGH_PRIO),
|
|
||||||
0, K_NO_WAIT);
|
|
||||||
|
|
||||||
/* Take BLE out of reset */
|
/* Take BLE out of reset */
|
||||||
ipcc_reset();
|
ipcc_reset();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue