Skip to content

Commit 72dac16

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: Use OVERHEAD_XTAL_US from devicetree
Use the external crystal high frequency clock settling value from devicetree. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent b9fbf51 commit 72dac16

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_vendor.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
/*
2-
* Copyright (c) 2018-2019 Nordic Semiconductor ASA
2+
* Copyright (c) 2018-2025 Nordic Semiconductor ASA
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#if DT_NODE_HAS_PROP(DT_NODELABEL(hfxo), startup_time_us)
8+
#define EVENT_OVERHEAD_XTAL_US DT_PROP(DT_NODELABEL(hfxo), startup_time_us)
9+
#else
710
#define EVENT_OVERHEAD_XTAL_US 1500
11+
#endif
812
#define EVENT_OVERHEAD_PREEMPT_US 0 /* if <= min, then dynamic preempt */
913
#define EVENT_OVERHEAD_PREEMPT_MIN_US 0
1014
#define EVENT_OVERHEAD_PREEMPT_MAX_US EVENT_OVERHEAD_XTAL_US

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
*/
66

77
#include <stddef.h>
8+
89
#include <zephyr/kernel.h>
9-
#include <soc.h>
10+
#include <zephyr/devicetree.h>
1011
#include <zephyr/bluetooth/hci_types.h>
1112
#include <zephyr/sys/byteorder.h>
1213

14+
#include <soc.h>
15+
1316
#include "hal/cpu.h"
1417
#include "hal/ecb.h"
1518
#include "hal/ccm.h"

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <zephyr/devicetree.h>
78
#include <zephyr/sys/byteorder.h>
89
#include <zephyr/sys/slist.h>
910
#include <zephyr/sys/util.h>

tests/bluetooth/controller/mock_ctrl/src/ull.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include <zephyr/types.h>
8+
#include <zephyr/devicetree.h>
89
#include <zephyr/ztest.h>
910

1011
#include <zephyr/bluetooth/hci.h>

tests/bluetooth/controller/mock_ctrl/src/ull_conn_iso.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <zephyr/ztest.h>
88

99
#include <zephyr/kernel.h>
10+
#include <zephyr/devicetree.h>
1011

1112
#include "hal/ccm.h"
1213
#include "hal/ticker.h"

tests/bluetooth/controller/mock_ctrl/src/ull_peripheral_iso.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <zephyr/ztest.h>
88

99
#include <zephyr/kernel.h>
10+
#include <zephyr/devicetree.h>
1011
#include <zephyr/bluetooth/buf.h>
1112
#include <zephyr/sys/byteorder.h>
1213

0 commit comments

Comments
 (0)