samples: bluetooth: Add build asserts for VS-using samples
The README files of these samples already indicate that they use the Zephyr-specific HCI vendor extensions, but this may still not be clear enough to some users, as evidenced in #81779. Add build asserts to make sure the samples only build when Zephyr VS extensions have been enabled. Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
This commit is contained in:
parent
534b54b6da
commit
9b19a90daa
2 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,9 @@
|
|||
#include <zephyr/bluetooth/gatt.h>
|
||||
#include <zephyr/bluetooth/services/hrs.h>
|
||||
|
||||
BUILD_ASSERT(IS_ENABLED(CONFIG_BT_HAS_HCI_VS),
|
||||
"This app requires Zephyr-specific HCI vendor extensions");
|
||||
|
||||
static struct bt_conn *default_conn;
|
||||
static uint16_t default_conn_handle;
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
#include <zephyr/bluetooth/hci_vs.h>
|
||||
#include <zephyr/bluetooth/addr.h>
|
||||
|
||||
BUILD_ASSERT(IS_ENABLED(CONFIG_BT_HAS_HCI_VS),
|
||||
"This app requires Zephyr-specific HCI vendor extensions");
|
||||
|
||||
#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
|
||||
#define DEVICE_NAME_LENGTH (sizeof(DEVICE_NAME) - 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue