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:
Erwan Gouriou 2022-02-02 11:56:16 +01:00 committed by Anas Nashif
commit 925c84a75b

View file

@ -116,7 +116,12 @@ void main(void)
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});
}