samples/boards/stm32: stm32_ble: Use bt_disable to reset the BLE stack
Application is now supposed to explicitly shut down the ble stack before shutdown. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
ed6cc6dce3
commit
925c84a75b
1 changed files with 6 additions and 1 deletions
|
@ -116,7 +116,12 @@ void main(void)
|
||||||
|
|
||||||
k_sleep(K_SECONDS(6));
|
k_sleep(K_SECONDS(6));
|
||||||
|
|
||||||
printk("Device shutdown\n");
|
printk("BLE disable\n");
|
||||||
|
err = bt_disable();
|
||||||
|
if (err) {
|
||||||
|
printk("Bluetooth disable failed (err %d)\n", err);
|
||||||
|
}
|
||||||
|
|
||||||
|
printk("Shutdown\n");
|
||||||
pm_state_force(0u, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0});
|
pm_state_force(0u, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue