diff --git a/include/drivers/bluetooth/hci_driver.h b/include/drivers/bluetooth/hci_driver.h index 56c7e6d4ced..da1bc6ae0ce 100644 --- a/include/drivers/bluetooth/hci_driver.h +++ b/include/drivers/bluetooth/hci_driver.h @@ -134,6 +134,8 @@ struct bt_hci_driver { * Send an HCI command or ACL data to the controller. The exact * type of the data can be checked with the help of bt_buf_get_type(). * + * @note This function must only be called from a cooperative thread. + * * @param buf Buffer containing data to be sent to the controller. * * @return 0 on success or negative error number on failure. diff --git a/subsys/bluetooth/common/Makefile b/subsys/bluetooth/common/Makefile index b0097f5f700..d8415350b0d 100644 --- a/subsys/bluetooth/common/Makefile +++ b/subsys/bluetooth/common/Makefile @@ -1,4 +1,5 @@ ccflags-y += -I$(srctree)/subsys/bluetooth +obj-y += dummy.o obj-$(CONFIG_BLUETOOTH_DEBUG) += log.o obj-$(CONFIG_BLUETOOTH_RPA) += rpa.o diff --git a/subsys/bluetooth/common/dummy.c b/subsys/bluetooth/common/dummy.c new file mode 100644 index 00000000000..9349262005c --- /dev/null +++ b/subsys/bluetooth/common/dummy.c @@ -0,0 +1,19 @@ +/** + * @file dummy.c + * Static compilation checks. + */ + +/* + * Copyright (c) 2017 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/* The Bluetooth subsystem requires the system workqueue to execute at a + * cooperative priority to function correctly. If this build assert triggers + * verify your configuration to ensure that cooperative threads are enabled + * and that the system workqueue priority is negative (cooperative). + */ +BUILD_ASSERT(CONFIG_SYSTEM_WORKQUEUE_PRIORITY < 0);