Bluetooth: shell: Add settings support

Enable settings and increase the system workqueue size to deal with
the stack usage. This also makes it possible to test unpairing support
with the shell's 'clear' command.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-04-28 21:08:06 +03:00 committed by Anas Nashif
commit a29554360a
2 changed files with 17 additions and 0 deletions

View file

@ -19,6 +19,8 @@
#include <misc/byteorder.h> #include <misc/byteorder.h>
#include <zephyr.h> #include <zephyr.h>
#include <settings/settings.h>
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#include <bluetooth/conn.h> #include <bluetooth/conn.h>
#include <bluetooth/l2cap.h> #include <bluetooth/l2cap.h>
@ -513,6 +515,10 @@ static void bt_ready(int err)
printk("Bluetooth initialized\n"); printk("Bluetooth initialized\n");
if (IS_ENABLED(CONFIG_SETTINGS)) {
settings_load();
}
#if defined(CONFIG_BT_CONN) #if defined(CONFIG_BT_CONN)
default_conn = NULL; default_conn = NULL;

View file

@ -1,3 +1,6 @@
# Incresed stack due to settings API usage
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_TEST=y CONFIG_TEST=y
CONFIG_BT=y CONFIG_BT=y
CONFIG_CONSOLE_HANDLER=y CONFIG_CONSOLE_HANDLER=y
@ -15,3 +18,11 @@ CONFIG_CONSOLE_SHELL=y
CONFIG_BT_SHELL=y CONFIG_BT_SHELL=y
CONFIG_BT_DEVICE_NAME="test shell" CONFIG_BT_DEVICE_NAME="test shell"
CONFIG_BT_L2CAP_TX_BUF_COUNT=6 CONFIG_BT_L2CAP_TX_BUF_COUNT=6
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y